@font-face {
  font-family: 'Studio Sans';
  src: url('./fonts/studio-sans.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Studio Display';
  src: url('./fonts/studio-display.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --home-canvas: #f7f6f0;
  --home-paper: #fdfcf8;
  --home-ink: #292331;
  --home-muted: #655e68;
  --home-line: #dedad2;
  --home-accent: #6a4784;
  --home-serif: 'Studio Display', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --home-sans: 'Studio Sans', 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
  font-family: var(--home-sans);
  color: var(--home-ink);
  background: var(--home-canvas);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--home-canvas); font-family: var(--home-sans); }
button, select, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #8f68ad; outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.app-header { border-bottom: 1px solid var(--home-line); background: var(--home-paper); }
.header-inner { width: min(100% - 96px, 1132px); height: 77px; margin: auto; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 10px; padding: 0; border: 0; background: transparent; color: #302339; text-decoration: none; font-family: var(--home-serif); font-size: 27px; font-weight: 400; letter-spacing: -.055em; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; flex-shrink: 0; }
.brand-mark svg, svg.brand-mark { width: 37px; height: 37px; }
.topnav { display: flex; align-items: center; gap: 5px; margin: 0 auto; }
.topnav button, .mobile-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 25px; background: transparent; color: #655d69; font: 500 13px/1 var(--home-sans); }
.topnav button { min-height: 38px; padding: 0 16px; }
.topnav button svg, .mobile-nav button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.topnav button:hover, .profile-button:hover { background: #efebe9; }
.topnav button:is(.active, .is-active, [aria-current="page"], [aria-selected="true"], [data-active="true"]) { color: #50305f; background: #eee7f0; }
.profile-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 38px; max-width: 200px; border-radius: 24px; border: 1px solid #ddd6db; padding: 4px 12px 4px 5px; color: #3e3245; background: #fcfaf8; font: 600 13px/1 var(--home-sans); }
.profile-button > svg { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: #e8dfed; color: #6a4a7b; }
.profile-button > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-button :is(.avatar,.profile-avatar,.profile-initial) { display: inline-grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; background: #e4d9e9; color: #543960; }
.mobile-nav { display: none; }

.home-studio { width: min(100% - 96px, 1132px); margin: 0 auto; padding: clamp(40px, 4.5vw, 62px) 0 42px; }
.home-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 29px; }
.home-date, .home-intro h1, .home-intro-text, .home-mode h2, .home-mode p, .home-section-head h2, .home-stat p { margin: 0; }
.home-date { display: flex; align-items: center; gap: 10px; color: #6b5376; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; }
.home-mobile-xp { display: none; }
.home-date-rule { width: 25px; height: 2px; border-radius: 2px; background: #86629b; }
.home-intro h1 { margin: 10px 0 9px; color: #302837; font: 400 clamp(55px, 5.8vw, 78px)/.99 var(--home-serif); letter-spacing: -.062em; }
.home-intro-text { color: var(--home-muted); font-size: clamp(14px, 1.35vw, 16px); line-height: 1.4; }
.home-level-control { flex-shrink: 0; padding-bottom: 2px; }
.home-level-label { display: block; margin: 0 0 6px 2px; color: var(--home-muted); font-size: 11px; font-weight: 550; }
.home-level-field { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 43px; padding: 0 12px; box-shadow: 0 1px 2px #4b38450a; border: 1px solid #d7d0d5; border-radius: 10px; background: var(--home-paper); }
.home-level-field > svg { flex-shrink: 0; width: 17px; height: 17px; color: #6a5078; }
.home-level-field > svg:last-of-type { width: 14px; color: #796f7d; margin-left: 4px; }
.home-level-field > span { font-size: 13px; font-weight: 550; }
.home-level-field i { margin: 0 6px; color: #908294; font-style: normal; }
.home-level-field select { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.home-level-field:hover { border-color: #a898b1; }
.home-level-field:focus-within { outline: 3px solid #a987bd; outline-offset: 2px; }
.home-preview-note { color: var(--home-muted); font-size: 11px; margin: 6px 0 0; }
.home-modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 19px; }
.home-mode { position: relative; isolation: isolate; min-width: 0; overflow: hidden; border: 1px solid transparent; border-radius: 21px; min-height: 276px; padding: 25px 29px 24px; }
.home-mode--speak { color: #fff7ff; background: radial-gradient(ellipse at 90% 24%, #53385f 0%, transparent 64%), linear-gradient(117deg,#2c223e 0%,#3b294b 66%,#443052 100%); border-color: #402d4d; }
.home-mode--pop { color: #1e403a; background: radial-gradient(ellipse at 86% 22%, #c6e9da 0%, transparent 70%), linear-gradient(115deg,#dcefe4 15%,#d0e8dc 70%,#c1e1d3 100%); border-color: #c4dacd; }
.home-mode-content { position: relative; z-index: 1; max-width: 63%; }
.home-mode-art { pointer-events: none; user-select: none; position: absolute; width: min(49%, 270px); height: 79%; right: 2.2%; top: 9%; object-fit: contain; z-index: -1; }
.home-mode-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1; font-weight: 650; letter-spacing: .125em; text-transform: uppercase; }
.home-mode-type svg { width: 15px; height: 15px; }
.home-mode--speak .home-mode-type { color: #e2caef; }
.home-mode--pop .home-mode-type { color: #376350; }
.home-mode h2 { margin: 19px 0 6px; font: 400 clamp(52px, 5.1vw, 73px)/.96 var(--home-serif); letter-spacing: -.07em; }
.home-mode p { font-size: 16px; font-weight: 400; line-height: 1.35; text-wrap: pretty; }
.home-mode--speak p { color: #eddfef; }
.home-mode--pop p { color: #36584c; }
.home-play { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; margin-top: 25px; padding: 0 19px 0 16px; border: 0; border-radius: 24px; font: 650 14px/1 var(--home-sans); }
.home-play svg { width: 12px; height: 12px; }

.home-mode--speak .home-play { background: #f6eff8; color: #3e2b4c; }
.home-mode--speak .home-play:hover { background: #fffaff; }
.home-mode--pop .home-play { background: #203f34; color: #fcfbf3; }
.home-mode--pop .home-play:hover { background: #2b5142; }
.home-play:focus-visible { outline-color: currentColor; outline-offset: 4px; }
.home-mode-best { position: absolute; right: 23px; bottom: 17px; font-size: 10px; opacity: .8; }
.home-mode-best strong { font-weight: 700; }
.home-progress { margin-top: 36px; }
.home-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.home-section-head h2 { font: 400 36px/1.08 var(--home-serif); letter-spacing: -.05em; }
.home-text-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 8px 0 8px 8px; color: #654774; font: 650 14px/1 var(--home-sans); }
.home-text-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-text-action svg { width: 16px; height: 16px; }
.home-summary { display: grid; grid-template-columns: 1.03fr 1fr .82fr; border: 1px solid var(--home-line); border-radius: 16px; background: #fbfaf6; overflow: hidden; }
.home-stat { min-width: 0; position: relative; padding: 19px 24px 20px; }
.home-stat:not(:first-child)::before { content: ''; position: absolute; width: 1px; top: 20px; bottom: 20px; left: 0; background: var(--home-line); }
.home-stat-label { display: flex; align-items: center; gap: 8px; color: #6c616e; font-size: 14px; font-weight: 550; line-height: 17px; }
.home-stat-label svg { width: 16px; height: 16px; color: #756182; }
.home-stat .home-stat-figure { margin: 8px 0; color: #3a2c41; font: 400 33px/1.05 var(--home-serif); letter-spacing: -.045em; }
.home-goal-denom { font: 500 14px/1 var(--home-sans); letter-spacing: -.025em; color: var(--home-muted); }
.home-days { display: flex; gap: clamp(7px, 1.1vw, 16px); margin: 0; padding: 0; list-style: none; }
.home-day { display: grid; justify-items: center; gap: 3px; color: #6a626e; font-size: 11px; font-weight: 550; line-height: 1; }
.home-day-mark { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #eae6e9; border: 1px solid #e2dbe1; }
.home-day.is-today .home-day-mark { border: 1.6px solid #9377a4; }
.home-day.is-complete .home-day-mark { background: #725784; border: 1px solid #725784; color: #fff; }
.home-day-mark svg { width: 12px; height: 12px; }
.home-stat .home-milestone-name { margin: 10px 0 10px; font: 400 clamp(22px,2vw,29px)/1.08 var(--home-serif); letter-spacing: -.042em; }
.home-milestone-bars { display: flex; gap: 4px; width: min(100%,180px); margin-top: 4px; }
.home-milestone-bars i { flex: 1; height: 4px; border-radius: 4px; background: #e4dce7; }
.home-milestone-bars i.on { background: #826296; }
.home-stat .home-stat-note { color: var(--home-muted); font: 400 12px/1.45 var(--home-sans); margin-top: 8px; }

@media (min-width: 1440px) {
  .home-mode { min-height: 284px; padding: 28px 32px; }
  .home-mode h2 { margin-top: 22px; }
}
@media (max-width: 990px) {
  .header-inner, .home-studio { width: calc(100% - 56px); }
  .home-mode { padding: 23px; min-height: 244px; }
  .home-mode h2 { margin-top: 17px; }
  .home-mode-art { right: 1%; width: 48%; }
  .home-modes { gap: 15px; }
  .home-stat { padding: 18px; }
  .home-days { gap: 8px; }
}
@media (max-width: 710px) {
  .header-inner, .home-studio { width: calc(100% - 36px); }
  .header-inner { height: 60px; gap: 10px; justify-content: space-between; }
  .brand { font-size: 25px; gap: 7px; }
  .brand-mark, .brand-mark svg, svg.brand-mark { width: 31px; height: 31px; }
  .topnav { display: none; }
  .profile-button { max-width: 52%; }
  .mobile-nav { position: fixed; z-index: 20; left: 0; bottom: 0; width: 100%; display: flex; align-items: stretch; justify-content: space-around; gap: 4px; background: #fcfbf8; border-top: 1px solid #ded8db; padding: 4px max(8px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  .mobile-nav button { flex: 1; flex-direction: column; min-height: 49px; padding: 4px; border-radius: 8px; gap: 4px; font-size: 10.5px; }
  .mobile-nav button svg { width: 19px; height: 19px; }
  .mobile-nav button:is(.active, .is-active, [aria-current="page"], [aria-selected="true"], [data-active="true"]) { color: #664479; font-weight: 700; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .home-studio { padding: 28px 0 24px; }
  .home-intro { margin-bottom: 20px; gap: 12px; }
  .home-intro h1 { font-size: clamp(48px,8.8vw,61px); margin: 9px 0 7px; }
  .home-intro-text { font-size: 14px; }
  .home-level-control { align-self: flex-end; }
  .home-level-field { min-height: 41px; }
  .home-modes { gap: 12px; }
  .home-mode { border-radius: 18px; padding: 19px; }
  .home-mode-content { max-width: 68%; }
  .home-mode-art { width: 50%; }
  .home-mode p { font-size: 15px; }
  .home-mode-best { right: 14px; bottom: 10px; font-size: 9px; }
  .home-section-head h2 { font-size: 31px; }
  .home-progress { margin-top: 28px; }
  .home-stat { padding: 16px; }
  .home-stat .home-milestone-name { font-size: 22px; }
  .home-days { gap: 5px; }
  .home-day-mark { width: 14px; height: 14px; }
}
@media (max-width: 600px) {
  .home-intro { display: block; }
  .home-mobile-xp { display: inline-flex; margin-left: auto; padding: 4px 9px; border-radius: 20px; background: #ece4ef; color: #614575; letter-spacing: .025em; }
  .home-level-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; padding: 0; }
  .home-level-label { margin: 0; font-size: 12px; }
  .home-level-field { border-radius: 9px; min-height: 44px; gap: 7px; }
  .home-level-field > span { font-size: 12px; }
  .home-preview-note { flex-basis: 100%; margin: -2px 0 0; }
  .home-modes { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .home-mode { min-height: 190px; padding: 20px; }
  .home-mode-content { max-width: 61%; }
  .home-mode h2 { margin: 10px 0 5px; font-size: 55px; }
  .home-mode-art { width: min(49%, 223px); height: 90%; right: 2.4%; top: 2%; }
  .home-play { min-height: 44px; margin-top: 15px; font-size: 14px; }
  .home-summary { grid-template-columns: 1fr 1fr; }
  .home-stat--week { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--home-line); }
  .home-stat--week .home-stat-figure { grid-column: 1; margin: 5px 0 0; }
  .home-days { grid-column: 2; grid-row: 1 / 3; gap: 6px; }
  .home-day-mark { width: 18px; height: 18px; }
  .home-stat:nth-child(2)::before { display: none; }
  .home-stat { padding: 15px; }
  .home-stat .home-milestone-name { font-size: 22px; }
  .home-stat .home-stat-note { font-size: 11px; }
  .home-stat .home-stat-figure { font-size: 30px; }
  .home-goal-denom { font-size: 12.5px; }
}
@media (max-width: 350px) {
  .header-inner, .home-studio { width: calc(100% - 28px); }
  .home-mode { padding: 16px; }
  .home-mode-content { max-width: 64%; }
  .home-mode-art { right: -1%; }
  .home-days { gap: 4px; }
  .home-day-mark { width: 14px; height: 14px; }
  .home-stat { padding: 11px; }
  .home-summary { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-play svg { transition: none; }
}
