:root { --app-accent: #8d6bd8; --app-accent-soft: #f0eaff; --power: var(--app-accent); --power-soft: var(--app-accent-soft); }
.power-frame { min-height: 100vh; }
.power-brand-mark { width: 54px; background: var(--purple); color: white; font-size: 18px; }
.power-header-status { display: grid; justify-items: end; color: var(--muted); font-size: 11px; font-weight: 800; }
.power-header-status strong { color: var(--power); font-size: 15px; }
.power-screen { padding: clamp(24px, 5vw, 52px); }
.power-screen[hidden] { display: none; }
.power-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.power-hero h1, .result-screen > h1 { margin: 0; font-size: clamp(43px, 7vw, 72px); line-height: 1.02; letter-spacing: -.05em; }
.power-hero h1 em { color: var(--power); font-style: normal; }
.hero-copy { max-width: 520px; margin: 19px 0 0; color: var(--muted); line-height: 1.85; }
.power-doodle { position: relative; display: flex; align-items: center; justify-content: center; min-height: 190px; transform: rotate(-2deg); }
.power-mini-doodle { position: absolute; top: -48px; right: -6px; transform: rotate(5deg); }
.power-doodle span, .power-doodle strong { display: grid; place-items: center; min-width: 118px; height: 92px; padding: 0 14px; border: 3px solid var(--ink); border-radius: 18px 14px 20px 15px; box-shadow: 4px 5px 0 var(--ink); font-size: 28px; font-weight: 900; }
.power-doodle span { background: var(--power-soft); }
.power-doodle strong { min-width: 94px; background: var(--yellow-soft); font-size: 34px; }
.power-doodle i { margin: 0 10px; color: var(--coral); font-size: 24px; font-style: normal; font-weight: 900; }
.power-doodle small { position: absolute; right: 5%; bottom: 12px; padding: 7px 10px; border-radius: 9px; background: var(--mint); color: white; font-weight: 900; transform: rotate(5deg); }
.power-sheet { margin-top: 34px; padding: 20px; border: 2px solid var(--ink); border-radius: 19px 16px 22px 17px; background: white; box-shadow: 3px 4px 0 var(--ink); }
.level-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.power-level { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 76px; padding: 12px 15px; border: 2px solid var(--ink); border-radius: 15px 12px 17px 13px; background: var(--level-color); color: var(--ink); cursor: pointer; text-align: left; box-shadow: 3px 4px 0 var(--ink); }
.power-level:hover, .special-button:hover { transform: translateY(-2px); box-shadow: 4px 6px 0 var(--ink); }
.power-level:last-child { grid-column: 1 / -1; }
.level-one { --level-color: var(--mint-soft); }
.level-two { --level-color: var(--yellow-soft); }
.level-three { --level-color: #fff0ec; }
.level-four { --level-color: var(--power-soft); }
.level-five { --level-color: #e9f1ff; }
.level-number { display: grid; place-items: center; width: 43px; height: 43px; border: 2px solid var(--ink); border-radius: 50%; background: white; font-size: 19px; font-weight: 900; }
.power-level strong, .power-level small { display: block; }
.power-level strong { font-size: 15px; }
.power-level small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.power-level b { font-size: 21px; }
.special-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 21px; }
.special-button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 1px 10px; align-items: center; min-height: 68px; padding: 11px 15px; border: 1px dashed #aab4c4; border-radius: 14px; background: rgba(255,255,255,.78); cursor: pointer; text-align: left; }
.special-button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--power-soft); font-size: 18px; }
.special-button strong { align-self: end; }
.special-button small { align-self: start; color: var(--muted); font-size: 10px; font-weight: 800; }
.special-button:disabled { cursor: not-allowed; opacity: .45; }
.home-record { margin: 18px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.game-topline { display: grid; grid-template-columns: 1fr auto auto; gap: 20px; align-items: center; }
.progress-track { width: min(360px, 45vw); height: 9px; overflow: hidden; border-radius: 10px; background: #e3e7ed; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--power); transition: width .25s ease; }
.live-time { display: grid; grid-template-columns: auto auto; align-items: baseline; color: var(--muted); }
.live-time small { grid-column: 1 / 3; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.live-time strong { color: var(--power); font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.live-time span { font-size: 11px; font-weight: 800; }
.quiet-button { min-height: 44px; padding: 9px 15px; border: 1px solid #cbd3df; border-radius: 11px; background: white; cursor: pointer; font-weight: 900; }
.question-stage { margin: 30px auto 18px; text-align: center; }
.question-stage > p:first-child { margin: 0 0 5px; color: var(--power); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.question-stage h1 { display: flex; align-items: center; justify-content: center; margin: 0; font-size: clamp(48px, 10vw, 88px); line-height: 1.05; letter-spacing: -.05em; }
.question-stage h1 i { margin: 0 .2em; color: var(--coral); font-size: .56em; font-style: normal; }
.question-stage h1 em { color: var(--muted); font-size: .8em; font-style: normal; }
.power-notation { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.answer-feedback { min-height: 29px; margin: 15px 0 0; color: var(--muted); font-size: 17px; font-weight: 900; }
.answer-feedback.good { color: #16826d; }
.answer-feedback.bad { color: #dc4f3a; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(620px, 100%); margin: 0 auto; }
.answer-choice { min-height: 91px; border: 3px solid var(--ink); border-radius: 18px 14px 20px 15px; background: white; color: var(--ink); cursor: pointer; font-size: clamp(29px, 6vw, 42px); font-weight: 900; box-shadow: 4px 5px 0 var(--ink); transition: transform .1s ease, background .1s ease; }
.answer-choice:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 5px 8px 0 var(--ink); }
.answer-choice:active:not(:disabled) { transform: translateY(2px); box-shadow: 1px 2px 0 var(--ink); }
.answer-choice.is-correct { border-color: #13725f; background: var(--mint); color: white; box-shadow: 4px 5px 0 #13725f; }
.answer-choice.is-wrong { border-color: #b83d2a; background: var(--coral); color: white; box-shadow: 4px 5px 0 #b83d2a; }
.answer-choice:disabled { opacity: .56; }
.answer-choice.is-correct:disabled, .answer-choice.is-wrong:disabled { opacity: 1; }
.result-screen { text-align: center; }
.result-screen > h1 { font-size: clamp(40px, 7vw, 64px); }
.result-comment { color: var(--muted); font-weight: 800; }
.power-result-stats { grid-template-columns: repeat(4, 1fr); }
.power-result-stats div:nth-child(1) { background: var(--power-soft); }
.power-result-stats div:nth-child(2) { background: var(--yellow-soft); }
.power-result-stats div:nth-child(3) { background: var(--mint-soft); }
.power-result-stats div:nth-child(4) { background: var(--coral-soft); }
.best-message { min-height: 25px; color: var(--power); font-size: 17px; font-weight: 900; }
.power-result-list { display: grid; gap: 7px; margin: 24px 0 0; padding: 0; list-style: none; text-align: left; }
.power-result-list li { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 9px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.power-result-list li.needs-review { background: var(--coral-soft); }
.result-index { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--power-soft); font-weight: 900; }
.power-result-list small { color: var(--muted); font-weight: 800; }
.mistake-pill { min-width: 52px; color: var(--coral); text-align: right; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.start-button { min-height: 54px; border: 2px solid var(--ink); border-radius: 15px; cursor: pointer; box-shadow: 3px 4px 0 var(--ink); }
.compact-start { display: block; background: var(--yellow); text-align: center; font-weight: 900; }
.large-quiet { min-height: 54px; }
.power-level:focus-visible, .special-button:focus-visible, .answer-choice:focus-visible, .quiet-button:focus-visible { outline: 5px solid rgba(75,136,229,.3); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
@media (min-width: 721px) and (max-height: 980px) {
  .power-frame { min-height: calc(100dvh - 20px); }
  .power-screen { padding: 18px 28px; }
  .power-hero { gap: 24px; }
  .power-hero h1 { font-size: clamp(38px, 5.2vw, 56px); line-height: 1; }
  .hero-copy { margin-top: 12px; line-height: 1.65; }
  .power-doodle { min-height: 140px; transform: rotate(1deg) scale(.82); }
  .power-sheet {
    margin-top: 18px;
    padding: 14px;
  }
  .power-level {
    min-height: 62px;
    padding: 9px 12px;
  }
  .power-level small { margin-top: 2px; }
  .special-actions {
    gap: 10px;
    margin-top: 14px;
  }
  .special-button {
    min-height: 58px;
    padding: 9px 12px;
  }
}
@media (max-width: 760px) {
  .power-screen { padding: 10px 12px 12px; }
  .power-hero { display: block; }
  .power-hero h1 { font-size: clamp(26px, 7vw, 34px); line-height: 1.08; }
  .power-hero h1 br { display: none; }
  .hero-copy { margin-top: 7px; font-size: 12px; line-height: 1.55; }
  .power-doodle { display: none; }
  .power-sheet { margin-top: 10px; padding: 10px; }
  .level-grid, .special-actions { grid-template-columns: 1fr; }
  .power-level:last-child { grid-column: auto; }
  .power-level { min-height: 52px; padding: 9px 11px; }
  .power-level small { display: none; }
  .special-actions { margin-top: 10px; }
  .special-button { min-height: 50px; padding: 8px 11px; }
  .power-result-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .power-header-status { display: none; }
  .game-topline { grid-template-columns: 1fr auto; }
  .live-time { grid-row: 2; }
  .game-topline .quiet-button { grid-column: 2; grid-row: 1 / 3; }
  .question-stage { margin-top: 18px; }
  .question-stage h1 { font-size: 47px; }
  .answer-choice { min-height: 80px; }
  .result-actions { grid-template-columns: 1fr; }
}
