/* Purple direction approved in the design review. Safe-area ownership stays with the app shell. */
.purple-app {
  --paper:#fff;
  --surface:#fff;
  --surface-raised:#fff;
  --surface-soft:#f6f3ff;
  --plum:#6d3df5;
  --plum-soft:#f0eaff;
  --text:#211a35;
  --muted:#706980;
  --line:#eae5f4;
  --line-strong:#d9cfee;
  --sage:#24824d;
  --sage-soft:#e9f7ee;
  --shadow:0 10px 32px -22px rgb(55 29 115 / 18%);
  background:#fff;
  color:var(--text);
}
.purple-app .sidebar { background:#fcfbff; border-color:var(--line); }
.purple-app .brand-name { color:#35205e; }
.purple-app .brand-name span { color:var(--plum); }
.purple-app .nav-item { color:var(--muted); min-height:48px; }
.purple-app .nav-item:hover { background:#f2ecff; color:#5930d1; }
.purple-app .nav-item.active { background:#eee7ff; color:#6030e2; }
.purple-app .nav-item.active .nav-count { background:#e3d6ff; color:#6030e2; }
.purple-app .page-header h1 { color:var(--text); font-weight:750; }
.purple-app :focus-visible { outline:3px solid #a68bff; outline-offset:3px; }
.purple-app .button { min-height:48px; }
.purple-app .button:not(.secondary):not(.ghost):not(.danger):not(.purple-text-button) { border-color:transparent; }

.purple-learning { max-width:1120px; margin:0 auto; font-size:16px; line-height:1.5; }
.purple-learning h1,.purple-learning h2,.purple-learning h3 { color:#211a35; font-family:var(--sans); font-weight:750; letter-spacing:-.4px; }
.purple-learning h1 { font-size:32px; line-height:1.2; }
.purple-learning h2 { font-size:21px; line-height:1.3; }
.purple-learning h3 { font-size:18px; }
.purple-learning p { color:var(--muted); }
.purple-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:28px; }
.purple-heading p { margin-top:7px; font-size:15px; }
.purple-heading-action { flex-shrink:0; }
.purple-level { display:inline-block; padding:8px 12px; background:#f5f1ff; color:#6241a8; font-weight:650; font-size:13px; border-radius:10px; }
.purple-eyebrow { font-size:13px; line-height:1.4; font-weight:650; color:#6d3df5; }
.purple-home-grid,.purple-profile-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr); align-items:start; gap:32px; }
.purple-main-stack,.purple-side-stack { min-width:0; display:grid; gap:28px; }
.purple-next-lesson { display:flex; align-items:center; justify-content:space-between; gap:24px; background:#f3edff; border:1px solid #eadfff; border-radius:20px; padding:26px; }
.purple-next-lesson h2 { margin:9px 0; font-size:26px; line-height:1.25; }
.purple-next-lesson p { font-size:14px; color:#665a80; }
.purple-next-copy { flex:1; min-width:0; }
.purple-next-lesson .button { margin-top:20px; }
.purple-next-symbol { width:68px; height:68px; flex:0 0 68px; border-radius:18px; background:#e6daff; display:grid; place-items:center; color:#6d3df5; }
.purple-next-symbol svg { width:32px; height:32px; }
.purple-learning .purple-primary { min-height:50px; border:0; border-radius:12px; background:#6d3df5; color:#fff; font-size:15px; font-weight:700; padding:13px 18px; gap:9px; }
.purple-learning .purple-primary:hover { background:#5b2bdd; }
.purple-learning .purple-primary:disabled { opacity:.55; }
.purple-learning .purple-compact { background:#6d3df5; color:#fff; min-height:48px; border-radius:11px; padding:10px 17px; font-weight:650; }
.purple-learning .purple-text-button { background:transparent; border:0; padding:10px 0; min-height:48px; color:#6637e3; box-shadow:none; font-size:14px; text-align:left; justify-content:flex-start; }
.purple-learning .purple-text-button:hover { color:#4f21bd; background:transparent; }
.purple-daily { border:1px solid #e9e1f6; border-radius:16px; padding:18px 20px; background:#fff; }
.purple-daily-top { display:flex; align-items:center; gap:14px; }
.purple-daily h2 { font-size:17px; }
.purple-daily p { font-size:13px; margin-top:3px; }
.purple-progress { display:block; width:100%; height:6px; margin-top:16px; border:0; border-radius:8px; overflow:hidden; background:#ece6f8; accent-color:#6d3df5; }
.purple-progress::-webkit-progress-bar { background:#ece6f8; border-radius:8px; }
.purple-progress::-webkit-progress-value { background:#6d3df5; border-radius:8px; }
.purple-progress::-moz-progress-bar { background:#6d3df5; border-radius:8px; }
.purple-hint { font-size:13px; line-height:1.55; color:var(--muted); }
.purple-daily>.purple-hint { margin-top:12px; }
.purple-section { min-width:0; }
.purple-section-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:15px; }
.purple-section-heading>span { color:var(--muted); font-size:13px; flex-shrink:0; }
.purple-route-list { border:1px solid #e9e3f2; border-radius:15px; overflow:hidden; }
.purple-route-row { display:flex; width:100%; align-items:center; gap:14px; border:0; border-bottom:1px solid #eee8f5; background:#fff; min-height:78px; padding:15px 17px; text-align:left; }
.purple-route-row:last-child { border-bottom:0; }
.purple-route-row:hover { background:#faf8ff; }
.purple-route-row>svg:last-child,.purple-lesson-row>svg:last-child { width:18px; height:18px; color:#9181ae; flex:0 0 18px; }
.purple-route-icon { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border-radius:11px; color:#7545eb; background:#f3edff; }
.purple-route-icon svg { width:21px; height:21px; }
.purple-row-copy { display:grid; min-width:0; flex:1; gap:3px; }
.purple-row-copy strong { font-weight:650; font-size:15px; color:#2c2340; overflow-wrap:anywhere; }
.purple-row-copy small { color:var(--muted); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.purple-small-portrait { flex:0 0 44px; width:44px; height:44px; border-radius:50%; object-fit:cover; object-position:50% 26%; }
.purple-skills { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.purple-skill { border:1px solid #ece5f7; border-radius:14px; background:#fff; min-height:112px; padding:15px 8px; display:flex; flex-direction:column; align-items:center; gap:7px; }
.purple-skill:hover { background:#f9f6ff; border-color:#d8c8ff; }
.purple-skill>span { color:#7448e9; margin-bottom:2px; }
.purple-skill>span svg { width:23px; height:23px; }
.purple-skill strong { font-size:13px; font-weight:650; }
.purple-skill small { color:var(--muted); font-size:11px; }
.purple-goal { border:1px solid #eae2f6; border-radius:17px; padding:22px; background:#fcfaff; }
.purple-goal h2 { font-size:20px; margin-top:10px; overflow-wrap:anywhere; }
.purple-goal p { margin-top:10px; font-size:14px; }
.purple-goal .button { margin-top:7px; }
.purple-lesson-list { display:grid; gap:0; }
.purple-lesson-row { display:flex; align-items:center; gap:12px; min-height:84px; width:100%; text-align:left; background:#fff; border:0; border-bottom:1px solid #eee8f5; padding:14px 0; }
.purple-lesson-row:last-child { border-bottom:0; }
.purple-lesson-step { display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border:1px solid #e9e0f9; border-radius:50%; background:#f8f5ff; color:#7953c3; font-size:13px; font-weight:650; }
.purple-lesson-row.is-complete .purple-lesson-step { border-color:#d9f0df; background:#e9f7ee; color:#24824d; }
.purple-lesson-row.is-next .purple-lesson-step { background:#6d3df5; color:#fff; border-color:#6d3df5; }

.purple-practice { max-width:900px; }
.purple-practice-start { max-width:650px; display:grid; gap:17px; margin-bottom:32px; }
.purple-teacher-hero { display:flex; align-items:center; gap:22px; }
.purple-teacher-hero>img { width:128px; height:142px; flex:0 0 128px; border-radius:17px; object-fit:cover; object-position:50% 20%; }
.purple-teacher-hero h2 { font-size:30px; margin:6px 0; }
.purple-teacher-hero p { font-size:14px; max-width:230px; }
.purple-talk-start { width:100%; }
.purple-tutor-choice { border:0; padding:0; margin:0; min-width:0; }
.purple-tutor-choice legend { color:#5c536d; font-size:13px; font-weight:600; margin-bottom:10px; padding:0; }
.purple-tutor-choice>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.purple-tutor-option { display:flex; align-items:center; gap:10px; position:relative; border:1px solid #e9e1f4; padding:9px 12px; min-height:72px; border-radius:13px; cursor:pointer; color:#292139; }
.purple-tutor-option.is-selected { background:#f5f0ff; border-color:#9d7cf4; }
.purple-tutor-option:focus-within { outline:3px solid #c2aaff; outline-offset:2px; }
.purple-tutor-option input { width:18px; height:18px; flex:0 0 18px; accent-color:#6d3df5; }
.purple-tutor-option img { width:40px; height:45px; border-radius:9px; object-fit:cover; object-position:50% 20%; }
.purple-tutor-option>span { display:grid; gap:1px; min-width:0; }
.purple-tutor-option strong { color:#332642; font-size:14px; }
.purple-tutor-option small { font-size:11px; color:var(--muted); }
.purple-resume-chat { border:1px solid #eee7f5; border-radius:13px; }
.purple-practice>.purple-section { margin-top:32px; }
.purple-practice-modes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.purple-mode { display:flex; flex-direction:column; gap:10px; align-items:center; justify-content:center; min-height:86px; border:1px solid #e9e2f4; border-radius:14px; padding:12px 6px; background:#fff; color:#635573; }
.purple-mode svg { width:23px; height:23px; }
.purple-mode span { font-size:13px; font-weight:600; }
.purple-mode.is-selected { background:#f1eaff; border-color:#ad8df7; color:#6331db; }
.purple-scenarios { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.purple-scenario { display:flex; align-items:center; gap:13px; padding:17px 0; min-height:91px; text-align:left; border:0; border-bottom:1px solid #eee8f5; background:#fff; }
.purple-scenario>img { width:53px; height:53px; flex:0 0 53px; border-radius:10px; object-fit:cover; }
.purple-scenario>svg:last-child { flex:0 0 16px; width:16px; height:16px; color:#9a8aae; }
.purple-scenario-level { color:#8c789f; font-size:11px; flex-shrink:0; }
.purple-scenario:hover { background:#fcfaff; }

.purple-vocabulary { max-width:960px; }
.purple-learning .purple-add-word { min-height:48px; background:#f0e9ff; color:#6535d8; border:0; padding:12px 15px; border-radius:12px; font-size:14px; }
.purple-vocab-review { display:flex; justify-content:space-between; align-items:center; gap:24px; background:#f5f0ff; border:1px solid #e8ddfd; padding:22px 24px; border-radius:18px; margin-bottom:30px; }
.purple-vocab-review h2 { margin-top:6px; font-size:24px; }
.purple-vocab-review p { margin-top:6px; font-size:13px; }
.purple-vocab-content { max-width:900px; }
.purple-vocab-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.purple-search { display:flex; align-items:center; gap:11px; min-height:50px; border:1px solid #dfd5ef; border-radius:12px; background:#fff; padding:0 14px; }
.purple-search>svg { flex:0 0 19px; color:#9a8aaf; }
.purple-search input[type=search] { background:transparent; border:0; border-radius:0; padding:12px 0; box-shadow:none; font-size:16px; width:100%; }
.purple-search:focus-within { border-color:#a382eb; outline:2px solid #eee6ff; }
.purple-vocab-filters { display:flex; gap:7px; overflow-x:auto; padding:12px 0; scrollbar-width:thin; margin-bottom:3px; }
.purple-vocab-filter { border:0; border-radius:10px; padding:11px 14px; min-height:48px; white-space:nowrap; color:#675773; font-size:14px; background:#f6f3fa; }
.purple-vocab-filter.is-selected { color:#fff; background:#6d3df5; }
.purple-word-list { display:grid; grid-template-columns:1fr; }
.purple-word-row { display:grid; grid-template-columns:64px minmax(0,1fr) 48px; gap:14px; align-items:start; padding:16px 0; border-bottom:1px solid #ece6f3; }
.purple-word-image { width:64px; height:64px; border-radius:11px; overflow:hidden; background:#f6f3fb; display:grid; place-items:center; color:#b2a2c7; }
.purple-word-image img { width:100%; height:100%; object-fit:contain; }
.purple-word-image>svg { width:25px; height:25px; }
.purple-word-detail { min-width:0; }
.purple-word-detail>summary { list-style:none; display:grid; gap:2px; cursor:pointer; min-height:64px; padding:0 0 1px; }
.purple-word-detail>summary::-webkit-details-marker { display:none; }
.purple-word-detail>summary:focus-visible { border-radius:5px; }
.purple-word-detail>summary strong { display:block; font-size:18px; line-height:1.35; letter-spacing:-.25px; color:#292139; overflow-wrap:anywhere; }
.purple-word-detail>summary>span { display:block; color:#736781; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.purple-word-detail>summary>small { font-size:11px; color:#94869f; margin-top:3px; }
.purple-word-sound { display:grid; place-items:center; width:48px; min-height:48px; border:0; border-radius:12px; background:#f7f3ff; color:#7541ec; margin-top:7px; }
.purple-word-sound:hover { background:#ece1ff; }
.purple-word-sound svg { width:21px; height:21px; }
.purple-word-expanded { display:grid; gap:10px; padding-top:13px; }
.purple-word-kind { color:#9469b5; font-size:11px; }
.purple-word-example { font-size:15px; color:#42364f !important; }
.purple-credit { font-size:11px; color:#8f829c !important; }
.purple-credit a { text-decoration:underline; text-underline-offset:2px; }
.purple-word-tools { display:flex; flex-wrap:wrap; gap:10px 18px; }
.purple-learning .purple-delete-word { color:#a15166; }
.purple-dictionary-disclosure { border-top:1px solid #ece5f5; margin-top:28px; }
.purple-dictionary-disclosure>summary { min-height:64px; display:flex; align-items:center; gap:10px; color:#67547f; font-size:14px; cursor:pointer; list-style:none; }
.purple-dictionary-disclosure>summary::-webkit-details-marker { display:none; }
.purple-dictionary-disclosure>summary>svg:last-child { margin-left:auto; }
.purple-dictionary-disclosure .card { box-shadow:none; border-color:#e9e1f4; background:#fcfaff; border-radius:14px; padding:20px; }
.purple-dictionary-disclosure h2 { font-size:18px; }
.purple-empty { text-align:center; padding:30px 16px; display:grid; justify-items:center; gap:12px; }
.purple-empty p { max-width:370px; font-size:14px; }

.purple-settings-link { display:grid; place-items:center; width:48px; height:48px; background:#f5f0ff; border:0; color:#6d3df5; padding:0; border-radius:13px; }
.purple-profile-identity { display:flex; gap:17px; align-items:center; padding:0 0 27px; margin-bottom:25px; border-bottom:1px solid #eee6f6; }
.purple-profile-initial { width:64px; height:64px; flex:0 0 64px; border-radius:50%; display:grid; place-items:center; color:#6d3df5; background:#eee6ff; font-size:27px; font-weight:650; }
.purple-profile-identity h2 { font-size:24px; }
.purple-profile-identity p { font-size:14px; margin-top:3px; }
.purple-profile-identity small { font-size:12px; color:#9a8da6; }
.purple-real-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.purple-real-stats>div { display:grid; gap:3px; background:#faf8fe; border:1px solid #eee7f7; padding:16px; border-radius:13px; }
.purple-real-stats strong { color:#7040e4; font-size:26px; line-height:1.3; font-weight:750; }
.purple-real-stats span { color:#7e6e90; font-size:13px; }
.purple-results-list { display:grid; }
.purple-result { display:flex; align-items:center; gap:13px; min-height:84px; border-bottom:1px solid #eee8f5; padding:14px 0; }
.purple-result-score { flex-shrink:0; font-size:13px; font-weight:650; color:#7650b8; background:#f3edff; border-radius:8px; padding:5px 8px; }
.purple-profile-account p { font-size:13px; }
.purple-learning .purple-logout { margin-top:14px; border-color:#ddd2ed; color:#72617f; min-height:48px; }
.purple-profile .purple-tutor-choice { margin-bottom:12px; }
.purple-profile .purple-tutor-choice>div { grid-template-columns:1fr; }

@media (max-width:1000px) {
  .purple-home-grid,.purple-profile-grid { grid-template-columns:1fr; gap:30px; }
  .purple-side-stack { gap:28px; }
  .purple-profile .purple-tutor-choice>div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .purple-scenarios { grid-template-columns:1fr; }
}

@media (max-width:760px) {
  .purple-app { display:block; min-height:100dvh; }
  .purple-app .workspace { padding:22px 18px calc(92px + env(safe-area-inset-bottom,0px)); }
  .purple-app .mobile-nav { display:grid; position:fixed; left:0; right:0; bottom:0; grid-template-columns:repeat(4,minmax(0,1fr)); padding:5px 12px calc(5px + env(safe-area-inset-bottom,0px)); border:0; border-top:1px solid #eee8f6; border-radius:0; background:rgb(255 255 255 / .98); box-shadow:0 -6px 22px rgb(49 25 94 / .035); z-index:65; gap:4px; }
  .purple-app .mobile-nav-item { min-height:58px; padding:7px 3px; border-radius:13px; color:#655970; font-size:11px; gap:3px; background:transparent; }
  .purple-app .mobile-nav-item.active { background:#f1eaff; color:#6d3df5; }
  .purple-app .mobile-nav-item svg { width:22px; height:22px; }
  .purple-learning { font-size:16px; }
  .purple-heading { margin-bottom:23px; gap:12px; align-items:center; }
  .purple-learning h1 { font-size:29px; }
  .purple-heading p { font-size:14px; }
  .purple-heading-action .purple-level { font-size:11px; padding:7px 9px; }
  .purple-home-grid,.purple-profile-grid { display:grid; gap:28px; }
  .purple-main-stack,.purple-side-stack { gap:25px; }
  .purple-next-lesson { padding:21px; gap:13px; border-radius:17px; }
  .purple-next-lesson h2 { font-size:23px; }
  .purple-next-lesson p { font-size:13px; }
  .purple-next-lesson .button { width:100%; }
  .purple-next-symbol { flex-basis:45px; width:45px; height:58px; border-radius:13px; }
  .purple-next-symbol svg { width:25px; height:25px; }
  .purple-daily { padding:16px; }
  .purple-daily-top { gap:11px; }
  .purple-daily h2 { font-size:16px; }
  .purple-daily-top>.purple-route-icon { flex-basis:33px; width:33px; height:36px; background:transparent; }
  .purple-daily-top .button { padding:10px 14px; font-size:14px; }
  .purple-skills { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .purple-skill { min-height:103px; }
  .purple-section-heading h2 { font-size:20px; }
  .purple-route-row { min-height:78px; padding:14px; gap:11px; }
  .purple-route-row .purple-row-copy strong { font-size:14px; }
  .purple-goal { padding:20px; }
  .purple-goal h2 { font-size:20px; }
  .purple-practice-start { gap:15px; margin-bottom:27px; }
  .purple-teacher-hero { gap:17px; }
  .purple-teacher-hero>img { width:99px; height:113px; flex-basis:99px; border-radius:15px; }
  .purple-teacher-hero h2 { font-size:26px; }
  .purple-teacher-hero p { font-size:13px; }
  .purple-teacher-hero .purple-eyebrow { font-size:11px; }
  .purple-talk-start { min-height:52px !important; font-size:15px !important; }
  .purple-tutor-option { gap:7px; padding:9px 8px; }
  .purple-tutor-option input { flex-basis:16px; width:16px; height:16px; }
  .purple-tutor-option img { width:32px; height:40px; }
  .purple-tutor-option small { font-size:10px; }
  .purple-practice-modes { gap:7px; }
  .purple-mode { min-height:84px; padding:12px 4px; }
  .purple-mode span { font-size:11px; }
  .purple-scenario { min-height:89px; gap:11px; }
  .purple-scenario .purple-row-copy strong { font-size:15px; }
  .purple-scenario .purple-row-copy small { font-size:12px; }
  .purple-scenario-level { display:none; }
  .purple-vocabulary .purple-heading p { display:none; }
  .purple-learning .purple-add-word { font-size:13px; padding:11px 12px; }
  .purple-vocab-review { display:grid; gap:17px; padding:20px; margin-bottom:25px; }
  .purple-vocab-review h2 { font-size:23px; }
  .purple-vocab-review .purple-primary { width:100%; }
  .purple-vocab-top h2 { font-size:20px; }
  .purple-vocab-top .button { font-size:12px; gap:5px; }
  .purple-vocab-top .button>svg { width:16px; height:16px; }
  .purple-vocab-filter { font-size:13px; padding:10px 12px; }
  .purple-word-row { grid-template-columns:56px minmax(0,1fr) 48px; gap:11px; padding:15px 0; }
  .purple-word-image { width:56px; height:60px; border-radius:10px; }
  .purple-word-detail>summary { min-height:60px; }
  .purple-word-detail>summary strong { font-size:17px; }
  .purple-word-detail>summary>span { font-size:13px; }
  .purple-word-tools { gap:5px 15px; }
  .purple-learning .purple-word-tools .button { font-size:12px; }
  .purple-dictionary-disclosure .card { padding:17px; }
  .purple-profile-identity { gap:14px; padding-bottom:21px; margin-bottom:24px; }
  .purple-profile-identity h2 { font-size:23px; }
  .purple-profile-initial { width:60px; height:60px; flex-basis:60px; }
  .purple-result { gap:10px; }
  .purple-result .purple-route-icon { flex-basis:33px; width:33px; background:transparent; }
}

@media (prefers-reduced-motion:reduce) {
  .purple-learning * { scroll-behavior:auto; transition:none; animation:none; }
}
