* { box-sizing: border-box; }
:root {
  --bg: #F4FCFC; --card: #F6FAFA; --ink: #16383D; --muted:#759094;
  --teal: #1BB8AB; --teal-dark:#0EA99C; --border:#DEF0EF; --light:#D8F3EF;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ink); background:var(--bg);
}
html,body {margin:0; width:100%; min-height:100%; background:var(--bg); }
button, input {font:inherit; -webkit-tap-highlight-color:transparent;}
button { cursor:pointer; }
button:focus-visible, input:focus-visible {outline:3px solid #249eb1; outline-offset:2px}
.app {width:100%; max-width:470px; height:100dvh; min-height:610px; margin:0 auto; background:var(--bg); display:flex; flex-direction:column; overflow:hidden; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
.header {display:flex; flex:0 0 auto; justify-content:space-between; align-items:center; gap:14px; padding:6px 17px 5px; min-height:62px; }
.brand {width:min(43%,168px); height:49px; object-fit:contain; object-position:left center;}
.connection { display:inline-flex; align-items:center; gap:9px; background:#EDF5F5; border-radius:30px; padding:12px 14px; font-size:13px; font-weight:700; white-space:nowrap; }
.connection-dot {width:11px; height:11px; background:#29A8E4; border-radius:50%; flex:0 0 auto;}
.main { flex:1 1 auto; min-height:0; padding:0 16px; }
.home { height:100%; display:flex; flex-direction:column; }
.headline {flex:0 0 auto; padding-top:5px; padding-bottom:12px;}
.eyebrow {letter-spacing:.28em; color:#20A99D; font-size:13px; font-weight:800; margin:4px 0 8px; }
h1 {font-size:clamp(24px,7.6vw,30px); line-height:1.07; letter-spacing:-.04em; margin:0; font-weight:820;}
.subtitle {margin:14px 0 0; font-size:14px; line-height:1.42; color:#718B91; }
.breath-card { flex:0 0 auto; background:#F8FBFB; border:1px solid #EBF1F1; border-radius:28px; padding:12px 14px 13px; }
.ring { height:216px; width:216px; margin:4px auto 12px; position:relative; display:flex; align-items:center; justify-content:center; }
.ring-svg {position:absolute; inset:0; width:100%; height:100%; pointer-events:none}
.orbit {position:absolute; inset:0; pointer-events:none; transform-origin:center; }
.orbit-dot {width:26px; height:26px; border-radius:100%; background:#24D0C3; position:absolute; left:calc(50% - 13px); top:1px; }
.ring-center {width:170px; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; pointer-events:none;}
.ring-word {font-size:32px; line-height:1.08; letter-spacing:-.04em; font-weight:850; white-space:nowrap;}
.ring-time {font-size:27px; line-height:1.1; color:#899EA1; font-weight:500; font-variant-numeric:tabular-nums; }
.mode-toggle {background:#EFF5F5; padding:5px; border-radius:999px; display:grid; grid-template-columns:1fr 1fr; gap:0; }
.mode-button {min-height:56px; border:0; background:transparent; border-radius:999px; color:var(--ink); font-size:16px; font-weight:750; display:flex; align-items:center; justify-content:center; gap:9px; padding:5px 6px; white-space:nowrap;}
.mode-button .emoji {font-size:22px;line-height:1;}
.mode-button.selected {background:var(--teal); color:#fff;}
.start-button {width:100%; border:0; min-height:72px; margin-top:12px; border-radius:22px; background:var(--teal); color:white; display:flex; align-items:center; justify-content:center; gap:14px; font-size:26px; font-weight:800;}
.start-icon {font-size:26px; line-height:1}
.summary {border:0; width:100%; text-align:left; flex:0 0 auto; margin-top:12px; min-height:94px; background:#F8FBFB; border-radius:24px; display:flex; gap:14px; align-items:center; padding:14px;}
.summary-symbol {width:69px; height:61px; border-radius:20px; display:flex; align-items:center; justify-content:center; background:#EFF8F8; font-size:28px; color:var(--teal);}
.summary-line {height:60px; width:1px; background:#DAEBEA; }
.summary-text {flex:1; min-width:0;}
.summary-text strong {font-size:18px; display:block;}
.summary-text small {display:block; margin-top:3px; color:var(--muted); font-size:14px}
.summary-arrow {font-size:31px; color:#809B9D; line-height:1;}
.tabs {flex:0 0 auto; background:#FBFDFD; min-height:78px; display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid #D8EFEE; padding-top:6px;}
.tab {appearance:none; border:0; background:none; color:#98ACAD; font-size:12px; font-weight:730; padding:4px; display:flex; flex-direction:column; align-items:center; gap:3px;}
.tab-icon {height:27px; font-size:27px; font-weight:500; line-height:1;}
.tab.active {color:var(--teal-dark)}
.tab i {margin-top:5px; display:block; width:19px; height:4px; border-radius:4px; background:transparent;}
.tab.active i {background:var(--teal)}
.page-scroll {overflow-y:auto; overscroll-behavior:contain; height:100%; padding-bottom:25px; scrollbar-width:thin;}
.page-heading {padding:13px 0 18px;}
.page-heading h1 {font-size:28px}
.page-heading .subtitle {margin-top:10px}
.settings-card,.device-card,.editor-card {border-radius:26px; background:#F8FBFB; padding:17px; margin-bottom:14px;}
.section-title {display:flex; align-items:center; gap:12px; margin-bottom:13px;}
.emoji-circle {width:52px;height:52px; background:#E8F7F5; border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;}
.section-title h2 {font-size:21px; margin:0;font-weight:820}
.section-title p {margin:3px 0 0;color:var(--muted);font-size:13px}
.choice {display:flex;align-items:center; gap:12px; width:100%; margin-top:10px; background:#fff; border:1px solid #E2EEEE; border-radius:18px; text-align:left; padding:14px; color:var(--ink);}
.choice.selected {border:1.5px solid var(--teal); background:#F0FCFA;}
.choice span:first-child {flex:1;min-width:0}
.choice strong {display:block; font-size:17px; font-weight:750}
.choice small {display:block; color:#72898C; font-size:12px; line-height:1.5; margin-top:4px}
.radio {width:23px;height:23px;border-radius:50%;border:1.5px solid #B6D7D4;display:flex;align-items:center;justify-content:center}
.choice.selected .radio {border-color:var(--teal)}
.choice.selected .radio:after {content:'';width:11px;height:11px;border-radius:50%;background:var(--teal);}
.create-button,.save-button,.connect-button {display:block;border:0;width:100%; padding:18px 14px; border-radius:22px;background:var(--teal);color:#fff;font-weight:800;font-size:18px;}
.helper {font-size:13px;line-height:1.4;color:var(--muted);text-align:center;margin:9px 0 20px}
.back {border:0;background:none;padding:14px 0 10px;color:#1EA89D;font-weight:800;text-align:left}
.editor-label {display:block;font-size:16px;font-weight:750;margin:16px 0 8px}
.editor-switch {display:grid;grid-template-columns:1fr 1fr;gap:8px;border-radius:999px;background:#EEF5F5;padding:5px}
.editor-switch button {padding:13px 4px;border:0;background:transparent;border-radius:999px;font-size:14px;font-weight:700;color:var(--ink)}
.editor-switch button.selected {background:var(--teal); color:#fff}
.seconds-input {height:58px; width:100%; background:#fff; border-radius:15px; border:1px solid #D9EDEB; padding:10px 14px; color:var(--ink); font-size:22px; font-variant-numeric:tabular-nums;}
.validation {min-height:20px;color:#BA4459;font-size:13px;margin:8px 0}
.device-card {text-align:center;padding:24px 22px}
.device-badge {margin:0 auto;width:124px;height:80px;border:8px solid #7DE3D8;border-radius:28px;background:#103B44;color:#EAFDFB;font-size:43px;font-weight:900;font-style:italic;display:flex;align-items:center;justify-content:center}
.device-card h2 {font-size:24px;margin:16px 0 4px}
.device-card p {font-size:15px;color:var(--muted);margin:7px 0 16px}
.device-note {font-size:13px;color:#718A8E;line-height:1.5;margin-top:16px}
.toast {position:fixed; bottom:calc(85px + env(safe-area-inset-bottom,0px));max-width:390px;left:50%;transform:translate(-50%,20px); opacity:0;pointer-events:none;background:#173E43;color:#fff;padding:12px 18px;border-radius:16px;font-size:14px;box-shadow:0 8px 24px #0002;transition:opacity .2s, transform .2s;z-index:100;width:max-content;max-width:90vw;text-align:center}
.toast.visible {opacity:1;transform:translate(-50%,0)}
@media (min-width:550px) {body {background:#e6f2f2;} .app {border-inline:1px solid #d8eaea;box-shadow:0 0 55px #23525a18}}
@media (max-height:795px) {
  .header {min-height:52px;padding-top:3px;padding-bottom:1px}
  .brand {height:43px}
  .headline {padding-top:2px;padding-bottom:8px}
  .eyebrow {margin:3px 0 6px}
  .subtitle {margin:8px 0 0;font-size:13px;line-height:1.34}
  .ring {width:188px;height:188px;margin:0 auto 8px}
  .ring-word {font-size:29px}
  .ring-time {font-size:24px}
  .breath-card {padding:8px 12px 9px}
  .mode-button {min-height:49px;font-size:15px}
  .start-button {margin-top:9px;min-height:60px;font-size:22px}
  .summary {margin-top:8px;min-height:79px;padding:10px 14px}
  .summary-symbol {width:55px;height:52px}
  .summary-line {height:52px}
  .tabs {min-height:69px}
}
@media (max-height:685px) {
  .headline {padding-bottom:5px}
  h1 {font-size:24px;line-height:1.05}
  .ring {width:170px;height:170px;margin:0 auto 5px}
  .breath-card {padding-top:5px;padding-bottom:7px}
  .mode-button {min-height:43px}
  .start-button {min-height:52px;margin-top:8px}
  .summary {min-height:71px;margin-top:7px}
  .summary-symbol {height:45px;width:50px}
}
