:root {
      --ink: #111827;
      --muted: #64748b;
      --line: #e5e7eb;
      --page: #f6f8fb;
      --panel: #ffffff;
      --accent: #0f766e;
      --accent-dark: #115e59;
      --accent-soft: #ecfdf5;
      --gold: #fff7d6;
      --gold-line: #f2c94c;
      --good: #15803d;
      --bad: #b91c1c;
      --shadow-sm: 0 8px 24px rgb(17 24 39 / 7%);
      --shadow-md: 0 18px 46px rgb(17 24 39 / 10%);
      --shadow-lg: 0 30px 80px rgb(17 24 39 / 16%);
      font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background:
        linear-gradient(180deg, #ffffff 0%, #f6f8fb 42%, #eef3f6 100%);
      color: var(--ink);
      padding: 18px;
      font-size: 15px;
    }

    main {
      width: 100%;
      margin: auto;
    }

    header {
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 18px;
      margin-bottom: 20px;
      border: 1px solid #e5e7eb;
      border-top: 6px solid var(--accent);
      border-radius: 14px;
      background: rgb(255 255 255 / 92%);
      padding: 20px 22px;
      box-shadow: var(--shadow-md);
      backdrop-filter: blur(12px);
    }

    h1 {
      margin: 0 0 8px;
      font-size: clamp(1.8rem, 4vw, 3.3rem);
      line-height: 1;
    }

    p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .hidden {
      display: none !important;
    }

    button,
    select,
    input {
      font: inherit;
      font-weight: 900;
    }

    .auth-screen {
      width: 100%;
      min-height: calc(100vh - 52px);
      margin: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      overflow: hidden;
      border: 1px solid #e5e7eb;
      border-radius: 18px;
      background: var(--panel);
      box-shadow: var(--shadow-lg);
    }

    .auth-left,
    .auth-art {
      min-height: 620px;
    }

    .auth-left {
      display: grid;
      grid-template-rows: auto 1fr;
      padding: 28px clamp(28px, 6vw, 76px);
    }

    .auth-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 18px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: #111827;
      font-size: 1.65rem;
      font-weight: 900;
    }

    .brand-mark {
      display: inline-grid;
      place-items: center;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: #fff7d6;
      border: 1px solid #f2c94c;
      box-shadow: 0 8px 22px rgb(239 74 50 / 12%);
    }

    .rocket-logo {
      display: block;
      width: 74%;
      height: 74%;
    }

    .login-box {
      align-self: center;
      max-width: 560px;
    }

    .login-box h1 {
      margin-bottom: 22px;
      color: #111827;
      font-size: clamp(2.2rem, 5vw, 3.3rem);
    }

    .login-box p {
      margin-bottom: 26px;
      color: #314159;
      font-size: 1.22rem;
      font-weight: 700;
    }

    .login-actions {
      display: grid;
      gap: 14px;
    }

    .auth-panel {
      display: grid;
      gap: 12px;
      padding: 14px;
      border: 1px solid #dbe3ee;
      border-radius: 14px;
      background: #ffffff;
      box-shadow: var(--shadow-sm);
    }

    .auth-panel.expanded {
      border-color: #b8c7d9;
      box-shadow: var(--shadow-md);
    }

    .create-account-panel {
      border-top: 4px solid #ef4a32;
    }

    .sign-in-panel {
      border-top: 4px solid var(--accent);
    }

    .auth-panel .login-button {
      box-shadow: none;
    }

    .login-button {
      display: flex;
      align-items: center;
      gap: 16px;
      width: 100%;
      min-height: 58px;
      border: 1px solid #dbe3ee;
      border-radius: 12px;
      background: #fff;
      color: #0d1528;
      padding: 0 18px;
      font-size: 1.05rem;
      font-weight: 800;
      text-align: left;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
      transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    }

    .login-button:hover {
      transform: translateY(-2px);
      border-color: #b8c7d9;
      box-shadow: var(--shadow-md);
    }

    .provider-icon {
      display: inline-grid;
      place-items: center;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      color: #fff;
      font-weight: 900;
    }

    .provider-icon.google {
      background: #ffffff;
      border: 1px solid #d8e2ee;
    }

    .provider-icon.account {
      background: #0f766e;
      border: 1px solid #0f766e;
    }

    .provider-icon svg {
      display: block;
      width: 24px;
      height: 24px;
    }

    .email-form {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
    }

    .email-form[hidden] {
      display: none;
    }

    .policy-consent {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 10px;
      align-items: start;
      margin: 0;
      color: var(--muted);
      font-size: 0.9rem;
      font-weight: 800;
      line-height: 1.35;
      text-transform: none;
    }

    .policy-consent[hidden] {
      display: none;
    }

    .policy-consent input {
      width: 18px;
      min-height: 18px;
      margin-top: 2px;
      accent-color: var(--accent);
    }

    .policy-consent a {
      color: var(--accent-dark);
      text-decoration: underline;
    }

    .email-form button {
      min-height: 46px;
      border: 1px solid var(--accent);
      border-radius: 8px;
      background: var(--accent-soft);
      color: var(--accent-dark);
      padding: 0 16px;
      font-weight: 900;
      cursor: pointer;
    }

    .text-button {
      border: 0;
      background: transparent;
      color: var(--accent-dark);
      padding: 0;
      text-align: left;
      font-size: 0.95rem;
      font-weight: 900;
      cursor: pointer;
    }

    .text-button:hover {
      text-decoration: underline;
    }

    .login-message {
      min-height: 24px;
      margin-top: 10px;
      color: var(--bad);
      font-weight: 800;
    }

    .legal-links {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      font-size: 0.9rem;
      font-weight: 900;
    }

    .legal-links a {
      color: var(--muted);
      text-decoration: none;
    }

    .legal-links a:hover {
      color: var(--accent-dark);
      text-decoration: underline;
    }

    .legal-page {
      max-width: 860px;
      margin: 0 auto;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #ffffff;
      padding: clamp(22px, 5vw, 48px);
      box-shadow: var(--shadow-md);
    }

    .legal-page h1 {
      margin-bottom: 18px;
    }

    .legal-page h2 {
      margin: 28px 0 10px;
    }

    .legal-page ul {
      color: var(--muted);
      line-height: 1.6;
    }

    .auth-art {
      display: grid;
      align-content: center;
      place-items: center;
      gap: 24px;
      background:
        radial-gradient(circle at center, #fff7d6 0%, #fff7eb 42%, #f8fafc 100%);
      position: relative;
      overflow: hidden;
    }

    .rocket-scene {
      position: relative;
      display: grid;
      place-items: center;
      width: min(430px, 80%);
      aspect-ratio: 1;
      border: 4px solid #ef6a4e;
      border-right-color: #f5c84d;
      border-radius: 50%;
      background: #fff7df;
      box-shadow: 0 28px 70px rgb(239 74 50 / 16%);
    }

    .rocket-planet {
      display: grid;
      place-items: center;
      width: 72%;
      aspect-ratio: 1;
      border-radius: 50%;
      background: #ffe8c6;
      box-shadow: inset 0 -24px 0 rgb(255 255 255 / 20%);
    }

    .rocket-illustration {
      width: 58%;
      max-width: 230px;
      filter: drop-shadow(0 18px 22px rgb(21 39 38 / 18%));
    }

    .rocket-caption {
      color: #17211f;
      font-size: clamp(1.35rem, 3vw, 2.2rem);
      font-weight: 900;
      text-align: center;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .spark {
      position: absolute;
      width: 58px;
      height: 58px;
      color: #ffd95a;
      filter: drop-shadow(0 6px 8px rgb(23 33 31 / 16%));
    }

    .spark::before {
      content: "*";
      font-size: 4.7rem;
      line-height: 1;
      font-weight: 900;
      -webkit-text-stroke: 1px #1d2738;
    }

    .spark.one {
      top: 24px;
      left: 70px;
      transform: rotate(-12deg);
    }

    .spark.two {
      right: 54px;
      bottom: 40px;
      transform: rotate(18deg);
    }

    .header-actions {
      display: flex;
      align-items: center;
      justify-content: end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .header-actions .action-button,
    .premium-button,
    .badge {
      min-height: 56px;
      border-radius: 999px;
      padding: 0 24px;
      font-size: 1.08rem;
      font-weight: 900;
    }

    .premium-button {
      border: 1px solid #f2c94c;
      background: #fff7d6;
      color: #7c4a03;
      cursor: pointer;
      box-shadow: 0 10px 22px rgb(242 201 76 / 18%);
      transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .premium-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 16px 32px rgb(242 201 76 / 24%);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      border: 1px solid #d1e5dd;
      background: #ecfdf5;
      color: var(--accent-dark);
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
      gap: 20px;
      align-items: start;
    }

    #app {
      min-height: calc(100vh - 36px);
    }

    .round-control {
      margin-top: 14px;
    }

    .round-control label {
      font-size: 1rem;
    }

    #roundLengthSelect {
      min-height: 52px;
      font-size: 1rem;
      font-weight: 800;
      padding: 0 14px;
    }

    .content-column {
      display: grid;
      gap: 32px;
      min-width: 0;
    }

    aside,
    .practice-panel {
      background: var(--panel);
      border: 1px solid #e5e7eb;
      border-radius: 14px;
      box-shadow: var(--shadow-md);
    }

    aside {
      position: sticky;
      top: 18px;
      display: grid;
      gap: 12px;
      padding: 12px;
      background: rgb(255 255 255 / 92%);
      backdrop-filter: blur(10px);
    }

    .aside-section {
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      background: #ffffff;
      padding: 12px;
    }

    .aside-title {
      margin-bottom: 10px;
      color: var(--ink);
      font-size: 1.15rem;
      line-height: 1;
      letter-spacing: 0;
    }

    label {
      display: block;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
      text-transform: uppercase;
    }

    select,
    input {
      width: 100%;
      min-height: 46px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #fff;
      color: var(--ink);
      padding: 0 12px;
    }

    select:focus,
    input:focus,
    button:focus-visible {
      outline: 3px solid rgb(36 120 106 / 22%);
      outline-offset: 2px;
      border-color: var(--accent);
    }

    .option-row {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--ink);
      font-weight: 800;
      font-size: 1rem;
      text-transform: none;
    }

    .option-row input {
      width: 22px;
      min-height: 22px;
      accent-color: var(--accent);
    }

    .content-column > .topic-panel {
      border: 1px solid var(--line);
    }

    .content-column > .practice-panel {
      border: 2px solid #9bd5ca;
    }

    .content-column > .help-panel {
      border: 1px solid var(--line);
    }

    .menu {
      display: grid;
      gap: 8px;
      max-height: 620px;
      overflow: auto;
      padding-right: 4px;
    }

    .menu-button {
      display: grid;
      grid-template-columns: 30px 1fr auto;
      gap: 8px;
      align-items: center;
      width: 100%;
      min-height: 42px;
      border: 1px solid #e5e7eb;
      border-radius: 999px;
      background: #fff;
      color: var(--ink);
      padding: 5px 10px 5px 5px;
      text-align: left;
      font-weight: 800;
      font-size: 0.95rem;
      cursor: pointer;
      box-shadow: 0 4px 12px rgb(17 24 39 / 4%);
      transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
    }

    .menu-button:hover {
      transform: translateX(3px);
      border-color: #b7d9d1;
      box-shadow: 0 8px 20px rgb(17 24 39 / 8%);
    }

    .menu-button.locked {
      background: #f8fafc;
      color: #64748b;
    }

    .menu-button.locked:hover {
      border-color: #dbe3ee;
    }

    .premium-lock {
      border: 1px solid #f2c94c;
      border-radius: 50%;
      background: #fff7d6;
      color: #8a5a00;
      display: inline-grid;
      place-items: center;
      width: 28px;
      height: 28px;
      font-size: 0.95rem;
      font-weight: 900;
    }

    .menu-name {
      font-size: 0.95rem;
      line-height: 1.15;
    }

    .menu-button.active {
      background: #dcfce7;
      border-color: #86efac;
      color: var(--accent-dark);
    }

    .menu-number {
      display: inline-grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: 1px solid #e5e7eb;
      background: #f8fafc;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .menu-button.active .menu-number {
      background: var(--accent);
      border-color: var(--line);
      color: #fff;
    }

    .menu-button.menu-back {
      grid-template-columns: 1fr;
      min-height: 36px;
      color: var(--accent-dark);
      font-weight: 800;
    }

    .practice-panel {
      overflow: hidden;
    }

    .panel-head {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 16px;
      align-items: center;
      padding: 22px;
      border-bottom: 1px solid #e5e7eb;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    }

    .kicker {
      display: block;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
      text-transform: uppercase;
    }

    h2 {
      margin: 0;
      font-size: clamp(1.6rem, 4vw, 2.9rem);
      line-height: 0.95;
    }

    .score {
      min-width: 320px;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 18px;
      border-left: 1px solid #e5e7eb;
      padding-left: 22px;
      color: var(--muted);
      font-weight: 900;
    }

    .score-item {
      text-align: center;
    }

    .score-item span {
      display: block;
      margin-bottom: 8px;
      font-size: 1.05rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .score strong {
      display: block;
      color: var(--accent-dark);
      font-size: 3rem;
      line-height: 1;
    }

    #correctScore {
      color: var(--good);
    }

    #wrongScore {
      color: var(--bad);
    }

    .progress {
      width: 100%;
      height: 10px;
      margin-top: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: #e5e7eb;
    }

    .progress-fill {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: var(--accent);
      box-shadow: 0 0 16px rgb(15 118 110 / 28%);
      transition: width 180ms ease;
    }

    .practice-body {
      display: grid;
      gap: 16px;
      padding: 20px;
    }

    .app-brand {
      display: inline-flex;
      align-items: center;
      gap: 24px;
      color: var(--accent-dark);
      font-weight: 900;
      font-size: 3rem;
      letter-spacing: 0;
    }

    .app-brand .brand-mark {
      width: 120px;
      height: 120px;
    }

    .practice-shell {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
      align-items: start;
      padding: 20px;
    }

    .practice-shell .practice-body {
      padding: 0;
    }

    .topic-panel {
      border: 1px solid #e5e7eb;
      border-radius: 14px;
      background: #ffffff;
      padding: 20px;
      box-shadow: var(--shadow-sm);
    }

    .topic-panel h3 {
      display: none;
    }

    .topic-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
    }

    .verb-choice {
      display: grid;
      gap: 8px;
      margin-bottom: 4px;
    }

    .verb-choice label {
      color: #1d63d8;
      font-size: 0.95rem;
      font-weight: 900;
    }

    .topic-button {
      min-height: 70px;
      border: 1px solid #e5e7eb;
      border-radius: 999px;
      background: #fff;
      color: var(--ink);
      display: grid;
      grid-template-columns: 58px minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      padding: 6px 14px 6px 6px;
      text-align: left;
      font-weight: 800;
      font-size: 0.9rem;
      cursor: pointer;
      box-shadow: 0 4px 12px rgb(17 24 39 / 4%);
      transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
    }

    .topic-button:hover {
      transform: translateY(-2px);
      border-color: #b7d9d1;
      box-shadow: 0 10px 22px rgb(17 24 39 / 8%);
    }

    .topic-dot {
      display: inline-grid;
      place-items: center;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: #fff1b8;
      border: 1px solid #f2c94c;
      color: var(--accent-dark);
      font-size: 0.8rem;
      font-weight: 900;
    }

    .topic-button.irregular .topic-dot {
      background: #ffe6dc;
      border-color: var(--line);
      color: #a23b49;
    }

    .topic-button.mixed .topic-dot {
      background: #eef7ff;
      border-color: var(--line);
      color: var(--accent-dark);
    }

    .topic-dot .rocket-logo {
      width: 36px;
      height: 42px;
    }

    .topic-button.active {
      border-color: #22c55e;
      background: #bbf7d0;
      color: var(--accent-dark);
      box-shadow: 0 12px 26px rgb(34 197 94 / 16%);
    }

    .prompt-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .prompt-card,
    .help-card {
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      background: #ffffff;
      padding: 14px;
      box-shadow: 0 8px 20px rgb(17 24 39 / 5%);
    }

    .prompt-card {
      min-height: 96px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    }

    .prompt-card span,
    .help-card span {
      display: block;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
      text-transform: uppercase;
    }

    .prompt-card strong {
      display: block;
      color: var(--accent-dark);
      font-size: clamp(1.25rem, 2.4vw, 1.9rem);
      font-weight: 900;
      line-height: 1.05;
    }

    .answer-area {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: end;
      border-top: 1px solid #e5e7eb;
      padding-top: 16px;
    }

    .accent-keys {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .accent-key {
      display: inline-grid;
      place-items: center;
      min-width: 46px;
      min-height: 42px;
      border: 1px solid #dbe3ee;
      border-radius: 999px;
      background: #f8fafc;
      color: var(--accent-dark);
      font-size: 1.2rem;
      font-weight: 900;
      cursor: pointer;
      transition: background 140ms ease, transform 140ms ease;
    }

    .accent-key:hover {
      background: #dcfce7;
      transform: translateY(-1px);
    }

    #answerInput {
      min-height: 92px;
      font-size: 3rem;
      font-weight: 800;
      line-height: 1;
      padding: 10px 16px;
      border: 2px solid #dbe3ee;
      border-radius: 14px;
      background: #ffffff;
      box-shadow: inset 0 2px 8px rgb(17 24 39 / 5%);
    }

    .action-button {
      min-height: 46px;
      border: 1px solid #dbe3ee;
      border-radius: 10px;
      background: #fff;
      color: var(--ink);
      padding: 0 16px;
      font-weight: 800;
      cursor: pointer;
      transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
    }

    .action-button:hover {
      transform: translateY(-1px);
      border-color: #b7d9d1;
      box-shadow: 0 8px 20px rgb(17 24 39 / 8%);
    }

    .action-button.primary {
      border-color: var(--accent);
      background: var(--accent);
      color: #fff;
    }

    .help-action {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      min-height: 68px;
      border-radius: 999px;
      padding: 0 26px;
      font-size: 1.25rem;
      font-weight: 900;
    }

    .help-icon {
      display: inline-grid;
      place-items: center;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-size: 1.35rem;
      line-height: 1;
      font-weight: 900;
    }

    .feedback {
      min-height: 32px;
      font-weight: 800;
      color: var(--muted);
      border-radius: 10px;
      padding: 4px 0;
    }

    .feedback.good {
      color: var(--good);
    }

    .feedback.bad {
      color: var(--bad);
    }

    .page-result {
      border: 2px solid var(--accent);
      border-radius: 8px;
      background: #f1fbf5;
      padding: 18px;
    }

    .page-result h3 {
      margin: 0 0 12px;
      color: var(--accent-dark);
      font-size: 1.5rem;
    }

    .page-result-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .page-result-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #ffffff;
      padding: 14px;
    }

    .page-result-card span {
      display: block;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .page-result-card strong {
      display: block;
      color: var(--accent-dark);
      font-size: 2.4rem;
      line-height: 1;
    }

    .page-result-card.mistakes strong {
      color: var(--bad);
    }

    .help-panel {
      border: 1px solid #e5e7eb;
      border-radius: 14px;
      background: #f8fafc;
      padding: 20px;
      margin: 0;
      box-shadow: var(--shadow-sm);
    }

    .help-panel[hidden] {
      display: none;
    }

    .help-title {
      margin: 0 0 16px;
      border-bottom: 1px solid #e5e7eb;
      padding-bottom: 12px;
      color: var(--accent-dark);
      font-size: 1.1rem;
    }

    .help-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .help-card {
      background: white;
      transition: transform 140ms ease, box-shadow 140ms ease;
    }

    .help-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 28px rgb(17 24 39 / 8%);
    }

    .help-card strong {
      display: block;
      color: var(--accent-dark);
      font-size: 1.15rem;
      font-weight: 900;
      line-height: 1.15;
    }

    .help-intro {
      grid-column: 1 / -1;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #ffffff;
      padding: 14px;
      font-weight: 900;
    }

    .help-intro span {
      display: block;
      margin-bottom: 6px;
      color: var(--muted);
      font-size: 0.82rem;
      text-transform: uppercase;
    }

    .hint {
      border-top: 1px solid var(--line);
      padding-top: 14px;
      color: var(--muted);
      font-size: 0.9rem;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgb(23 33 31 / 48%);
    }

    .result-modal {
      position: relative;
      width: min(620px, 100%);
      border: 1px solid var(--line);
      border-top: 6px solid var(--accent);
      border-radius: 8px;
      background: #fff;
      padding: 34px;
      text-align: center;
      box-shadow: 0 28px 70px rgb(23 33 31 / 24%);
    }

    .result-modal h2 {
      margin-bottom: 18px;
      font-size: 1.6rem;
    }

    .result-percent {
      display: block;
      margin-bottom: 12px;
      color: var(--accent-dark);
      font-size: 4.5rem;
      line-height: 1;
    }

    .result-details {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 24px;
      color: var(--muted);
      font-weight: 800;
    }

    .result-stat {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f8fbfa;
      padding: 18px;
    }

    .result-stat span {
      display: block;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 0.9rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .result-stat strong {
      display: block;
      color: var(--accent-dark);
      font-size: 2.8rem;
      line-height: 1;
    }

    .result-stat small {
      display: block;
      margin-top: 10px;
      color: var(--muted);
      font-size: 0.95rem;
      font-weight: 900;
    }

    .result-stat.mistakes strong {
      color: var(--bad);
    }

    .result-note {
      grid-column: 1 / -1;
      margin: 0;
      color: var(--muted);
      font-weight: 900;
    }

    .modal-actions {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .premium-modal {
      width: min(920px, 100%);
      max-height: calc(100vh - 48px);
      overflow: auto;
      border: 1px solid #d7dce2;
      border-radius: 12px;
      background: #f8fafc;
      padding: 26px;
      color: #111827;
      box-shadow: 0 34px 90px rgb(17 24 39 / 32%);
    }

    .premium-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
      border-bottom: 1px solid #e5e7eb;
      padding-bottom: 16px;
    }

    .premium-head h2 {
      margin: 4px 0 0;
      color: #111827;
      font-size: clamp(1.75rem, 3vw, 2.35rem);
      line-height: 1;
    }

    .premium-subtitle {
      max-width: 640px;
      margin-top: 8px;
      color: #4b5563;
      font-size: 0.92rem;
      font-weight: 800;
    }

    .premium-close {
      display: inline-grid;
      place-items: center;
      width: 40px;
      height: 40px;
      border: 1px solid #d1d5db;
      border-radius: 50%;
      background: #ffffff;
      color: #111827;
      font-size: 1.3rem;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 8px 20px rgb(17 24 39 / 8%);
    }

    .premium-close:hover {
      background: #fee2e2;
      border-color: #fca5a5;
    }

    .premium-message {
      min-height: 28px;
      margin-bottom: 14px;
      color: var(--bad);
      font-weight: 900;
    }

    .premium-message.good {
      color: var(--good);
    }

    .pricing-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .pricing-card {
      display: grid;
      gap: 12px;
      align-content: start;
      min-height: 420px;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      background: #ffffff;
      padding: 18px;
      box-shadow: 0 18px 42px rgb(17 24 39 / 8%);
      transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    }

    .pricing-card:hover {
      transform: translateY(-4px);
      border-color: #d1d5db;
      box-shadow: 0 26px 56px rgb(17 24 39 / 14%);
    }

    .pricing-card.featured {
      border: 2px solid #ef4a32;
      background: #fffaf5;
      transform: translateY(-6px);
      box-shadow: 0 28px 68px rgb(239 74 50 / 18%);
    }

    .pricing-card.featured:hover {
      transform: translateY(-10px);
    }

    .plan-tag {
      width: max-content;
      border: 1px solid #fca5a5;
      border-radius: 999px;
      background: #fff1f0;
      color: #991b1b;
      padding: 6px 12px;
      font-size: 0.78rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .pricing-card h3 {
      margin: 0;
      color: #111827;
      font-size: 1.55rem;
    }

    .pricing-card strong {
      color: #0f766e;
      font-size: clamp(1.28rem, 2vw, 1.65rem);
      line-height: 1;
    }

    .pricing-card p {
      min-height: 62px;
      font-size: 0.92rem;
      color: #4b5563;
      font-weight: 800;
    }

    .plan-features {
      display: grid;
      gap: 8px;
      min-height: 86px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .plan-features li {
      position: relative;
      padding-left: 22px;
      font-size: 0.9rem;
      color: #374151;
      font-weight: 800;
      line-height: 1.35;
    }

    .plan-features li::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0.35em;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #16a34a;
      box-shadow: inset 0 0 0 4px #dcfce7;
    }

    .plan-button {
      min-height: 46px;
      border: 1px solid #0f766e;
      border-radius: 999px;
      background: #0f766e;
      color: #fff;
      padding: 0 18px;
      font-size: 0.92rem;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 12px 24px rgb(15 118 110 / 18%);
    }

    .plan-button:hover {
      background: #115e59;
      border-color: #115e59;
    }

    .paypal-slot {
      min-height: 48px;
    }

    @media (max-width: 1100px) {
      .layout {
        grid-template-columns: 1fr;
      }

      aside {
        position: static;
      }

      .pricing-grid {
        grid-template-columns: 1fr;
      }

      .pricing-card.featured {
        transform: none;
      }
    }

    @media (max-width: 860px) {
      body {
        padding: 12px;
      }

      header,
      .auth-screen,
      .layout,
      .panel-head,
      .practice-shell,
      .prompt-grid,
      .answer-area,
      .help-grid {
        display: grid;
        grid-template-columns: 1fr;
      }

      header {
        align-items: start;
      }

      .header-actions {
        justify-content: start;
      }

      .app-brand {
        gap: 14px;
        font-size: 1.8rem;
      }

      .app-brand .brand-mark {
        width: 72px;
        height: 72px;
      }

      .auth-left,
      .auth-art {
        min-height: auto;
      }

      .auth-left {
        min-height: 560px;
        padding: 22px;
      }

      .auth-art {
        min-height: 360px;
      }

      .email-form {
        grid-template-columns: 1fr;
      }

      aside {
        position: static;
      }

      .menu {
        max-height: none;
      }

      .score {
        border-left: 0;
        border-top: 1px solid #e5e7eb;
        padding: 14px 0 0;
      }

      #answerInput {
        font-size: 2rem;
      }

      .premium-modal,
      .result-modal {
        padding: 20px;
      }
    }
  
