:root{
  color-scheme: light;
  --bg:#f3f6f8;
  --bg-2:#fafcfd;
  --surface: rgba(255,255,255,.96);
  --surface-2:#ffffff;
  --surface-muted:#f2f5f7;
  --surface-hover:#eef4f7;
  --text:#032138;
  --muted:#5f6f7d;
  --accent:#005c99;
  --accent-strong:#009ee0;
  --accent-contrast:#ffffff;
  --accent-secondary:#2ba4a6;
  --accent-secondary-strong:#a5c56c;
  --accent-orange:#ff8552;
  --accent-yellow:#ffdc4c;
  --tab-accent:#0063a6;
  --tab-accent-strong:#009ee0;
  --danger:#cb003e;
  --border: rgba(3,33,56,.12);
  --border-strong: rgba(3,33,56,.18);
  --ring: 0 0 0 3px rgba(0,99,166,.16);
  --shadow: 0 14px 28px rgba(3,33,56,.06);
  --shadow-soft: 0 6px 14px rgba(3,33,56,.04);
  --radius: 12px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --module-card-height: 132px;
  --space-1: 10px;
  --space-2: 14px;
  --space-3: 18px;
  --space-4: 24px;
  --topbar-bg: rgba(255,255,255,.97);
  --nav-bg: rgba(255,255,255,.98);
  --nav-pill: #f3f6f9;
  --switch-bg:#eef4f8;
  --nav-icon-filter: none;
  --font-body: "Source Sans 3", "Inter", "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
}

@font-face{
  font-display: swap;
  font-family: "Univie Icons";
  font-style: normal;
  font-weight: 400;
  src: url("https://fermatastress.univie.ac.at/media/icons.woff2") format("woff2");
}

[data-theme="light"]{
  color-scheme: light;
}

[data-theme="dark"]{
  color-scheme: dark;
  --bg:#081521;
  --bg-2:#0c1d2a;
  --surface: rgba(12,29,42,.94);
  --surface-2:#102434;
  --surface-muted:#132a3b;
  --surface-hover:#163a57;
  --text:#edf5fb;
  --muted:#a8bfce;
  --accent:#4eaee8;
  --accent-strong:#7fc9f2;
  --accent-contrast:#032138;
  --accent-secondary:#5fc4c2;
  --accent-secondary-strong:#b6d77e;
  --accent-orange:#ff9e72;
  --accent-yellow:#ffdc4c;
  --danger:#ff6f8f;
  --border: rgba(164,198,220,.16);
  --border-strong: rgba(164,198,220,.28);
  --ring: 0 0 0 3px rgba(78,174,232,.2);
  --shadow: 0 16px 36px rgba(0,0,0,.34);
  --shadow-soft: 0 8px 18px rgba(0,0,0,.24);
  --topbar-bg: rgba(8,21,33,.92);
  --nav-bg: rgba(8,21,33,.94);
  --nav-pill:#132a3b;
  --switch-bg:#163247;
  --nav-icon-filter: brightness(0) invert(1);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  position: relative;
  background-color: var(--bg);
  color:var(--text);
  font-family: var(--font-body);
  transition: background-color .35s ease, color .25s ease;
  min-height: 100%;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,99,166,.045), transparent 220px),
    radial-gradient(900px 420px at 0% 0%, rgba(0,99,166,.04), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

#app{ min-height:100%; display:flex; flex-direction:column; }

.topbar{
  position:sticky; top:0; z-index:1000;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  height: 82px;
  padding: 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:18px;
  height:100%;
  min-width:0;
  flex:1 1 auto;
}

.topbar::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background: var(--accent);
}

.brand{
  font-weight:700;
  letter-spacing:.08em;
  font-size: .88rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  text-align:right;
  min-width:0;
  flex:1 1 auto;
}
.brand-text{
  display:inline-block;
  line-height:1.2;
}
.topbar-right{ height: 100%; }
.topbar-logo{
  display:flex;
  align-items:center;
  height: 100%;
  flex:0 0 auto;
}
.brand-logo{
  height: 100%;
  width: auto;
  display: inline-block;
  max-height: 82px;
}
[data-theme="light"] .brand-logo.is-dark{ display:none; }
[data-theme="dark"] .brand-logo.is-light{ display:none; }
.topbar-right{ display:flex; align-items:center; gap:10px; }

.view{
  flex:1;
  padding: 32px 24px 120px;
  max-width: 980px;
  width:100%;
  margin:0 auto;
  animation: fade-up .4s ease;
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease, background-color .3s ease;
  animation: fade-up .45s ease;
}
.card.primary{
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.card.flat-shell{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  animation: none;
}
.card.flat-shell > hr{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}


.view > .card:not(.support),
.view > .stack > .card:not(.support),
.view > .stack > .tab-panels > .tab-panel > .card:not(.support),
.view > .stack > .tab-panels > .tab-panel > .section > .card:not(.support){
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  animation: none;
}
.view > .card:not(.support) > hr,
.view > .stack > .card:not(.support) > hr,
.view > .stack > .tab-panels > .tab-panel > .card:not(.support) > hr,
.view > .stack > .tab-panels > .tab-panel > .section > .card:not(.support) > hr{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}
.card.support{
  background: var(--surface-2);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  margin-bottom: 22px;
}
[data-theme="dark"] .card.support{
  background: var(--surface-2);
  border-color: rgba(163,191,210,.2);
  box-shadow: var(--shadow-soft);
}
.card.support h1,
.card.support h2,
.card.support h3,
.card.support p,
.card.support .small,
.card.support .section-title,
.card.support .overview-label,
.card.support .overview-sub,
.card.support .detail-label,
.card.support .detail-sub,
.card.support .detail-note{
  color: inherit;
}


.view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support{
  background: linear-gradient(145deg, #1c6fa4 0%, #2f82b4 100%);
  border-color: rgba(3,33,56,.12);
  box-shadow: 0 8px 20px rgba(0,92,153,.16);
  color: #ffffff;
  padding: 26px;
}
[data-theme="dark"] .view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support{
  background: linear-gradient(145deg, #2c7eaf 0%, #3b92c0 100%);
  border-color: rgba(163,191,210,.2);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support h1,
.view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support h2,
.view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support h3,
.view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support p,
.view[data-view="home"] .tab-panels[data-tab="0"] .tab-panel:nth-child(1) > .card.support .small{
  color:#ffffff;
}

.section{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.section-title{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
.section-divider{
  height: 1px;
  background: var(--border);
  border-radius: 999px;
}

.page-head{
  position: relative;
  top: auto;
  z-index: auto;
  backdrop-filter: none;
}

h1 + .small, h2 + .small{ margin-top: 6px; }

.tab-header{
  display:flex;
  gap: 1.25rem;
  align-items:flex-end;
  justify-content: center;
  width: 100%;
  padding: 2px 0 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
.tab-header::-webkit-scrollbar{ display:none; }
.tab-btn{
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 2px 12px;
  border-radius: var(--radius-sm);
  cursor:pointer;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: .1px;
  transition: color .2s ease, transform .15s ease;
  position: relative;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tab-btn:hover{
  transform: translateY(-1px);
  color: var(--text);
}
.tab-btn.is-active{
  color: var(--text);
}
.tab-btn.is-active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom: -1px;
  height: 2px;
  border-radius: 0;
  background: var(--accent);
}
.tab-panels{
  display:block;
  overflow:visible;
  touch-action: pan-y;
}
.tab-panel{
  display:none;
  flex-direction:column;
  gap:12px;
  animation: fade-up .35s ease;
}
.tab-panels[data-tab="0"] .tab-panel:nth-child(1){ display:flex; }
.tab-panels[data-tab="1"] .tab-panel:nth-child(2){ display:flex; }
.tab-panels[data-tab="2"] .tab-panel:nth-child(3){ display:flex; }

.diary-info{
  overflow:hidden;
}
.diary-info-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.diary-info-body{
  margin-top: 8px;
}
.diary-info.is-collapsed .diary-info-body{
  display:none;
}
.diary-block{
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--surface-2);
  display:flex;
  flex-direction:column;
  gap:12px;
}
.diary-label{
  font-size: .98rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}
.curated-question{
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.55;
}
.curated-shell{
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface-2) 92%, #d7e3eb), var(--surface-2));
}
.curated-progress{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom: 10px;
}
.curated-bar{
  height: 6px;
  border-radius: 999px;
  background: var(--nav-pill);
  overflow:hidden;
}
.curated-bar span{
  display:block;
  height: 100%;
  background: var(--accent-orange);
  border-radius: 999px;
}
.curated-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom: 6px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: .85rem;
  color: var(--text);
}
.curated-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.curated-step{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.curated-results-title{
  font-size: 1rem;
  font-weight: 700;
  margin: 10px 0 4px;
}
.curated-item{
  text-align:left;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor:pointer;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:10px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}
.curated-item::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:7px;
  border-radius: 14px 14px 0 0;
  background: color-mix(in oklab, var(--accent) 45%, var(--surface-2));
  pointer-events:none;
}
.curated-item::after{
  content:"";
  position:absolute;
  width:170px;
  height:170px;
  right:-66px;
  top:-66px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%);
  pointer-events:none;
}
.curated-item > *{
  position: relative;
  z-index: 1;
}
.curated-item:hover{
  border-color: rgba(0,99,166,.28);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.curated-item-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.24;
  letter-spacing: 0;
}
.curated-item-desc{
  margin-top: 8px;
  font-size: .94rem;
  color: var(--muted);
  line-height: 1.55;
}
.diary-entry{
  border-left: 4px solid var(--accent-orange);
}
.diary-always{
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.diary-input{
  min-height: 110px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-left: 3px solid color-mix(in oklab, var(--accent-orange) 72%, #c9a48e);
  box-shadow: none;
  line-height: 1.6;
}
.diary-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.diary-entry{
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  padding: 10px 12px;
}
.diary-entry[open]{
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.diary-entry summary{
  list-style: none;
  cursor: pointer;
  display:flex;
  align-items:center;
  gap:10px;
}
.diary-entry summary::-webkit-details-marker{ display:none; }
.diary-date{
  font-weight: 700;
  min-width: 96px;
}
.diary-divider{
  width: 1px;
  align-self: stretch;
  background: var(--border-strong);
  opacity: .7;
}
.diary-preview{
  color: var(--muted);
  font-size: .9rem;
  flex:1;
}
.diary-edit{
  font-size: .9rem;
  opacity: .55;
}
.diary-entry-body{
  margin-top: 8px;
  display:flex;
  flex-direction:column;
  gap:6px;
  color: var(--text);
}


.tutorial-overlay{
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}
.tutorial-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(3, 33, 56, .32);
}
.tutorial-overlay.has-spotlight .tutorial-backdrop{
  background: transparent;
}
.tutorial-spotlight{
  position: fixed;
  pointer-events: none;
  border-radius: 12px;
  border: 4px solid rgba(255,133,82,1);
  box-shadow:
    0 0 0 9999px rgba(3,33,56,.34),
    0 0 0 10px rgba(255,133,82,.48),
    0 0 44px rgba(255,133,82,.85);
  z-index: 10001;
}
.tutorial-card{
  position: fixed;
  width: min(320px, calc(100vw - 20px));
  max-width: 320px;
  max-height: calc(100svh - 20px);
  overflow: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #ffd8b0, #ff9f5f);
  border: 1px solid rgba(184,86,34,.5);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 24px 42px rgba(140,76,26,.32);
  pointer-events: auto;
  color: #2f1408;
  z-index: 10002;
}
.tutorial-title{
  font-size: .8rem;
  color: rgba(47,20,8,.72);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tutorial-heading{
  font-weight: 800;
  margin-top: 6px;
  color: #2f1408;
}
.tutorial-text{
  margin-top: 6px;
  color: rgba(47,20,8,.84);
  font-size: .95rem;
  line-height: 1.5;
}
.tutorial-card .btn:not(.primary){
  background: linear-gradient(180deg, #ff9a63, #ff8552);
  border-color: rgba(180,83,36,.44);
  color: #1f0d05;
}
.tutorial-card .btn:not(.primary):hover{
  background: linear-gradient(180deg, #ffa571, #ff9162);
  border-color: rgba(180,83,36,.5);
}
.tutorial-actions{
  margin-top: 10px;
  display:flex;
  flex-wrap: nowrap;
  gap:8px;
  align-items:center;
}
.tutorial-highlight{
  position: relative;
  z-index: 9999;
  border-radius: 10px;
}

@media (max-width: 420px){
  .tutorial-card{
    padding: 12px;
    border-radius: 12px;
  }
  .tutorial-actions .btn{
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 8px;
    font-size: .86rem;
    white-space: nowrap;
  }
  .tutorial-actions > div{
    display: none;
  }
}

h1,h2,h3{ margin: 0 0 10px; color: var(--text); }
h1{ font-size: clamp(1.85rem, 4.8vw, 2.55rem); letter-spacing:0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; }
h2{ font-size: clamp(1.45rem, 3.7vw, 1.9rem); font-family: var(--font-display); font-weight: 600; line-height: 1.16; }
h3{ font-size: 1.08rem; font-family: var(--font-body); font-weight: 700; }
p{ color: var(--muted); line-height:1.68; }
.small{ font-size:.92rem; color: var(--muted); }
.form-label{ color: var(--text); font-weight: 600; }
.form-section{
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--surface-2);
  display:flex;
  flex-direction:column;
  gap:12px;
}
.form-section-title{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.form-msg{
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--danger);
  background: rgba(203,0,62,.08);
  color: var(--text);
}
.form-msg:empty{ display:none; }
.form-msg.is-success{
  border-left-color: var(--accent-secondary);
  background: rgba(143,133,122,.12);
}
.warn-note{ display:flex; gap:8px; align-items:flex-start; }
.warn-icon{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
  flex: 0 0 auto;
  margin-top: 2px;
}

.row{ display:flex; gap:12px; flex-wrap:wrap; }
.col{ flex:1; min-width: 250px; }
.stack{ display:flex; flex-direction:column; gap:16px; }

.input, select, textarea{
  width:100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  outline:none;
  font-size: 16px;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .3s ease;
}
textarea{ min-height: 110px; resize: vertical; }

.input-with-icon{
  position: relative;
}
.input-has-icon{
  padding-right: 46px;
}
.input-icon-btn{
  position:absolute;
  right:10px;
  top:50%;
  transform: translateY(-50%);
  width:30px;
  height:30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--nav-pill);
  color: var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .15s ease;
}
.input-icon-btn:hover{
  border-color: var(--border-strong);
  transform: translateY(-50%) scale(1.03);
}
.input-icon-btn:focus-visible{
  outline:none;
  box-shadow: var(--ring);
  border-color: var(--accent);
}
.input-icon-btn svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: .75;
}
.input-icon-btn.is-on svg{
  opacity: 1;
}
.input-icon-btn.is-hidden{
  opacity: 0;
  pointer-events: none;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear{
  display: none;
}
input[type="password"]::-webkit-credentials-auto-fill-button{
  visibility: hidden;
  display: none !important;
}

.callout{
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}
.callout-title{
  font-weight: 700;
  margin-bottom: 6px;
}
.callout ul{
  margin: 6px 0 8px 18px;
}

.info-accordion{
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px;
}
.info-accordion summary{
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display:flex;
  align-items:center;
  gap:8px;
}
.info-accordion summary::-webkit-details-marker{ display:none; }
.info-accordion summary::after{
  content:"▾";
  margin-left:auto;
  opacity:.7;
  transition: transform .2s ease;
}
.info-accordion[open] summary::after{
  transform: rotate(180deg);
}
.info-body{
  margin-top: 8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.welcome-hero{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.welcome-kicker{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  opacity: .88;
}
.welcome-greeting{
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 600;
}
.welcome-lead{
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.7;
}
.welcome-points{
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 760px){
  .welcome-points{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.welcome-point{
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(4px);
}
.welcome-point-title{
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 600;
  color: inherit;
}
.welcome-point-text{
  margin-top: 8px;
  font-size: .94rem;
  line-height: 1.55;
  color: inherit;
  opacity: .92;
}
.study-choice-lead{
  margin: 12px 0 16px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(242,166,90,.28), rgba(255,246,229,.92));
  border: 1px solid rgba(201,116,37,.18);
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--text);
}
.study-choice-point{
  padding: 16px 18px;
}
.study-choice-point .welcome-point-title{
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.study-choice-point .welcome-point-text{
  font-size: 1rem;
}
.welcome-content{
  gap: 18px;
}
.welcome-actions{
  margin-top: 4px;
}

.confirm-box{
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}
.confirm-box.is-hidden{
  display: none;
}
.confirm-title{
  font-weight: 700;
  margin-bottom: 8px;
}

.input:focus, select:focus, textarea:focus{
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.btn{
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 17px;
  border-radius: var(--radius-sm);
  cursor:pointer;
  font-weight:700;
  box-shadow: none;
  transition: transform .15s ease, border-color .2s ease, background-color .25s ease, box-shadow .25s ease;
}
.btn:hover{
  border-color: rgba(0,99,166,.26);
  transform: translateY(-1px);
  background: var(--surface-hover);
}
.btn:active{ transform: translateY(0); }
.btn.primary{
  background: color-mix(in oklab, var(--accent) 84%, #ffffff);
  border-color: color-mix(in oklab, var(--accent) 86%, #ffffff);
  color: #ffffff;
  box-shadow: none;
}
.btn.primary:hover{
  background: color-mix(in oklab, var(--accent-strong) 80%, #ffffff);
  border-color: color-mix(in oklab, var(--accent-strong) 82%, #ffffff);
}
.btn.orange{
  background: linear-gradient(180deg, #ffb36b, #ff8a3d);
  border-color: rgba(198, 91, 21, .42);
  color: #271203;
}
.btn.orange:hover{
  background: linear-gradient(180deg, #ffc07f, #ff9850);
  border-color: rgba(198, 91, 21, .52);
}
.btn.ghost{
  background: color-mix(in oklab, var(--surface-2) 86%, var(--surface-muted));
  box-shadow: none;
}
.btn.login-forgot{
  margin-top: 14px;
}
.btn.danger{
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn.danger:hover{
  filter: brightness(1.02);
}
.btn:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--accent);
}

.badge{
  border: 1px solid var(--border);
  background: var(--surface-muted);
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.badge.is-hidden{ display:none; }

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
@media (min-width: 820px){
  .grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.module{
  text-align:left;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(7,10,15,.35);
  cursor:pointer;
}
.module:hover{ border-color: rgba(0,99,166,.26); }
.module .title{ font-weight:700; margin-bottom:6px; }
.module .desc{ color: var(--muted); font-size:.92rem; }

.bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  height: 48px;
  width: min(720px, calc(100% - 18px));
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow:
    0 18px 38px rgba(3,33,56,.2),
    0 6px 16px rgba(3,33,56,.14);
  padding: 1px 6px;
  display:flex;
  gap: 8px;
  justify-content:center;
  align-items: center;
  z-index: 30;
  overflow: visible;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.bottom-nav.tutorial-elevate{
  z-index: 200;
}

.bottom-nav.is-hidden{
  display: none;
}

.app-footer{
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px 110px;
  text-align: center;
  color: var(--muted);
}
.footer-link{
  border: none;
  background: none;
  color: var(--muted);
  font-size: .9rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-link:hover{
  color: var(--text);
}
body.nav-hidden .app-footer{
  padding-bottom: 20px;
}

.nav-btn{
  flex:1;
  min-width: 0;
  border-radius: var(--radius-md);
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight:600;
  font-size: 14px;
  cursor:pointer;
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease, color .2s ease, box-shadow .25s ease;
}
.nav-btn:not(.is-active){
  opacity: .78;
}

.nav-btn.is-home{
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  padding: 0;
  background: var(--nav-bg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
  position: relative;
  transform-origin: center;
}
.nav-btn.is-home:hover{
  background: var(--surface-muted);
}

.nav-btn:hover{
  border-color: var(--border);
  background: var(--surface-muted);
}

.nav-btn.is-active{
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #032138;
  box-shadow: 0 14px 26px rgba(255,133,82,.28);
  transform: translateY(-1px);
}
.nav-btn.is-home.is-active{
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #032138;
  box-shadow: 0 18px 34px rgba(255,133,82,.32);
  animation: home-breathe-btn 5.2s ease-in-out infinite;
  transform: translateY(0);
}
.nav-btn.is-home.is-active::after{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius:999px;
  border:1px solid rgba(255,133,82,.38);
  pointer-events:none;
  animation: home-breathe 5.2s ease-in-out infinite;
}

.nav-icon{
  font-size: 14px;
  line-height: 1.1;
  font-weight: inherit;
  display:flex;
  align-items:center;
  justify-content:center;
}
.nav-icon-img{
  width: 20px;
  height: 20px;
  display:block;
  filter: var(--nav-icon-filter);
}
.nav-btn.is-home .nav-icon-img{
  width: 22px;
  height: 22px;
}

@media (max-width: 640px){
  .topbar{
    padding: 0 12px;
  }
  .topbar-left{
    gap:10px;
  }
  .brand{
    font-size: .74rem;
    letter-spacing: .05em;
  }
  .brand-logo{
    max-height: 82px;
    width: auto;
  }
  .tab-header{
    justify-content: center;
    gap: .85rem;
    padding-inline: 0;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .tab-btn{
    font-size: .88rem;
    letter-spacing: 0;
    padding: 8px 0 12px;
  }
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-badge{
  position:absolute;
  top:6px;
  right:16px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--accent);
  border: 2px solid var(--nav-bg);
  box-shadow: 0 6px 12px rgba(0,99,166,.16);
  display:none;
}

.nav-btn.has-unread .nav-badge{
  display:block;
}

body.nav-hidden .view{
  padding-bottom: 36px;
}

.video-wrap{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: #000;
}

video{
  width:100%;
  height:auto;
  display:block;
}

.slider{
  width:100%;
  accent-color: var(--accent);
}

.kv{
  display:flex; justify-content:space-between; color: var(--muted);
  font-size:.92rem;
}
hr{ border:none; border-top:1px solid var(--border); margin: 12px 0; }

.theme-switch{
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 8px;
  min-width: 86px;
  height: 38px;
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  box-shadow: var(--shadow-soft);
  transition: border-color .2s ease, background-color .25s ease, transform .15s ease;
}
.theme-switch:hover{
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.theme-switch:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--accent);
}
.switch-icon{
  font-size: 14px;
  line-height: 1;
  opacity: .7;
}
.theme-switch.is-light .switch-sun{ opacity: 1; }
.theme-switch:not(.is-light) .switch-moon{ opacity: 1; }
.switch-track{
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--switch-bg);
  display:flex;
  align-items:center;
  padding: 2px;
  transition: border-color .2s ease, background-color .25s ease;
}
.switch-thumb{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(18px);
  transition: transform .2s ease, background-color .25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.theme-switch.is-light .switch-thumb{
  transform: translateX(0);
}

@keyframes fade-up{
  from{
    opacity: 0;
    transform: translateY(6px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-breathe{
  0%, 100%{
    transform:scale(1);
    opacity:.32;
  }
  50%{
    transform:scale(1.12);
    opacity:.12;
  }
}

@keyframes home-breathe-btn{
  0%, 100%{
    transform:scale(1);
    box-shadow:
      0 18px 34px rgba(255,133,82,.34),
      0 0 0 0 rgba(255,133,82,.12);
  }
  50%{
    transform:scale(1.1);
    box-shadow:
      0 22px 42px rgba(255,133,82,.45),
      0 0 0 10px rgba(255,133,82,.12);
  }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}



.grid{
  display:grid;
  grid-template-columns: repeat(1, minmax(0,1fr));
  gap: 16px;
}
@media (min-width: 700px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 980px){
  .grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
.module-grid{
  column-gap: 1.1rem;
  row-gap: 1.1rem;
  grid-auto-rows: var(--module-card-height);
}
@media (min-width: 700px){
  .module-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 980px){
  .module-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (min-width: 1280px){
  .module-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}

.module{
  text-align:left;
  padding: 12px;
  min-height: 0;
  height: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor:pointer;
  position:relative;
  overflow:hidden;
  z-index: 10;
  outline-offset: 8px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.module[data-module="info"]{ order: -1; }

.module:hover{
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.module:focus-visible{
  outline: 2px solid rgba(0,92,153,.35);
  border-color: var(--border-strong);
}

.module::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:8px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: color-mix(in oklab, var(--modA, var(--accent-secondary)) 72%, var(--surface));
  z-index: 0;
  pointer-events:none;
}

.module::after{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  right:-70px;
  top:-70px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--modA, var(--accent-secondary)) 22%, transparent), transparent 70%);
  pointer-events:none;
  z-index:0;
}

.module > *{
  position:relative;
  z-index:1;
}

.module-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
}

.module-icon{
  display:inline-flex;
  flex:0 0 auto;
  font-size:1.65rem;
  opacity:.9;
  line-height:1;
}

.module-copy{
  min-width:0;
  flex:1 1 auto;
}

.module .title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.26;
  margin: 0;
  color: var(--text);
  hyphens: auto;
}
.module .desc{
  color: var(--muted);
  font-size: .94rem;
  margin-top: .24rem;
  line-height: 1.55;
  margin-bottom: 0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.module .desc strong{
  font-weight: 600;
}

[data-theme="light"] .module[data-module="info"]{ --modA: #a5c56c; }
[data-theme="light"] .module[data-module="med"]{ --modA: #2ba4a6; }
[data-theme="light"] .module[data-module="music"]{ --modA: #005c99; }
[data-theme="light"] .module[data-module="problem"]{ --modA: #ff8552; }
[data-theme="light"] .module[data-module="time"]{ --modA: #2ba4a6; }
[data-theme="light"] .module[data-module="social"]{ --modA: #ffdc4c; }
[data-theme="light"] .module[data-module="compassion"]{ --modA: #ca8adb; }
[data-theme="light"] .module[data-module="breath"]{ --modA: #e65640; }
[data-theme="light"] .module[data-module="yoga"]{ --modA: #2ba4a6; }

[data-theme="dark"] .module{
  background: #102434;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

[data-theme="dark"] .module::after{
  background: inherit;
}

[data-theme="dark"] .module .desc{
  color: var(--text);
}

.choice-list{ display:flex; flex-direction:column; gap:10px; }
.choice-btn{
  text-align:left;
  border-radius: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor:pointer;
  font-weight: 650;
  line-height: 1.25;
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .15s ease, background-color .25s ease, box-shadow .2s ease;
}
.choice-btn::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:6px;
  border-radius: 14px 14px 0 0;
  background: color-mix(in oklab, var(--accent-secondary) 38%, var(--surface-2));
  pointer-events:none;
}
.choice-btn::after{
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  right:-60px;
  top:-60px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent-secondary) 14%, transparent), transparent 70%);
  pointer-events:none;
}
.choice-btn > *{
  position: relative;
  z-index: 1;
}
.choice-btn:hover{
  border-color: var(--border-strong);
  background: color-mix(in oklab, var(--surface-hover) 85%, #c9dbe7);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.choice-btn .small{
  margin-top: 10px;
  display:block;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.55;
}
.choice-title{
  display:block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.24;
  font-weight: 600;
  color: var(--text);
}
.choice-subtitle{
  display:block;
  margin-top: 10px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.55;
  font-family: var(--font-body);
}


.curated-shell .choice-btn{
  padding: 12px 14px;
}
.curated-shell .choice-title{
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
}
.curated-shell .choice-subtitle,
.curated-shell .choice-btn .small{
  font-size: .88rem;
  margin-top: 8px;
}

.vas-wrap{ position:relative; }
.vas-wrap[data-touched="0"]::after{
  content:" ";
  position:absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align:center;
  color: rgba(255,255,255,.55);
  font-size:.92rem;
  pointer-events:none;
}

.vas-wrap[data-touched="0"] input[type="range"]{
  opacity: .45;
}
.vas-prompt{
  text-align: center;
  margin-top: 4px;
}
.vas-actions{
  margin-top: 18px;
}

.btn:disabled{
  opacity: .5;
  cursor:not-allowed;
}

.audio-card{
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.audio-hero{
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.audio-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  filter: saturate(1.05) contrast(1.02);
  user-select: none;
}

.audio-overlay{
  position:absolute;
  left:0; right:0; bottom:0;
  padding: 14px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
}

.audio-title{
  color: #fff;
  font-weight: 750;
  letter-spacing: .2px;
  font-size: 16px;
}

.audio-sub{
  color: #fff;
  opacity: .85;
  font-size: 12px;
  margin-top: 2px;
}

.audio-controls{
  display:flex;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 14px;
}

.audio-play{
  width: 52px;
  height: 44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 14px;
  font-weight: 800;
}

.audio-mid{
  flex: 1;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.audio-seek{
  width: 100%;
}

.audio-time{
  display:flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .85;
}

.audio-hint{
  padding: 0 12px 12px;
  opacity: .8;
}


.vas-wrap[data-touched="0"] .slider::-webkit-slider-thumb {
  opacity: 0;
}
.vas-wrap[data-touched="0"] .slider::-moz-range-thumb {
  opacity: 0;
}
.vas-wrap[data-touched="0"] .slider::-ms-thumb {
  opacity: 0;
}


.vas-wrap[data-touched="0"] .slider:focus {
  outline: none;
}


.segmented{
  display:flex;
  gap:8px;
  padding:3px;
  border-radius:999px;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  border:1px solid var(--border);
}
.seg-btn{
  flex:0 0 auto;
  border:none;
  background:transparent;
  padding:8px 16px;
  border-radius:999px;
  font-weight:700;
  color:var(--muted);
  transition: all .22s ease;
}
.seg-btn.is-active{
  color:#fff;
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent-strong) 76%, #ffffff), var(--accent));
  box-shadow: 0 5px 12px rgba(0,99,166,.22);
}

.cal{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.cal-head, .cal-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:6px;
}
.cal-wd{
  font-size:12px;
  color:var(--muted);
  text-align:center;
  font-weight:600;
}
.cal-cell{
  border:none;
  border-radius:14px;
  padding:8px 6px 10px;
  min-height:58px;
  background:transparent;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
}
.cal-cell.empty{
  border:none;
  background:transparent;
}
.cal-cell.is-today{
  background: color-mix(in oklab, var(--surface) 88%, transparent);
}
.cal-day{
  font-size:26px;
  font-weight:650;
  line-height:1;
}
.cal-dot-wrap{
  min-height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cal-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  background: color-mix(in oklab, var(--muted) 26%, transparent);
}
.cal-dot.is-low{
  width:14px;
  height:14px;
  background:#d7bf7e;
}
.cal-dot.is-mid{
  width:18px;
  height:18px;
  background:#d8b069;
  box-shadow: inset 0 0 0 3px #cc9473;
}
.cal-dot.is-high{
  width:20px;
  height:20px;
  background:#c98766;
  box-shadow: inset 0 0 0 4px #d8ba74;
}
.cal-dot.is-today{
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--text) 70%, transparent);
}

@media (max-width: 620px){
  .cal-head, .cal-grid{ gap:6px; }
  .cal-wd{ font-size:11px; }
  .cal-cell{
    min-height:52px;
    padding:4px 3px 6px;
    border-radius:14px;
  }
  .cal-day{ font-size:22px; }
}

.week-dashboard{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.week-head h3{
  margin:0;
  font-size:2rem;
  line-height:1.15;
  font-family: var(--font-display);
}
.week-sub{
  margin-top:4px;
  color:var(--muted);
}
.week-days{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}
.week-day-col{ text-align:center; }
.week-day-wd{
  font-size:11px;
  color:var(--muted);
  margin-bottom:4px;
}
.week-day-num{ font-weight:700; }
.week-day-dot-wrap{
  margin-top:4px;
  min-height:20px;
  display:flex;
  justify-content:center;
  align-items:center;
}
.week-day-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background: color-mix(in oklab, var(--muted) 26%, transparent);
}
.week-day-dot.is-low{
  width:14px;
  height:14px;
  background:#d7bf7e;
}
.week-day-dot.is-mid{
  width:18px;
  height:18px;
  background:#d8b069;
  box-shadow: inset 0 0 0 3px #cc9473;
}
.week-day-dot.is-high{
  width:20px;
  height:20px;
  background:#c98766;
  box-shadow: inset 0 0 0 4px #d8ba74;
}
.week-day-dot.is-today{
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--text) 70%, transparent);
}

.week-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.week-metric{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
  padding:12px;
  text-align:center;
}
.week-metric-value{
  font-size:1.35rem;
  font-weight:700;
}
.week-metric-label{
  font-size:.8rem;
  color:var(--muted);
}

.week-cards{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.week-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface-2);
  padding:12px 14px;
}
.week-card-top{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}
.week-card-emoji{ font-size:1.15rem; }
.week-card-title{ font-size:1.02rem; }
.week-card-bar{
  margin-top:8px;
  height:7px;
  border-radius:999px;
  background:rgba(0,0,0,.08);
  overflow:hidden;
}
.week-card-bar span{
  display:block;
  height:100%;
  border-radius:999px;
  background:#f59a43;
}
.week-card-metrics{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:.9rem;
  color:var(--text);
}

@media (max-width: 700px){
  .week-head h3{ font-size:1.7rem; }
  .week-metrics{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.feedback-block{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-line{
  font-size: 18px;
  line-height: 1.5;
}

.feedback-number{
  font-size: 26px;
  font-weight: 700;
  margin: 0 4px;
}

.feedback-highlight{
  font-weight: 600;
}

.feedback-muted{
  font-size: 14px;
  opacity: 0.6;
  margin-left: 4px;
}


.overview-grid{
  display:grid;
  grid-template-columns: repeat(1, minmax(0,1fr));
  gap:12px;
}
@media (min-width: 720px){
  .overview-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
.overview-card{
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}
.overview-label{
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  line-height:1.35;
}
.overview-value{
  font-size: 1.3rem;
  font-weight: 800;
  line-height:1.2;
  min-width:0;
  overflow-wrap:anywhere;
}
.overview-sub{
  font-size: .9rem;
  color: var(--muted);
}
.mini-chart{
  margin-top: 6px;
  display:flex;
  gap:6px;
  height: 8px;
  background: var(--nav-pill);
  border-radius: 999px;
  overflow:hidden;
}
.mini-chart.is-muted{
  opacity: .35;
}
.mini-bar{
  height: 100%;
  border-radius: 999px;
}
.mini-bar.pre{
  background: linear-gradient(90deg, #009EE0, #0063A6);
}
.mini-bar.post{
  background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.05));
}


.detail-section{
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.detail-grid{
  display:grid;
  grid-template-columns: repeat(1, minmax(0,1fr));
  gap:10px;
}
@media (min-width: 720px){
  .detail-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.detail-card{
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}
.detail-label{
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.detail-value{
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 6px;
}
.detail-sub{
  margin-top: 4px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
.detail-note{
  font-size: .85rem;
  color: var(--muted);
}
.detail-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.detail-row{
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:space-between;
}
.detail-row-main{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
}
.detail-row-title{
  font-weight: 700;
}
.detail-row-sub{
  font-size: .85rem;
  color: var(--muted);
}
.detail-bar{
  height: 6px;
  background: var(--nav-pill);
  border-radius: 999px;
  flex: 0 0 120px;
  overflow:hidden;
}
.detail-bar-fill{
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
}
.detail-chip{
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--nav-pill);
  border: 1px solid var(--border);
  font-size: .85rem;
  white-space: nowrap;
}


.chat-section{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.chat-notice{
  padding:10px 12px;
  border:1px solid var(--border-strong);
  border-radius:12px;
  background: var(--nav-pill);
  color: var(--text);
}
.chat-meta{
  opacity:.85;
}
.chat-messages,
.admin-chat-messages{
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 16px;
  padding: 12px;
  max-height: 360px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-empty{
  padding:8px 10px;
  opacity:.8;
}
.chat-msg{ display:flex; }
.chat-user{ justify-content:flex-end; }
.chat-admin{ justify-content:flex-start; }
.chat-bubble{
  max-width: 82%;
  border:1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--surface);
}
.chat-user .chat-bubble{
  background: color-mix(in oklab, var(--surface-hover) 80%, #c7dae8);
  border-color: color-mix(in oklab, var(--border-strong) 70%, #99b2c6);
}
.chat-who{
  font-size: 12px;
  opacity: .7;
  margin-bottom: 4px;
}
.chat-text{
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-time{
  font-size: 11px;
  opacity: .6;
  margin-top: 6px;
  text-align: right;
}
.chat-admin .chat-time{
  text-align: left;
}

.stagger > *{
  animation: fade-up .4s ease both;
}

.btn:active,
.choice-btn:active,
.module:active,
.nav-btn:active,
.curated-item:active{
  transform: translateY(0) scale(0.98);
}

.chat-page-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.chat-page-messages{
  max-height: min(60vh, 560px);
}
.chat-input{
  min-height: 96px;
}
.chat-actions{
  justify-content:flex-end;
}

@media (max-width: 520px){
  .chat-page-messages{
    max-height: 64vh;
  }
}


.admin-chat{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:12px;
  align-items: start;
}
.admin-chat-threads{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: 420px;
  overflow:auto;
  padding-right:4px;
}
.admin-chat-main{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.admin-chat-header{
  font-weight:600;
}
.admin-thread{
  width:100%;
  text-align:left;
  border: 1px solid var(--border);
  background: var(--nav-pill);
  border-radius: 16px;
  padding: 12px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:6px;
  transition: border-color .2s ease, transform .15s ease, background-color .25s ease, box-shadow .25s ease;
}
.admin-thread:hover{
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.admin-thread.is-selected{
  border-color: rgba(0,99,166,.34);
  box-shadow: 0 0 0 1px rgba(0,99,166,.12) inset;
}
.admin-thread.needs-reply{
  border-color: rgba(255,133,82,.42);
}
.admin-thread-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.thread-badge{
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,220,76,.72);
  color: #9a6d00;
  background: rgba(255,220,76,.2);
}
.admin-thread-preview{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.admin-thread-time{
  font-size: 11px;
}

@media (max-width: 900px){
  .admin-chat{
    grid-template-columns: 1fr;
  }
  .admin-chat-threads{
    max-height: none;
  }
}


