:root {
  color-scheme: light;
  font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15263f;
  background: #f4f8ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --blue: #2878e8;
  --blue-dark: #1759b7;
  --ink: #15263f;
  --muted: #66758a;
  --line: #e2ebf8;
  --white: #fff;
  --shadow: 0 4px 0 rgba(25, 76, 146, .08), 0 14px 32px rgba(30, 82, 146, .08);
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(84, 156, 255, .11), transparent 45%), #f4f8ff;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(40, 120, 232, .5); outline-offset: 3px; }

.loading-screen, .auth-card { width: min(calc(100% - 2rem), 34rem); margin: max(2rem, 8vh) auto; }
.loading-screen { display: grid; justify-items: center; gap: .75rem; padding: 2rem; color: var(--muted); }
.landing-shell { min-height: 100vh; min-height: 100dvh; overflow: hidden; }
.landing-header { display: flex; width: min(100% - 2.5rem, 72rem); min-height: 5.25rem; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto; border-bottom: 1px solid rgba(21, 38, 63, .07); }
.landing-brand-icon { width: 2.8rem; height: 2.8rem; border-radius: .9rem; object-fit: cover; box-shadow: 0 3px 0 #134caa; }
.landing-login { min-height: 2.75rem; padding: .65rem .9rem; font-size: .9rem; text-decoration: none; }
.landing-hero { display: grid; width: min(100% - 2.5rem, 72rem); min-height: 35rem; grid-template-columns: minmax(0, 1fr) minmax(20rem, .9fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); margin: 0 auto; padding: 3rem 0 4rem; }
.landing-copy { position: relative; z-index: 1; }
.landing-copy h1 { max-width: 11ch; font-size: clamp(3rem, 6.6vw, 5.4rem); line-height: .99; }
.landing-copy h1 span { color: var(--blue); }
.landing-copy .intro { max-width: 37rem; margin: 1.3rem 0 1.6rem; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.landing-actions a { text-decoration: none; }
.landing-secondary { color: var(--blue-dark); font-weight: 800; }
.landing-note { display: flex; align-items: center; gap: .5rem; margin: 1.2rem 0 0; color: #75849a; font-size: .84rem; }
.landing-note span { color: #f1ad32; font-size: 1.1rem; }
.landing-visual { position: relative; display: grid; min-height: 25rem; place-items: center; isolation: isolate; }
.landing-visual::before { position: absolute; z-index: -2; width: min(100%, 25rem); aspect-ratio: 1; border-radius: 42% 58% 64% 36% / 47% 43% 57% 53%; background: linear-gradient(145deg, #e6f1ff, #cfe4ff 55%, #e8f5ff); content: ''; transform: rotate(-8deg); }
.landing-orbit { position: absolute; z-index: -1; border: 1px dashed rgba(40, 120, 232, .25); border-radius: 50%; }
.orbit-one { width: 22rem; aspect-ratio: 1; }
.orbit-two { width: 27rem; aspect-ratio: 1; opacity: .55; }
.preview-card { width: min(100% - 2rem, 22rem); padding: 1.35rem; border: 1px solid rgba(40, 120, 232, .13); border-radius: 1.5rem; background: rgba(255, 255, 255, .97); box-shadow: 0 5px 0 rgba(25, 76, 146, .07), 0 1.6rem 3.4rem rgba(31, 79, 141, .17); transform: rotate(2deg); animation: arrive .6s ease both; }
.preview-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: #8290a3; font-size: .65rem; font-weight: 850; letter-spacing: .08em; }
.preview-count { padding: .3rem .45rem; border-radius: .55rem; color: var(--blue-dark); background: #edf5ff; letter-spacing: 0; }
.preview-word { margin: 1.8rem 0 .35rem; color: var(--ink); font-size: 2rem; font-weight: 900; letter-spacing: -.045em; }
.preview-hint { margin: 0 0 1rem; color: var(--muted); font-size: .88rem; }
.preview-answer { display: flex; min-height: 3.4rem; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem .8rem; border: 2px solid #7bcaa0; border-radius: .9rem; color: #1c6948; background: #f1fbf5; font-weight: 800; }
.answer-check { display: grid; width: 1.5rem; aspect-ratio: 1; place-items: center; border-radius: 50%; color: white; background: #43a977; }
.preview-progress { height: .42rem; overflow: hidden; margin-top: 1.2rem; border-radius: 99px; background: #edf1f7; }
.preview-progress span { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #59b7e9, var(--blue)); }
.preview-footer { display: flex; align-items: center; gap: .4rem; margin: .75rem 0 0; color: #61728a; font-size: .78rem; font-weight: 700; }
.preview-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; border: 1px solid rgba(40, 120, 232, .12); border-radius: 1rem; background: white; box-shadow: 0 8px 24px rgba(31, 79, 141, .15); animation: float 4s ease-in-out infinite; }
.float-streak { top: 14%; right: -1rem; }
.float-streak > span:first-child { font-size: 1.5rem; }
.float-streak strong, .float-streak small { display: block; }
.float-streak strong { color: var(--ink); font-size: .85rem; }
.float-streak small { margin-top: .12rem; color: var(--muted); font-size: .7rem; }
.float-book { bottom: 12%; left: -.3rem; width: 3rem; aspect-ratio: 1; justify-content: center; padding: 0; font-size: 1.5rem; animation-delay: -.9s; }
.landing-spark { position: absolute; color: #f2ae39; font-size: 2rem; }
.spark-one { top: 19%; left: 11%; }
.spark-two { right: 7%; bottom: 22%; color: var(--blue); font-size: 1.5rem; }
.landing-how { padding: 4.5rem max(1.25rem, calc((100% - 72rem) / 2)) 4.7rem; background: rgba(255, 255, 255, .72); }
.landing-section-title { max-width: 42rem; margin: 0 auto 2rem; text-align: center; }
.landing-section-title h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.landing-section-title > p:last-child { margin: .65rem 0 0; color: var(--muted); line-height: 1.55; }
.landing-steps { display: grid; max-width: 72rem; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 auto; }
.landing-step { position: relative; min-height: 13rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1.25rem; background: white; box-shadow: 0 4px 0 rgba(25, 76, 146, .04); }
.step-icon { display: grid; width: 3rem; aspect-ratio: 1; place-items: center; margin-bottom: 1rem; border-radius: .95rem; font-size: 1.4rem; }
.step-blue { background: #e7f1ff; }.step-yellow { background: #fff4dc; }.step-green { background: #e8f8ef; }
.step-number { position: absolute; top: 1.25rem; right: 1.25rem; color: #a2afbf; font-size: .75rem; font-weight: 850; letter-spacing: .08em; }
.landing-step h3 { margin-bottom: .4rem; }
.landing-step p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.landing-bottom-cta { display: flex; max-width: 72rem; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 3rem auto; padding: clamp(1.3rem, 4vw, 2.25rem); border-radius: 1.5rem; color: white; background: linear-gradient(115deg, #276ed2, #3989ee); box-shadow: 0 5px 0 #1c5cb2, 0 1.1rem 2.3rem rgba(40, 120, 232, .18); }
.landing-bottom-cta .eyebrow { color: #dceaff; }
.landing-bottom-cta h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); }
.landing-bottom-cta p:last-child { margin: .4rem 0 0; color: rgba(255,255,255,.86); font-size: .9rem; }
.landing-bottom-cta .button { flex: 0 0 auto; color: var(--blue-dark); background: white; box-shadow: 0 4px 0 #c8ddf8; text-decoration: none; }
.landing-footer { display: flex; width: min(100% - 2.5rem, 72rem); justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 1.1rem 0 1.5rem; border-top: 1px solid rgba(21, 38, 63, .08); color: #8190a3; font-size: .78rem; }
.auth-back { display: inline-block; margin-bottom: 1.3rem; color: var(--blue-dark); font-size: .88rem; font-weight: 800; text-decoration: none; }
.auth-back:hover, .landing-secondary:hover { text-decoration: underline; }
.auth-card {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgba(40, 120, 232, .12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
  animation: arrive .55s cubic-bezier(.2, .8, .2, 1) both;
}
.brand-mark {
  display: grid;
  width: 4.25rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 1.25rem;
  background: linear-gradient(145deg, #5ca4ff, #1761d0);
  box-shadow: 0 5px 0 #134caa, 0 1rem 1.8rem rgba(40, 120, 232, .22);
  font-size: 2rem;
  animation: float 3.5s ease-in-out infinite;
}
.eyebrow { margin: 0 0 .45rem; color: var(--blue-dark); font-size: .76rem; font-weight: 850; letter-spacing: .105em; text-transform: uppercase; }
.auth-card > .eyebrow { margin-top: 1.5rem; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2.25rem, 8vw, 3.5rem); font-weight: 900; letter-spacing: -.055em; line-height: .98; }
h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); font-weight: 850; letter-spacing: -.035em; }
h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.intro { margin: 1rem 0 1.6rem; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.form-stack { display: grid; gap: 1rem; }
.form-stack label { display: grid; gap: .4rem; color: #34465f; font-size: .9rem; font-weight: 750; }
.form-stack input { width: 100%; min-height: 3.1rem; padding: .75rem .9rem; border: 1px solid #cfdbeb; border-radius: .9rem; color: var(--ink); background: white; }
.form-hint { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.button { display: inline-flex; min-height: 3.2rem; align-items: center; justify-content: center; gap: .75rem; padding: .8rem 1.1rem; border: 0; border-radius: 1rem; font-weight: 850; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.button:hover:not(:disabled), .text-button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--blue); box-shadow: 0 4px 0 var(--blue-dark); }
.button-primary:hover:not(:disabled) { background: #1f6bd3; box-shadow: 0 6px 0 var(--blue-dark); }
.button-soft { color: var(--blue-dark); background: #e7f1ff; box-shadow: 0 3px 0 #cee1fb; }
.message { margin: .8rem 0; padding: .8rem 1rem; border: 1px solid #f0b5b8; border-radius: .85rem; color: #8b2c35; background: #fff2f2; line-height: 1.45; }
.message[hidden] { display: none; }
.message-success { border-color: #addfca; color: #176747; background: #effbf5; }
code { padding: .1rem .3rem; border-radius: .3rem; background: rgba(40, 120, 232, .09); }

.app-shell { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.app-header { position: sticky; z-index: 5; top: 0; display: flex; min-height: 4.5rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem max(1rem, env(safe-area-inset-left)); border-bottom: 1px solid rgba(21, 38, 63, .08); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); }
.brand { display: inline-flex; min-width: 0; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
.brand-mark-small { display: grid; width: 2.8rem; aspect-ratio: 1; place-items: center; border-radius: .9rem; background: linear-gradient(145deg, #5ca4ff, #1761d0); box-shadow: 0 3px 0 #134caa; font-size: 1.45rem; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.1rem; font-weight: 900; }
.brand small { margin-top: .1rem; color: var(--muted); font-size: .76rem; }
.header-streak { min-width: 3.7rem; min-height: 2.75rem; border: 0; border-radius: .9rem; color: #d55d24; background: #fff4e8; font-size: 1.1rem; font-weight: 850; }
.header-streak span { color: #bf5428; }
.page-content { width: min(100% - 2rem, 56rem); margin: 0 auto; padding: 1.5rem 0 2.2rem; animation: arrive .45s ease both; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .25rem 0 1.3rem; }
.welcome-row h1, .page-intro h1 { font-size: clamp(2rem, 7vw, 3.5rem); }
.welcome-row .intro, .page-intro .intro { margin: .5rem 0 0; }
.streak-chip { display: inline-flex; min-width: 4.4rem; min-height: 3rem; align-items: center; justify-content: center; gap: .3rem; border-radius: 1rem; color: #bf5428; background: #fff4e8; font-size: 1.3rem; font-weight: 850; }
.streak-chip span { font-size: 1.05rem; }
.feature-card { position: relative; display: flex; min-height: 11rem; align-items: center; justify-content: space-between; overflow: hidden; gap: 1rem; padding: clamp(1.25rem, 5vw, 2rem); border-radius: 1.6rem; color: white; background: linear-gradient(125deg, color-mix(in srgb, var(--subject-accent, var(--blue)) 90%, white), var(--subject-accent, var(--blue))); box-shadow: 0 5px 0 color-mix(in srgb, var(--subject-accent, var(--blue)) 68%, #132a4a), 0 1.3rem 2.5rem color-mix(in srgb, var(--subject-accent, var(--blue)) 18%, transparent); }
.feature-card::after { position: absolute; right: 4rem; bottom: -5rem; width: 14rem; aspect-ratio: 1; border: 2rem solid rgba(255, 255, 255, .09); border-radius: 50%; content: ''; }
.feature-card .eyebrow { color: rgba(255, 255, 255, .8); }
.feature-card h2 { max-width: 14ch; font-size: clamp(1.65rem, 5vw, 2.4rem); }
.feature-card p:not(.eyebrow) { max-width: 34ch; margin: .65rem 0 0; color: rgba(255, 255, 255, .9); line-height: 1.5; }
.feature-icon { position: relative; z-index: 1; display: grid; width: clamp(4rem, 15vw, 6.25rem); flex: 0 0 auto; aspect-ratio: 1; place-items: center; border: 1px solid rgba(255, 255, 255, .28); border-radius: 1.6rem; background: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); font-size: clamp(2.2rem, 7vw, 3.7rem); animation: float 4s ease-in-out infinite; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.section-heading h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); }
.section-heading .button { min-height: 2.75rem; padding: .65rem .85rem; font-size: .86rem; }
.import-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: 1.2rem; background: white; box-shadow: 0 3px 0 rgba(25, 76, 146, .04); transition: box-shadow .2s ease, transform .2s ease; }
.import-card-highlight { transform: scale(1.01); box-shadow: 0 0 0 4px rgba(40, 120, 232, .16), var(--shadow); }
.import-icon { display: grid; width: 2.8rem; flex: 0 0 auto; aspect-ratio: 1; place-items: center; border-radius: .85rem; color: var(--blue-dark); background: #e7f1ff; font-size: 1.6rem; font-weight: 900; }
.import-card p { margin: .4rem 0 .85rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.file-picker { display: inline-flex; min-height: 2.8rem; align-items: center; padding: .65rem .9rem; border-radius: .8rem; color: white; background: var(--blue); font-size: .9rem; font-weight: 800; cursor: pointer; }
.file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.file-picker:focus-within { outline: 3px solid rgba(40, 120, 232, .4); outline-offset: 3px; }
.file-name { display: inline-block; margin-left: .7rem; color: var(--muted); font-size: .82rem; }
.vocab-heading { margin-top: 2rem; }
.count-badge { display: grid; min-width: 2.4rem; min-height: 2.4rem; place-items: center; border-radius: .75rem; color: var(--blue-dark); background: #e7f1ff; font-weight: 850; }
.vocabulary-list { overflow: hidden; border: 1px solid var(--line); border-radius: 1.2rem; background: white; }
.vocabulary-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid #edf1f7; animation: arrive .3s ease both; }
.vocabulary-row:last-child { border-bottom: 0; }
.vocabulary-row > div:first-child { display: grid; gap: .2rem; }
.vocabulary-row strong { font-size: 1rem; }
.vocabulary-row span { color: var(--muted); }
.vocabulary-row small { color: #718197; }
.vocabulary-edit { width: 100%; padding-top: .4rem; color: var(--blue-dark); }
.vocabulary-edit summary { cursor: pointer; font-size: .82rem; font-weight: 800; }
.vocabulary-edit .form-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .75rem; }
.vocabulary-edit .form-stack label:nth-child(3), .vocabulary-edit .form-stack label:nth-child(4) { grid-column: span 2; }
.delete-vocabulary { color: #b34436; background: #fff1ed; }
.tag-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.tag { padding: .28rem .5rem; border-radius: 99px; color: #315d91 !important; background: #edf5ff; font-size: .72rem; font-weight: 750; }
.editor-card, .practice-card { margin: 1rem 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: 1.2rem; background: white; box-shadow: 0 3px 0 rgba(25, 76, 146, .04); }
.editor-card .section-heading, .practice-card .section-heading { margin: 0 0 1rem; }
.compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-form label:nth-child(3), .compact-form label:nth-child(4) { grid-column: span 2; }
.compact-form .button { justify-self: start; }
.practice-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; align-items: end; }
.practice-controls label { display: grid; gap: .4rem; color: #34465f; font-size: .9rem; font-weight: 750; }
.practice-controls select, .question-row input { width: 100%; min-height: 3rem; padding: .65rem .8rem; border: 1px solid #cfdbeb; border-radius: .85rem; color: var(--ink); background: white; }
.practice-controls button { grid-column: span 2; justify-self: start; }
.practice-round { display: grid; gap: .75rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.question-row { display: grid; grid-template-columns: minmax(8rem, .7fr) minmax(0, 1fr); align-items: center; gap: .8rem; padding: .8rem; border-radius: .9rem; background: #f7faff; }
.question-row b { color: var(--blue-dark); }
.answer-result { display: grid; gap: .2rem; margin: .5rem 0; padding: .8rem 1rem; border-radius: .8rem; }
.answer-correct { background: #eaf8ef; }
.answer-wrong { background: #fff1ed; }
.answer-result small { color: var(--muted); }
.practice-round > .button { justify-self: start; }
.ai-import-card, .push-section { margin: 1rem 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: 1.2rem; background: white; box-shadow: 0 3px 0 rgba(25, 76, 146, .04); }
.ai-import-card .section-heading, .push-section .section-heading { margin: 0 0 .5rem; }
.ai-import-card > p { color: var(--muted); line-height: 1.5; }
.ai-import-controls, .push-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.ai-review-form { display: grid; gap: .8rem; margin-top: 1rem; }
.ai-vocabulary-item { min-width: 0; margin: 0; padding: .85rem; border: 1px solid var(--line); border-radius: .9rem; }
.ai-vocabulary-item .form-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-vocabulary-item .form-stack label:nth-child(3), .ai-vocabulary-item .form-stack label:nth-child(4) { grid-column: span 2; }
.ai-include { display: flex; align-items: center; gap: .45rem; margin-bottom: .7rem; color: var(--blue-dark); font-weight: 800; }
.generated-example { display: grid; gap: .45rem; padding: .85rem; border: 1px solid var(--line); border-radius: .9rem; }
.generated-example textarea { min-height: 4.5rem; padding: .7rem .8rem; border: 1px solid #cfdbeb; border-radius: .8rem; color: var(--ink); font: inherit; }
.push-actions .text-button { min-height: 2.75rem; }
.vocabulary-row .vocabulary-edit, .vocabulary-row .delete-vocabulary { flex-basis: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.empty-state { display: grid; justify-items: center; padding: 2.5rem 1.2rem; color: var(--muted); text-align: center; }
.empty-state > span { margin-bottom: .6rem; font-size: 2rem; }
.empty-state strong { color: var(--ink); }
.empty-state p { max-width: 35ch; margin: .5rem 0 0; line-height: 1.5; }
.page-intro { margin: .3rem 0 1.5rem; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .9rem; }
.subject-card { display: flex; min-height: 12rem; flex-direction: column; gap: .6rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 1.2rem; background: white; box-shadow: 0 3px 0 rgba(25, 76, 146, .04); transition: transform .18s ease, box-shadow .18s ease; }
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.subject-card-active { border-color: color-mix(in srgb, var(--subject-accent) 40%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--subject-accent) 18%, white), 0 3px 0 rgba(25, 76, 146, .04); }
.subject-card-top, .subject-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.subject-icon { font-size: 1.8rem; }
.active-pill { padding: .28rem .55rem; border-radius: 99px; color: var(--blue-dark); background: #e7f1ff; font-size: .72rem; font-weight: 850; }
.subject-card h3 { margin-top: .2rem; }
.subject-card > p { margin: 0; color: var(--muted); font-size: .88rem; }
.subject-card-bottom { margin-top: auto; padding-top: .5rem; color: var(--muted); font-size: .82rem; }
.text-button { padding: .45rem .6rem; border: 0; border-radius: .65rem; color: var(--blue-dark); background: #eff6ff; font-size: .82rem; font-weight: 850; transition: transform .15s ease; }
.subject-check { color: var(--blue-dark); font-weight: 900; }
.profile-content { max-width: 40rem; }
.profile-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 1.1rem; background: white; }
.avatar-bubble { display: grid; width: 3.5rem; aspect-ratio: 1; place-items: center; border-radius: 1.1rem; color: white; background: linear-gradient(145deg, #5ca4ff, #1761d0); font-size: 1.5rem; font-weight: 900; }
.profile-card p { margin: .25rem 0 0; color: var(--muted); }
.logout-button { margin-top: 1.2rem; }

.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-around; gap: .4rem; padding: .45rem max(.5rem, env(safe-area-inset-left)) max(.45rem, env(safe-area-inset-bottom)); border-top: 1px solid rgba(21, 38, 63, .08); background: rgba(255, 255, 255, .96); box-shadow: 0 -6px 22px rgba(30, 82, 146, .07); backdrop-filter: blur(14px); }
.nav-item { display: flex; min-width: 0; min-height: 3.5rem; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; border: 0; border-radius: .9rem; color: #64748b; background: transparent; font-size: .74rem; transition: color .15s ease, background-color .15s ease, transform .15s ease; }
.nav-item > span { font-size: 1.35rem; font-weight: 900; line-height: 1; }
.nav-item.active { color: var(--blue-dark); background: #e7f1ff; }
.nav-item.active > strong { font-weight: 900; }

@keyframes arrive { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-2deg); } }

@media (min-width: 900px) {
  .app-shell { padding-bottom: 2rem; }
  .app-header { padding-inline: max(2rem, calc((100vw - 68rem) / 2)); }
  .page-content { width: min(100% - 18rem, 56rem); margin-right: max(2rem, calc((100vw - 68rem) / 2)); margin-left: max(14rem, calc((100vw - 68rem) / 2 + 2rem)); padding-top: 2rem; }
  .bottom-nav { top: 4.5rem; right: auto; bottom: 0; left: 0; width: 11.5rem; flex-direction: column; justify-content: flex-start; padding: 1rem .75rem; border-top: 0; border-right: 1px solid rgba(21, 38, 63, .08); box-shadow: none; }
  .nav-item { min-height: 3.2rem; flex-direction: row; justify-content: flex-start; gap: .8rem; padding: 0 .85rem; font-size: .9rem; }
}

@media (max-width: 480px) {
  .page-content { width: min(100% - 1.25rem, 56rem); padding-top: 1.2rem; }
  .welcome-row { align-items: flex-start; }
  .welcome-row .intro { max-width: 24ch; font-size: .95rem; }
  .feature-card { min-height: 9.5rem; border-radius: 1.35rem; }
  .import-card { gap: .7rem; padding: .9rem; }
  .import-card p { font-size: .84rem; }
  .file-name { display: block; margin: .45rem 0 0; }
  .vocabulary-row { align-items: flex-start; flex-direction: column; gap: .6rem; }
  .vocabulary-edit .form-stack { grid-template-columns: 1fr; }
  .vocabulary-edit .form-stack label:nth-child(3), .vocabulary-edit .form-stack label:nth-child(4) { grid-column: auto; }
  .tag-list { justify-content: flex-start; }
  .compact-form, .practice-controls { grid-template-columns: 1fr; }
  .ai-vocabulary-item .form-stack { grid-template-columns: 1fr; }
  .compact-form label:nth-child(3), .compact-form label:nth-child(4), .practice-controls button { grid-column: auto; }
  .ai-vocabulary-item .form-stack label:nth-child(3), .ai-vocabulary-item .form-stack label:nth-child(4) { grid-column: auto; }
  .question-row { grid-template-columns: 1fr; }
  .auth-card { margin-top: max(1rem, env(safe-area-inset-top)); }
}

@media (max-width: 760px) {
  .landing-header { min-height: 4.5rem; }
  .landing-hero { min-height: auto; grid-template-columns: 1fr; gap: 1rem; padding: 3rem 0 3.4rem; }
  .landing-copy h1 { max-width: 13ch; font-size: clamp(2.8rem, 12vw, 4.5rem); }
  .landing-visual { min-height: 23rem; margin: 0 -.6rem; }
  .orbit-one { width: 19rem; }.orbit-two { width: 23rem; }
  .float-streak { right: 0; }
  .landing-how { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-step { min-height: 0; }
  .landing-bottom-cta { align-items: flex-start; flex-direction: column; margin: 2rem 1.25rem; }
}

@media (max-width: 420px) {
  .landing-header { width: min(100% - 1.5rem, 72rem); }
  .landing-hero { width: min(100% - 1.5rem, 72rem); padding-top: 2.3rem; }
  .landing-login { min-height: 2.5rem; padding-inline: .7rem; font-size: .82rem; }
  .landing-brand-icon { width: 2.45rem; height: 2.45rem; }
  .landing-visual { min-height: 20rem; }
  .preview-card { width: min(100% - 2.6rem, 22rem); padding: 1.1rem; }
  .landing-footer { width: min(100% - 1.5rem, 72rem); flex-direction: column; gap: .35rem; }
}

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