.arcade-page { --arcade-green: #83e5b1; --arcade-yellow: #f4ce75; --arcade-panel: #151c2c; }
.arcade-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-top: 52px; padding-bottom: 32px; }
.arcade-intro h1 { font-size: clamp(2.5rem, 5vw, 4.4rem); line-height: 1.05; letter-spacing: -.055em; margin: 12px 0 16px; }
.arcade-intro h1 span { color: var(--arcade-green); }
.arcade-lead { max-width: 570px; color: #b9c4d6; font-size: 1.04rem; line-height: 1.7; margin: 0; }
.arcade-intro-note { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid #ffffff1c; border-radius: 100px; color: #cbd4e4; font-size: .78rem; white-space: nowrap; }
.arcade-online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--arcade-green); box-shadow: 0 0 12px #83e5b166; }
.arcade-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.arcade-tab { display: flex; text-align: left; align-items: center; gap: 14px; border: 1px solid #ffffff16; background: #101726; color: #d5dce8; padding: 18px; border-radius: 16px; cursor: pointer; font: inherit; transition: background .2s, border-color .2s; }
.arcade-tab.is-active { background: #20322e; border-color: #83e5b166; color: #fff; }
.arcade-tab:hover { border-color: #83e5b166; }
.arcade-tab strong, .arcade-tab small { display: block; }
.arcade-tab strong { font-size: .96rem; margin-bottom: 3px; }
.arcade-tab small { font-size: .76rem; color: #a9b8ce; }
.arcade-tab-icon { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border: 1px solid #ffffff25; background: #ffffff07; border-radius: 12px; font-size: 1.4rem; font-weight: 750; }
.arcade-tab.is-active .arcade-tab-icon { color: var(--arcade-green); }
.arcade-tab-number { margin-left: auto; align-self: flex-start; color: #74829a; font-size: .73rem; }
.game-panel { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); border: 1px solid #ffffff17; border-radius: 24px; overflow: hidden; background: var(--arcade-panel); }
.game-panel[hidden] { display: none; }
.game-main { padding: 28px 36px 32px; min-width: 0; }
.game-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .76rem; color: #b5c2d7; }
.game-heading { margin-top: 22px; margin-bottom: 24px; }
.game-heading h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.035em; margin: 0 0 7px; }
.game-heading p { font-size: .92rem; color: #b5c2d7; line-height: 1.6; margin: 0; }
.game-word-board { width: min(100%, 320px); margin: 0 auto 22px; display: grid; gap: 7px; }
.game-word-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.game-tile { display: grid; place-items: center; aspect-ratio: 1; background: #101522; border: 1px solid #354058; border-radius: 9px; font-size: clamp(1.05rem, 3.5vw, 1.7rem); font-weight: 800; color: #eef4ff; }
.game-tile.is-filled { border-color: #8495b1; }
.game-tile.correct { background: #83e5b1; color: #092c1b; border-color: #83e5b1; }
.game-tile.present { background: #f4ce75; color: #342500; border-color: #f4ce75; }
.game-tile.absent { background: #354259; color: #fff; border-color: #354259; }
.game-tile.correct::after, .game-tile.present::after { font-size: .57rem; line-height: 1; position: absolute; bottom: 4px; right: 6px; font-weight: 800; }
.game-tile.correct::after { content: '✓'; }
.game-tile.present::after { content: '•'; }
.game-tile.correct, .game-tile.present { position: relative; }
.game-word-form { width: min(100%, 400px); margin: auto; }
.game-input-label { display: block; font-size: .78rem; color: #bcc9da; margin-bottom: 8px; }
.game-input-row { display: flex; gap: 10px; }
.game-input-row input { width: 100%; min-width: 0; border: 1px solid #4d5a71; background: #0d1320; color: #fff; border-radius: 10px; font: inherit; font-size: 1.05rem; font-weight: 650; letter-spacing: .1em; padding: 12px 14px; text-transform: uppercase; }
.game-input-row input::placeholder { color: #909eb4; text-transform: none; font-weight: 400; letter-spacing: 0; }
.game-input-row input:disabled { opacity: .65; }
.game-input-row .button { flex-shrink: 0; }
.game-status { min-height: 3em; font-size: .83rem; line-height: 1.5; color: #b8c7dc; margin: 16px 0; }
.game-word-main > .game-status { text-align: center; max-width: 420px; margin-left: auto; margin-right: auto; }
.game-status.is-success { color: #9decc0; }
.game-status.is-error { color: #ffd49c; }
.game-keyboard { display: grid; gap: 6px; margin: 0 auto; max-width: 465px; }
.game-keyboard-row { display: flex; justify-content: center; gap: 5px; }
.game-key { border: 1px solid #3b4860; background: #263147; color: #f7f9ff; border-radius: 6px; min-width: 0; flex: 1; max-width: 38px; min-height: 43px; padding: 5px 0; font-size: .81rem; font-weight: 750; font-family: inherit; cursor: pointer; }
.game-key.is-wide { max-width: 73px; flex: 1.85; font-size: .66rem; }
.game-key.correct { background: #83e5b1; color: #092c1b; border-color: #83e5b1; }
.game-key.present { background: #f4ce75; color: #342500; border-color: #f4ce75; }
.game-key.absent { background: #182131; color: #8597b6; border-color: #26344d; }
.game-key:disabled { cursor: default; }
.game-word-actions { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; min-height: 23px; font-size: .75rem; }
.game-word-actions button[hidden] { display: none; }
.game-side { padding: 40px 30px; border-left: 1px solid #ffffff13; background: linear-gradient(145deg, #1c2637, #111b2c); }
.game-side > h3 { font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 1.16; letter-spacing: -.03em; margin: 13px 0 26px; }
.game-side > p { color: #bac6d9; font-size: .88rem; line-height: 1.8; }
.game-legend { display: grid; gap: 17px; }
.game-legend > div { display: flex; align-items: center; gap: 14px; }
.game-legend .game-tile { width: 44px; flex-shrink: 0; font-size: 1.2rem; border-radius: 7px; }
.game-legend p { margin: 0; line-height: 1.55; }
.game-legend strong { display: block; font-size: .85rem; }
.game-legend p span { display: block; font-size: .76rem; color: #acbbd0; }
.game-side-note { margin: 27px 0; }
.game-side-card { border: 1px solid #ffffff1b; border-radius: 16px; padding: 20px; margin: 25px 0; background: #ffffff03; }
.game-card-symbol { display: block; color: var(--arcade-green); font-size: 1.9rem; line-height: 1; margin-bottom: 13px; }
.game-side-card strong { font-size: .88rem; }
.game-side-card p { color: #b7c5d8; font-size: .82rem; line-height: 1.7; margin-bottom: 0; }
.game-side p.game-fineprint { font-size: .74rem; color: #9eafc7; }
.game-scorebar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.game-scorebar > div { background: #0d1525; border: 1px solid #ffffff13; border-radius: 11px; padding: 12px 10px; }
.game-scorebar span { font-size: .58rem; letter-spacing: .08em; color: #adbbcf; display: block; line-height: 1.4; }
.game-scorebar strong { display: block; font-size: 1.28rem; margin-top: 5px; font-variant-numeric: tabular-nums; }
.game-memory-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 440px; margin: 0 auto; }
.game-memory-card { position: relative; display: grid; place-items: center; border: 1px solid #ffffff24; border-radius: 12px; color: #90b3e0; background: linear-gradient(145deg, #294463, #1a2941); aspect-ratio: 1; font-size: clamp(1.4rem, 4vw, 2.3rem); font-family: inherit; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.game-memory-card:hover { border-color: #a6c4e3; }
.game-memory-card.is-open { background: #e8edf7; color: #152e3c; border-color: #e8edf7; }
.game-memory-card.is-matched { background: #83e5b1; color: #092c1b; border-color: #83e5b1; cursor: default; }
.game-memory-card.is-matched::after { content: '✓'; position: absolute; bottom: 5px; right: 8px; font-size: .69rem; }
.game-memory-card.is-closed::after { content: ''; position: absolute; inset: 7px; border: 1px solid #ffffff13; border-radius: 8px; }
.game-memory-card:active { transform: scale(.97); }
.game-reaction-target { width: 100%; min-height: 265px; border: 1px solid #ffffff24; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; padding: 25px 20px; background: #253552; color: #fff; font-family: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.game-reaction-target.is-waiting { background: #6a343a; border-color: #c56b73; }
.game-reaction-target.is-ready { background: #83e5b1; border-color: #83e5b1; color: #082d1b; }
.game-reaction-target.is-result { background: #2d3460; border-color: #6975b0; }
.game-reaction-symbol { font-size: 3.3rem; line-height: 1; }
.game-reaction-target strong { font-size: clamp(1.25rem, 3vw, 1.8rem); letter-spacing: -.02em; text-align: center; }
.game-reaction-target > span:last-child { font-size: .81rem; text-align: center; line-height: 1.6; }
.game-reaction-results { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; min-height: 30px; }
.game-reaction-results li { font-size: .74rem; background: #0c1526; border: 1px solid #ffffff13; border-radius: 7px; padding: 7px 9px; color: #c9d4e8; }
.game-reaction-results strong { color: #fff; }
.arcade-more { padding-top: 65px; padding-bottom: 40px; }
.arcade-related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.arcade-related-card { display: flex; align-items: center; gap: 24px; padding: 26px; background: #151e2e; border: 1px solid #ffffff15; border-radius: 18px; color: inherit; text-decoration: none; transition: border-color .2s; }
.arcade-related-card:hover { border-color: #83e5b166; }
.arcade-related-card img { width: 95px; height: 105px; object-fit: cover; border-radius: 12px; }
.arcade-related-card h3 { margin: 6px 0; font-size: 1.45rem; letter-spacing: -.03em; }
.arcade-related-card p { margin: 0; font-size: .8rem; line-height: 1.7; color: #b7c6da; }
.arcade-related-link { display: inline-block; color: #9ee4bd; font-size: .78rem; margin-top: 15px; font-weight: 700; }
.arcade-data { padding-top: 12px; padding-bottom: 60px; max-width: 840px; text-align: center; }
.arcade-data h2 { font-size: 1rem; }
.arcade-data > p { color: #9bacc5; font-size: .8rem; line-height: 1.8; }
.arcade-clear { background: none; border: 0; padding: 8px 0; color: #b3c6e4; text-decoration: underline; text-underline-offset: 4px; font: inherit; font-size: .75rem; cursor: pointer; }
.game-storage-status { min-height: 1.5em; color: #d5e1f4; }
.game-share-fallback { display: block; width: 100%; min-height: 200px; margin-top: 20px; padding: 14px; border: 1px solid #62738e; border-radius: 10px; background: #101522; color: #f4f7ff; font-family: inherit; font-size: .82rem; line-height: 1.8; resize: vertical; }
.arcade-noscript { padding: 20px; border: 1px solid #f4ce75; border-radius: 12px; background: #372f1d; }
.arcade-page button:focus-visible, .arcade-page input:focus-visible, .game-panel:focus-visible { outline: 3px solid #aad6ff; outline-offset: 4px; }
@media (max-width: 900px) { .arcade-intro { align-items: start; flex-direction: column; gap: 18px; padding-top: 38px; } .game-panel { grid-template-columns: minmax(0, 1.2fr) minmax(230px, .8fr); } .game-main { padding: 24px; } .game-side { padding: 32px 23px; } .arcade-tab { padding: 14px; gap: 10px; } .arcade-tab-number { display: none; } .arcade-related-card { padding: 22px; gap: 16px; } .arcade-related-card img { width: 76px; height: 96px; } }
@media (max-width: 680px) { .arcade-intro h1 { font-size: 2.7rem; } .arcade-intro { padding-bottom: 24px; } .arcade-intro-note { font-size: .7rem; } .arcade-tabs { gap: 7px; } .arcade-tab { padding: 12px 7px; display: flex; flex-direction: column; text-align: center; gap: 8px; border-radius: 11px; } .arcade-tab-icon { height: 35px; width: 35px; flex-basis: 35px; font-size: 1.2rem; border-radius: 8px; } .arcade-tab strong { font-size: .71rem; line-height: 1.4; margin: 0; } .arcade-tab small { display: none; } .game-panel { grid-template-columns: 1fr; border-radius: 17px; } .game-main { padding: 22px 16px 25px; } .game-side { border-left: 0; border-top: 1px solid #ffffff13; padding: 28px 22px; } .game-side > h3 { margin-bottom: 20px; } .game-legend { gap: 12px; } .game-side-card { margin-top: 20px; } .game-word-board { max-width: 295px; gap: 6px; } .game-word-row { gap: 6px; } .game-keyboard-row { gap: 4px; } .game-key { font-size: .7rem; min-height: 42px; } .game-key.is-wide { font-size: .55rem; } .game-topline { font-size: .68rem; } .game-topline .chip { font-size: .58rem; } .game-memory-board { gap: 8px; } .game-memory-card { font-size: 1.85rem; } .game-scorebar { gap: 7px; } .game-scorebar > div { padding: 10px 8px; } .game-scorebar span { font-size: .5rem; } .game-scorebar strong { font-size: 1.12rem; } .game-reaction-target { min-height: 240px; } .arcade-related { grid-template-columns: 1fr; } .arcade-more { padding-top: 44px; } .arcade-data { padding-bottom: 40px; } }
@media (prefers-reduced-motion: reduce) { .arcade-page *, .arcade-page *::before, .arcade-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
/* Keep keys comfortably tappable on the narrowest phone screens. */
@media (max-width: 360px) {
  .game-keyboard { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
  .game-keyboard-row { display: contents; }
  .game-key { flex: 0 0 28px; max-width: 28px; min-height: 44px; }
  .game-key.is-wide { flex-basis: 52px; max-width: 52px; }
}
.word-mode-switch { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 1.4rem; }
.word-mode-switch button { border: 1px solid #8992ff50; border-radius: 999px; padding: .75rem 1.1rem; color: #dce1ff; background: #1b2540; cursor: pointer; font: inherit; font-weight: 650; }
.word-mode-switch button[aria-pressed="true"] { background: linear-gradient(135deg,#b1a1ff,#80d8df); color: #101523; box-shadow: 0 5px 25px #8992ff35; }
.word-mode-switch button:focus-visible { outline: 3px solid #dfff8a; outline-offset: 3px; }
