/* C2 / คู่หู: original gray body, cyan face, tactile circular keys. */
#app:has(.calculator-layout)>.game-topline{max-width:780px;margin-left:auto;margin-right:auto}
.calculator-layout{max-width:780px;margin:0 auto;grid-template-columns:minmax(0,430px) 270px;gap:26px;align-items:start;justify-content:center}
.calculator-device{--calc-body:#e4e6ea;--calc-rim:#bdbdbd;--calc-lcd:#252a33;--calc-cyan:#2ffafe;--calc-yellow:#ffc61a;--calc-edge:#b3b7be;background:var(--calc-body);border:1px solid #d1d5dc;border-bottom:5px solid #b8bdc6;border-radius:24px 24px 28px 28px;box-shadow:0 10px 35px #293c5010;overflow:hidden;min-width:0}
.calculator-cap{width:136px;height:13px;background:var(--calc-cyan);box-shadow:0 3px 0 #16b5b8;border-radius:0 0 10px 10px;margin:0 auto 10px}
.calculator-bezel{background:var(--calc-rim);border-radius:26px;margin:0 12px;padding:7px;box-shadow:inset 0 2px 0 #ffffff90,0 3px 0 #a3a3a3}
.calculator-screen{background:var(--calc-lcd);border-radius:20px;padding:13px 15px;color:#e8f4ff;min-width:0}
.calculator-status{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;font-weight:700;color:#b5c4de;min-height:27px;line-height:1.3}
.calculator-status .calc-level{background:#343b47;border-radius:8px;padding:5px 9px;font-size:11px;color:#e8f4ff;white-space:nowrap}
.calculator-face{width:55px;height:22px;object-fit:contain;margin-left:auto;margin-right:5px}
.calculator-screen .timer{font-size:20px;color:#e8f4ff;line-height:1.3}
.calculator-screen .timer.urgent{color:#ff9c9c}
.calculator-screen .time-track{background:#343b47;height:5px;margin:9px 0 12px}
.calculator-screen .time-fill{background:var(--orange)}
.calculator-question-area{background:#1d2128;border-radius:13px;padding:12px;position:relative}
.calculator-question-area>div:first-child{font-size:10px;line-height:1.4}
.calculator-screen .question-eyebrow{font-size:10px;color:#91a4be;text-align:left;font-weight:400;letter-spacing:.1px;line-height:1.4}
.calculator-screen .question{color:#fff;font-size:54px;line-height:1.15;gap:18px;letter-spacing:-1px;margin:9px 0 11px}
.calculator-screen .question .operator{font-size:38px;color:#ffb05f;font-weight:700}
.calculator-screen .answer-form{max-width:none;width:100%;display:block;position:relative}
.calculator-screen .answer-form:before{content:'=';position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#8aa1b9;font-size:24px;font-weight:700}
.calculator-screen .answer-form input{height:51px;border:1px solid #425466;border-bottom:2px solid #546a80;background:#2a333e;color:var(--calc-cyan);border-radius:9px;text-align:center;font-size:30px;caret-color:#ffb05f;letter-spacing:1px;padding:0 36px;box-shadow:none}
.calculator-screen .answer-form input::placeholder{color:#698396;font-size:24px}
.calculator-screen .answer-form input:focus{outline:2px solid #2ffafe80;outline-offset:2px;border-color:#2ffafe}
.calculator-screen .answer-form input.good{background:#174834;border-color:#4cba82;color:#a2f6bf}
.calculator-screen .answer-form input.bad{background:#492b32;border-color:#e8757d;color:#ffb1b1}
.calculator-screen .feedback{margin:8px 0 0;min-height:30px;font-size:11px;line-height:1.5;text-align:left;color:#c4d1e2;display:flex;align-items:center}
.calculator-screen .feedback.good{color:#9ce4b5}.calculator-screen .feedback.bad{color:#ffa6ad}
.calculator-screen .score-strip{background:#343b47;margin-top:6px;padding:7px 0;border-radius:9px;gap:0}
.calculator-screen .score-strip div{border-color:#48515f;line-height:1.2}
.calculator-screen .score-strip strong{color:#f1fbff;font-size:18px;line-height:1.2}
.calculator-screen .score-strip small{display:block;font-size:9px;line-height:1.3;color:#a8b8ce;margin-top:3px}
.calculator-keys{padding:16px}
.calculator-keys .keypad{grid-template-columns:repeat(4,minmax(0,1fr));justify-items:stretch;gap:10px;margin:0}
.calculator-keys .keypad button{width:100%;height:auto;aspect-ratio:1;min-height:0;border:0;border-radius:50%;background:#fff;box-shadow:0 4px 0 var(--calc-edge);color:#20263a;font-size:36px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;padding:0;transition:background .12s,box-shadow .12s;transform-origin:center;touch-action:manipulation}
.calculator-keys .keypad button:hover{background:#f4fbff;box-shadow:0 4px 0 var(--calc-edge),0 0 0 3px #c2d4e6}
.calculator-keys .keypad button:active{transform:translateY(4px) scale(.96);box-shadow:0 0 0 var(--calc-edge)}
.calculator-keys .keypad button.small-key{width:100%;height:100%;aspect-ratio:1;align-self:stretch;border-radius:20px;font-size:22px;background:#edf0f6;color:#55607a;box-shadow:0 4px 0 #bfc6d2}
.calculator-keys .keypad button:disabled{background:#d2d5db;color:#929ca8;box-shadow:inset 0 2px 0 #bdc1c8;transform:translateY(3px);opacity:1}
.calculator-action-row{display:flex;gap:10px;margin-top:15px}
.calculator-action-row button{display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:13px;font-size:16px;font-weight:700;line-height:1.3;min-height:52px;padding:10px 17px;transition:background .12s;touch-action:manipulation}
.calculator-action-row button:active{transform:translateY(4px) scale(.985);box-shadow:none}
.calculator-submit{background:#ffc61a;color:#20263a;box-shadow:0 4px 0 #d99a00;flex:1}
.calculator-submit:hover{background:#ffd147}.calculator-submit:disabled{background:#cdd1d7;box-shadow:0 4px 0 #aeb3ba;color:#6a7484;opacity:1}
.calculator-skip{background:#e3ecfb;color:#2e56ab;box-shadow:0 4px 0 #bfcfe6}
.calculator-footer{display:flex;align-items:center;justify-content:space-between;margin:12px 0 0;color:#7b8798;font-size:9px;line-height:1.4;gap:8px}
.calculator-footer .calc-model{letter-spacing:1.3px;font-weight:700;font-size:8px;color:#8c96a4}
.calculator-footer kbd{font:9px IBM;border:1px solid #c4cbd4;border-radius:4px;padding:0 4px;color:#748394}
.calculator-layout .sidebar .panel{margin-bottom:16px;padding:20px}
.calculator-layout .sidebar h3{font-size:16px}.calculator-layout .sidebar p{font-size:12px;line-height:1.9}
.calc-reference{display:flex;align-items:center;gap:13px;margin-bottom:14px}.calc-reference img{width:74px;height:87px;object-fit:contain}.calc-reference strong{font-size:14px;display:block}.calc-reference small{font-size:10px;color:#7f90a7}
.calc-rules{padding:0;margin:12px 0 0;list-style:none;font-size:12px;color:#74879e}.calc-rules li{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid #e7eef6;gap:10px}.calc-rules strong{color:#37516e}
.calculator-screen .duel-players{margin:0 0 10px;gap:9px}.calculator-screen .player{background:#293e52;border-color:#3b5873;padding:7px 9px;border-radius:9px;gap:7px}.calculator-screen .player.bot{background:#453e31;border-color:#645740}.calculator-screen .player-avatar{background:#354d65;color:#b9e8ff;width:26px;height:26px;font-size:9px;border-radius:7px}.calculator-screen .bot .player-avatar{background:#61563f}.calculator-screen .player strong{font-size:10px;color:#d9ebff;line-height:1.3}.calculator-screen .player small{font-size:8px;color:#93a6bc;line-height:1.3}.calculator-screen .player-score{color:#2ffafe;font-size:21px}.calculator-screen .bot .player-score{color:#ffd07b}.calculator-screen .versus{font-size:9px;color:#8b9cb0}.calculator-screen .player-avatar img{width:25px;height:25px}.calculator-screen .round-dots{margin:10px 0 5px}.calculator-screen .round-dot{width:6px;height:6px;background:#4a5668}.calculator-screen .round-dot.done{background:#628b9d}.calculator-screen .round-dot.active{background:#2ffafe;box-shadow:0 0 0 3px #2ffafe20}.calculator-screen #bot-status{color:#9aafc2;font-size:9px;text-align:center}
@media(min-width:900px){
  #app:has(.calculator-layout){padding-top:24px}
  #app:has(.calculator-layout)>.game-topline{max-width:1100px;margin-bottom:17px}
  .calculator-layout{max-width:1100px;grid-template-columns:minmax(0,1fr);gap:18px}
  .calculator-device{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:0 20px;padding:0 20px 20px;border-radius:25px}
  .calculator-cap{grid-column:1/-1;margin-bottom:15px}
  .calculator-bezel{margin:0;border-radius:24px}
  .calculator-screen{height:100%;min-height:0;display:flex;flex-direction:column;padding:15px}
  .calculator-question-area{flex:1;display:flex;flex-direction:column;justify-content:center;padding:17px}
  .calculator-question-area>div:first-child{display:flex!important;justify-content:space-between;align-items:center}
  .calculator-screen .question{font-size:68px;gap:24px;margin:12px 0 17px}
  .calculator-screen .question .operator{font-size:45px}
  .calculator-screen .answer-form input{height:59px;font-size:36px}
  .calculator-screen .feedback{min-height:32px;font-size:12px}
  .calculator-keys{padding:0}
  .calculator-keys .keypad{gap:12px}
  .calculator-keys .keypad button{font-size:40px}
  .calculator-keys .keypad button.small-key{font-size:24px;border-radius:23px}
  .calculator-action-row{margin-top:17px}
  .calculator-action-row button{min-height:56px;font-size:17px}
  .calculator-layout .sidebar{display:grid;grid-template-columns:1.15fr 1fr;gap:18px}
  .calculator-layout .sidebar .panel{margin:0;padding:17px 20px}
  .calculator-layout .sidebar .panel:first-child{display:grid;grid-template-columns:1fr 1fr;column-gap:20px;align-items:center}
  .calculator-layout .calc-reference{grid-column:1/-1;margin-bottom:8px;gap:10px}
  .calculator-layout .calc-reference img{width:40px;height:40px}
  .calculator-layout .calc-reference strong{font-size:13px}
  .calculator-layout .sidebar .panel:first-child>h3{font-size:14px}
  .calculator-layout .sidebar .panel:first-child>p{font-size:11px}
  .calculator-layout .calc-rules{grid-column:2;grid-row:2/span 2;margin:0;font-size:11px}
  .calculator-layout .calc-rules li{padding:6px 0}
  .calculator-layout .side-footnote{grid-column:1/-1;text-align:center}
}
@media(min-width:761px) and (max-width:899px){.calculator-layout{grid-template-columns:minmax(0,400px) 230px;gap:20px}.calculator-screen{padding:12px}.calculator-keys{padding:15px}}
@media(max-width:760px){
  #app:has(.calculator-layout){padding-top:14px;padding-bottom:12px}
  #app:has(.calculator-layout)>.game-topline{margin-bottom:11px;max-width:400px}
  .calculator-layout{display:block;max-width:400px}
  .calculator-device{border-radius:19px 19px 24px 24px}
  .calculator-cap{height:10px;width:116px;margin-bottom:8px}
  .calculator-bezel{margin:0 10px;padding:6px;border-radius:23px}
  .calculator-screen{padding:10px 12px 9px;border-radius:17px}
  .calculator-status{min-height:24px}.calculator-status .calc-level{font-size:10px;padding:4px 7px}
  .calculator-face{width:47px;height:19px;margin-right:0}
  .calculator-screen .timer{font-size:18px}
  .calculator-screen .time-track{height:4px;margin:7px 0 9px}
  .calculator-question-area{padding:10px 11px;border-radius:11px}
  .calculator-question-area>div:first-child{font-size:9px;line-height:1.4}
  .calculator-screen .question-eyebrow{font-size:9px}
  .calculator-screen .question{font-size:47px;line-height:1.15;gap:17px;margin:7px 0 8px}
  .calculator-screen .question .operator{font-size:31px}
  .calculator-screen .answer-form input{height:46px;font-size:29px}
  .calculator-screen .answer-form input::placeholder{font-size:22px}
  .calculator-screen .feedback{font-size:10px;min-height:26px;margin:5px 0 0}
  .calculator-screen .score-strip{padding:6px 0;margin-top:5px}
  .calculator-screen .score-strip strong{font-size:17px}.calculator-screen .score-strip small{font-size:8px;line-height:1.3;margin-top:2px}
  .calculator-keys{padding:14px}
  .calculator-keys .keypad{gap:8px}
  .calculator-keys .keypad button{font-size:32px}
  .calculator-keys .keypad button.small-key{font-size:19px;border-radius:18px}
  .calculator-action-row{margin-top:14px;gap:9px}
  .calculator-action-row button{min-height:48px;font-size:15px;padding:8px 13px}
  .calculator-footer{margin-top:11px;font-size:8px}
  .calculator-layout .sidebar{display:none}
  .calculator-screen .duel-players{gap:7px;margin-bottom:8px}
  .calculator-screen .player{padding:6px 7px}.calculator-screen .player strong{font-size:9px}.calculator-screen .player-score{font-size:18px}
  .calculator-screen .player-avatar{width:23px;height:23px}.calculator-screen .player-avatar img{width:22px;height:22px}
  .calculator-screen .round-dots{margin:6px 0 3px}.calculator-screen #bot-status{font-size:8px}
}
@media(max-width:360px){.calculator-keys{padding:12px}.calculator-keys .keypad{gap:7px}.calculator-keys .keypad button{font-size:28px}.calculator-keys .keypad button.small-key{font-size:17px;border-radius:15px}.calculator-status .calc-level{font-size:9px}.calculator-face{width:38px}.calculator-screen .question{font-size:43px}}
