body.finger-page, body.finger-page * { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
body.finger-page main { min-height: 100dvh; background: radial-gradient(circle at 9% 17%, #fff 0 3px, transparent 4px), linear-gradient(#bfeaf2 0 300px, #fff8e7 300px); }
.finger-game { width: min(900px, calc(100% - 40px)); margin: 25px auto 42px; position: relative; z-index: 1; }
.finger-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; animation: finger-rise .5s ease-out both; }
.finger-heading > div:first-child > span { color: #2e7d87; font-size: 10px; letter-spacing: .16em; font-weight: 900; }
.finger-heading h1 { margin: 7px 0; font-size: clamp(38px, 5vw, 58px); line-height: 1; letter-spacing: -.05em; }
.finger-heading p { margin: 0; color: #526575; font-size: 13px; }
.finger-score { min-width: 112px; padding: 9px 14px; border: 3px solid var(--ink); border-radius: 18px; background: #e8dcff; box-shadow: 5px 5px 0 var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; }
.finger-score span { font-size: 30px; }
.finger-score b { color: #725ac6; font-size: 38px; line-height: 1; }
.finger-card { position: relative; overflow: hidden; border: 3px solid var(--ink); border-radius: 28px; background: #fff; box-shadow: 10px 10px 0 var(--ink); animation: finger-card-in .6s .08s cubic-bezier(.2,.8,.2,1) both; }
.finger-toolbar { position: absolute; z-index: 10; top: 14px; right: 14px; display: flex; gap: 8px; }
.finger-toolbar button { width: 50px; height: 44px; border: 2px solid var(--ink); border-radius: 13px; background: var(--blue); box-shadow: 3px 3px 0 var(--ink); font-size: 20px; cursor: pointer; }
.finger-toolbar button:last-child { background: var(--yellow); }
.finger-toolbar button.is-reading { background: #75c98b; animation: finger-listening .7s ease-in-out infinite; }
.finger-board { min-height: 500px; padding: 24px 28px 28px; background: linear-gradient(135deg, #fff9de, #e9f8ee); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.finger-visual { display: flex; align-items: center; justify-content: center; gap: 28px; }
.hand-wrap { width: 180px; height: 245px; display: grid; place-items: start center; }
.finger-hand { position: relative; width: 180px; height: 235px; filter: drop-shadow(7px 8px 0 #25304725); }
.finger-palm { position: absolute; z-index: 3; left: 34px; bottom: 13px; width: 116px; height: 121px; border: 4px solid var(--ink); border-radius: 42px 42px 50px 50px; background: #ffc89f; box-shadow: inset 10px 0 0 #ffb786; }
.hand-finger { position: absolute; z-index: 2; display: block; border: 4px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 7px 7px; background: #ffc89f; transform-origin: bottom center; transition: opacity .2s ease, transform .28s cubic-bezier(.2,.9,.2,1); }
.hand-finger.is-up { animation: finger-pop .42s cubic-bezier(.22,1.3,.42,1) both; }
.hand-finger.is-down { opacity: 0; transform: translateY(62px) scaleY(.35); }
.finger-index { left: 39px; bottom: 118px; width: 31px; height: 91px; }
.finger-middle { left: 70px; bottom: 118px; width: 32px; height: 111px; }
.finger-ring { left: 102px; bottom: 118px; width: 31px; height: 99px; }
.finger-pinky { left: 133px; bottom: 112px; width: 28px; height: 78px; }
.finger-thumb { z-index: 4; left: 2px; bottom: 63px; width: 70px; height: 37px; border-bottom: 4px solid var(--ink); border-radius: 24px 10px 10px 24px; transform: rotate(-34deg); transform-origin: right center; }
.finger-thumb.is-up { animation-name: finger-thumb-pop; }
.finger-thumb.is-down { opacity: 0; transform: translate(25px,20px) rotate(-12deg) scaleX(.45); }
.hand-right .finger-palm, .hand-right .hand-finger { background: #ffd67f; }
.hand-right .finger-palm { box-shadow: inset 10px 0 0 #ffc45c; }
.finger-plus { width: 68px; height: 68px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; box-shadow: 5px 5px 0 var(--ink); display: grid; place-items: center; color: var(--pink); font-size: 50px; font-weight: 900; }
.finger-equation { margin-top: -5px; display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 34px; }
.finger-equation b, .finger-equation strong { min-width: 58px; height: 58px; border: 3px solid var(--ink); border-radius: 17px; background: #fff; display: grid; place-items: center; box-shadow: 4px 4px 0 var(--ink); font-size: 38px; }
.finger-equation strong { background: #e8dcff; color: #725ac6; }
.finger-answers { width: min(100%, 520px); margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.finger-answer { min-height: 82px; border: 3px solid var(--ink); border-radius: 21px; background: #fff2bd; box-shadow: 6px 6px 0 var(--ink); color: var(--ink); font-size: 50px; font-weight: 900; cursor: pointer; }
.finger-answer:nth-child(2) { background: #dff5e5; }
.finger-answer:nth-child(3) { background: #ffdce5; }
.finger-answer:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--ink); }
.finger-answer.is-correct { background: #75c98b; color: #fff; animation: finger-correct .55s ease-out; }
.finger-answer.is-wrong { animation: finger-wrong .36s ease-out; }
.finger-card.is-correct .hand-wrap { animation: finger-hands-happy .55s ease-out; }
.finger-toast { position: fixed; z-index: 2000; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 13px 22px; border: 3px solid var(--ink); border-radius: 16px; background: var(--pink); color: #fff; box-shadow: 5px 5px 0 var(--ink); font-weight: 900; text-align: center; animation: finger-toast-in .3s ease-out; }
.finger-toast.is-warning { background: #f3a640; color: var(--ink); }
.finger-page footer { padding-bottom: env(safe-area-inset-bottom); }
@keyframes finger-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes finger-card-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes finger-listening { 50% { transform: scale(1.1); box-shadow: 5px 5px 0 var(--ink); } }
@keyframes finger-pop { from { opacity: 0; transform: translateY(60px) scaleY(.35); } 70% { opacity: 1; transform: translateY(-5px) scaleY(1.04); } to { opacity: 1; transform: none; } }
@keyframes finger-thumb-pop { from { opacity: 0; transform: translate(25px,20px) rotate(-12deg) scaleX(.45); } 70% { opacity: 1; transform: rotate(-39deg) scaleX(1.05); } to { opacity: 1; transform: rotate(-34deg); } }
@keyframes finger-correct { 45% { transform: scale(1.08) rotate(-2deg); } }
@keyframes finger-wrong { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
@keyframes finger-hands-happy { 45% { transform: translateY(-8px) rotate(-2deg); } }
@keyframes finger-toast-in { from { opacity: 0; transform: translate(-50%,-15px); } to { opacity: 1; transform: translateX(-50%); } }
@media (max-width: 760px) {
  .finger-page .topbar { width: calc(100% - 22px); }
  .finger-game { width: calc(100% - 22px); margin: 12px auto 27px; }
  .finger-heading { align-items: center; gap: 8px; margin-bottom: 10px; }
  .finger-heading h1 { margin-block: 4px; font-size: 30px; }
  .finger-heading p { max-width: 210px; font-size: 10px; }
  .finger-score { min-width: 78px; padding: 6px 8px; box-shadow: 3px 3px 0 var(--ink); }
  .finger-score span { font-size: 22px; }
  .finger-score b { font-size: 29px; }
  .finger-card { border-radius: 20px; box-shadow: 7px 7px 0 var(--ink); }
  .finger-toolbar { top: 8px; right: 8px; }
  .finger-toolbar button { width: 43px; height: 39px; font-size: 17px; }
  .finger-board { min-height: 415px; padding: 42px 8px 18px; }
  .finger-visual { gap: 7px; }
  .hand-wrap { width: 112px; height: 157px; }
  .finger-hand { transform: scale(.65); transform-origin: top center; }
  .finger-plus { width: 47px; height: 47px; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); font-size: 35px; }
  .finger-equation { margin-top: 3px; gap: 8px; font-size: 25px; }
  .finger-equation b, .finger-equation strong { min-width: 46px; height: 47px; border-width: 2px; border-radius: 13px; box-shadow: 3px 3px 0 var(--ink); font-size: 30px; }
  .finger-answers { margin-top: 17px; gap: 9px; }
  .finger-answer { min-height: 72px; border-width: 2px; border-radius: 17px; box-shadow: 4px 4px 0 var(--ink); font-size: 43px; }
  .finger-page footer { width: calc(100% - 22px); min-height: 50px; }
}
@media (max-height: 700px) and (max-width: 760px) {
  .finger-heading > div:first-child > span, .finger-heading p { display: none; }
  .finger-heading h1 { margin: 0; font-size: 27px; }
  .finger-board { min-height: 350px; padding-top: 35px; }
  .hand-wrap { height: 142px; }
  .finger-hand { transform: scale(.58); }
  .finger-answer { min-height: 59px; font-size: 37px; }
  .finger-page footer { min-height: 44px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .finger-heading, .finger-card, .finger-toolbar button.is-reading, .hand-finger, .finger-answer, .hand-wrap, .finger-toast { animation: none !important; }
}
