:root{--ink:#203247;--paper:#fff8e8;--blue:#2364d2;--red:#d54840;--green:#228265;--yellow:#c58a12;--purple:#8b5cf6;--line:#ded8c7;--muted:#65717d;--shadow:0 5px 0 #20324718}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Arial,'Noto Sans KR',sans-serif;-webkit-tap-highlight-color:transparent}button,select{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.45}button:focus-visible,select:focus-visible{outline:3px solid #e8a61a;outline-offset:3px}button{border:0}h1,h2,h3,p{margin:0}button.primary{background:var(--blue);color:#fff;border:2px solid var(--ink);border-radius:16px;font-weight:800;padding:16px 20px;box-shadow:0 4px 0 var(--ink)}button.secondary{background:#fffdf5;border:1.5px solid var(--line);border-radius:14px;padding:13px 16px;font-weight:700}.text-btn{padding:12px;background:transparent;color:var(--muted);font-size:13px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--muted)}.brand{font-weight:950;letter-spacing:-1.6px;line-height:.9}.brand span{color:var(--blue)}.home{max-width:570px;margin:auto;padding:30px 24px 24px;min-height:100svh}.home-top{display:flex;justify-content:space-between;align-items:center}.pill{font-size:10px;font-weight:bold;border:1px solid var(--line);border-radius:20px;padding:7px 10px;letter-spacing:1px}.home h1{font-size:clamp(55px,15vw,79px);margin-top:25px}.intro{font-size:15px;line-height:1.7;margin-top:16px;color:var(--muted)}.hero{height:218px;position:relative;margin:18px 0 12px;display:flex;justify-content:center;align-items:center}.hero-card{width:134px;height:182px;border-radius:15px;border:5px solid var(--ink);outline:1px solid var(--ink);outline-offset:-11px;background:#fff8e8;position:absolute;box-shadow:0 10px 20px #20324713;display:flex;align-items:center;justify-content:center}.hero-card img{width:104px;height:146px;object-fit:contain}.hero-card:nth-child(1){transform:translateX(-92px) rotate(-13deg);color:var(--red);font-size:100px;font-weight:900}.hero-card:nth-child(2){transform:rotate(5deg);z-index:2}.hero-card:nth-child(3){transform:translateX(92px) rotate(15deg);font-size:27px;font-weight:950;color:var(--blue)}.hero-card:nth-child(3) span{transform:rotate(-15deg)}.settings{background:#ffffff90;border:1px solid var(--line);border-radius:20px;padding:18px;display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:10px 0 20px}.settings label{font-size:12px;font-weight:bold;display:block;margin-bottom:8px}.settings select{background:var(--paper);border:1px solid var(--line);width:100%;padding:11px 8px;border-radius:10px}.colors{grid-column:1/-1;display:flex;align-items:center;gap:10px}.colors label{margin:0 10px 0 0}.color-pick{width:36px;height:36px;border-radius:50%;background:var(--player);border:3px solid #fff;outline:1px solid var(--line)}.color-pick.active{outline:3px solid var(--ink)}.home .primary,.home .resume{width:100%;margin-bottom:14px}.home-links{display:flex;justify-content:center;gap:14px}.game{max-width:1060px;margin:auto;min-height:100svh;display:flex;flex-direction:column}.topbar{padding:15px 16px 10px;display:flex;align-items:center;gap:10px}.topbar .brand{font-size:22px;flex:1}.round{font-size:12px;font-weight:800}.icon-btn{min-width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:#ffffff80;font-weight:800;font-size:18px}.scores{display:flex;gap:7px;padding:0 14px 10px}.score{flex:1;min-width:0;display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:#ffffff85;padding:9px 10px;border-radius:13px}.score.active{border:2px solid var(--player);padding:8px 9px;background:#fff}.avatar{background:var(--player);color:#fff;width:27px;height:27px;border-radius:9px;display:grid;place-items:center;font-size:12px;font-weight:900;flex-shrink:0}.score-name{font-size:11px;white-space:nowrap}.score strong{font-size:22px;margin-left:auto}.score small{font-size:10px;opacity:.65}.turn-banner{margin:0 14px 9px;border-radius:10px;padding:9px 12px;background:#e7eefb;font-size:12px;font-weight:700;display:flex;justify-content:space-between;gap:6px}.turn-banner.final{background:#ffedb4}.board{padding:0 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.word-card{border:2px solid var(--ink);border-radius:14px;background:var(--paper);padding:9px 9px 10px;position:relative;box-shadow:var(--shadow);outline:1px solid var(--ink);outline-offset:-5px;min-width:0}.picture-row{display:flex;align-items:center;gap:8px;height:68px;margin-bottom:6px;padding:2px 4px}.picture-button{background:transparent;flex-shrink:0;width:66px;height:66px;padding:0}.picture-button img{width:100%;height:100%;object-fit:contain}.word-label{min-width:0;flex:1}.word-label b{font-size:13px;letter-spacing:1px;display:block}.ownership{display:flex;gap:4px;margin-top:7px;flex-wrap:wrap}.owner-tag{color:var(--player);font-weight:900;font-size:11px;display:inline-flex;gap:3px;align-items:center}.owner-tag i{width:6px;height:6px;border-radius:50%;background:var(--player)}.empty-count{font-size:10px;color:var(--muted)}.slots{display:flex;gap:4px;padding:0 3px}.slot{flex:1;min-width:0;height:38px;border-radius:7px;background:#ebe6d7;color:#8a8e8e;border:1px dashed #b3b8b5;font-size:21px;font-weight:800;position:relative;padding:0}.slot.occupied{color:#fff;background:var(--player);border:1px solid var(--player)}.slot small{font-size:7px;position:absolute;bottom:1px;left:0;right:0;letter-spacing:.4px}.slot.special{padding-bottom:6px}.slot.valid{background:#e7f2ff;border:2px solid var(--blue);color:var(--blue);box-shadow:0 0 0 2px #2364d225}.slot.occupied.valid{background:var(--player);color:#fff;outline:2px solid #e7aa1c}.slot.destination{background:#ffeaa0;border:2px solid #d69300;color:#664d00}.hand-panel{padding:15px 14px 17px;margin-top:auto;background:#fffdf4;border-top:1px solid var(--line);position:sticky;bottom:0;z-index:4}.hand-title{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:10px}.hand-title span{color:var(--muted);font-size:11px}.hand{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;min-height:78px}.hand-card{height:78px;border:2px solid var(--player);border-radius:10px;outline:1px solid var(--player);outline-offset:-5px;color:var(--player);background:var(--paper);font-size:35px;font-weight:900;position:relative;box-shadow:0 3px 0 #20324715;padding:0;transition:transform .12s}.hand-card .corner{position:absolute;left:6px;top:5px;font-size:9px;line-height:1}.hand-card.special .main{font-size:12px;display:block;transform:rotate(-13deg);font-weight:950;letter-spacing:-.3px}.hand-card.change .main{font-size:32px}.hand-card.special .corner{font-size:6px}.hand-card.selected{transform:translateY(-7px);background:var(--player);color:white;outline-color:white;box-shadow:0 5px 0 #20324730}.hand-card.unplayable{opacity:.58}.hand-gap{border:1px dashed var(--line);height:78px;border-radius:10px}.actions{display:flex;gap:8px;margin-top:13px}.actions button{flex:1;min-height:44px;padding:11px 8px;font-size:12px;border-radius:12px}.actions .primary{box-shadow:0 3px 0 var(--ink)}.board-footer{font-size:10px;color:var(--muted);text-align:center;padding:12px 12px 14px}.overlay{position:fixed;inset:0;background:#12223588;z-index:20;display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(4px)}[hidden]{display:none!important}.modal{background:var(--paper);border:2px solid var(--ink);border-radius:25px;padding:25px;max-width:520px;width:100%;max-height:89svh;overflow:auto;box-shadow:0 15px 60px #0002}.modal h2{font-size:26px;line-height:1.3;margin-bottom:15px}.modal p{font-size:13px;line-height:1.75;color:var(--muted);margin:10px 0}.modal .primary,.modal .secondary{width:100%;margin-top:10px}.modal ul,.modal ol{padding-left:21px;font-size:13px;line-height:1.8}.modal li{margin:9px 0}.modal strong{color:var(--ink)}.detail-image{width:180px;height:190px;object-fit:contain;display:block;margin:0 auto 15px}.detail-word{text-align:center;font-size:37px!important;letter-spacing:3px}.detail-meaning{text-align:center}.result-symbol{text-align:center;font-size:49px;margin-bottom:16px}.result-cat{display:block;width:112px;height:100px;object-fit:contain;margin:0 auto 8px}.result-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:13px 0}.result-row strong{margin-left:auto}.result-row small{font-size:11px;color:var(--muted)}.history{font-size:12px;line-height:1.8;border-top:1px solid var(--line);padding-top:13px;margin-top:15px}.history p{margin:3px 0}.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.gallery button{background:#ffffff80;border:1px solid var(--line);border-radius:10px;padding:8px 3px;font-size:11px;font-weight:700}.gallery img{display:block;width:100%;height:65px;object-fit:contain;margin-bottom:6px}#toast{position:fixed;z-index:40;bottom:225px;left:50%;transform:translate(-50%,12px);width:max-content;max-width:88vw;padding:12px 18px;border-radius:14px;background:var(--ink);color:white;font-size:13px;text-align:center;opacity:0;pointer-events:none;transition:.18s;box-shadow:0 5px 20px #0002}#toast.show{opacity:1;transform:translate(-50%,0)}.claim-title{color:var(--blue)}.mode-note{font-size:11px;text-align:center;color:var(--muted);margin-top:8px}.loading-dots:after{content:' ···';animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.3}}@media(min-width:650px){.board{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.picture-row{height:130px;flex-direction:column;margin-bottom:10px}.picture-button{width:95px;height:95px}.word-label{text-align:center}.ownership{justify-content:center}.slot{height:45px;font-size:26px}.hand-panel{margin-top:20px;padding:20px 28px}.hand{max-width:520px;margin:auto}.hand-card,.hand-gap{height:105px;font-size:48px}.actions{max-width:520px;margin:16px auto 0}.hand-title{max-width:520px;margin:0 auto 15px}.game{max-width:900px}.hand-card.special .main{font-size:18px}.hand-card.change .main{font-size:44px}}@media(max-width:360px){.topbar{padding-top:9px}.scores{gap:4px}.score{padding:8px 6px}.score.active{padding:7px 5px}.avatar{width:22px;height:22px}.score-name{font-size:10px}.score strong{font-size:19px}.board{gap:7px;padding:0 10px}.word-card{padding:7px}.picture-row{height:54px;gap:4px}.picture-button{width:51px;height:51px}.word-label b{font-size:11px}.slot{height:35px;font-size:19px}.hand-card,.hand-gap{height:69px}.hand-panel{padding:12px 10px}.hand-card.special .main{font-size:10px}.hand-card.change .main{font-size:29px}.home{padding:24px 18px}.hero{transform:scale(.9);margin:0}.score small{display:none}}@media(max-height:550px) and (orientation:landscape){.game{display:grid;grid-template-columns:1fr 240px;grid-template-rows:auto auto auto 1fr auto;max-width:none}.topbar,.scores,.turn-banner{grid-column:1}.board{grid-column:1;grid-template-columns:repeat(3,minmax(0,1fr));padding-bottom:10px}.picture-row{height:44px;flex-direction:row;margin-bottom:3px}.picture-button{width:43px;height:43px}.word-label b{font-size:11px}.slot{height:32px;font-size:20px}.hand-panel{grid-column:2;grid-row:1/6;margin:0;position:sticky;top:0;height:100svh;border-left:1px solid var(--line);padding:30px 14px}.hand{grid-template-columns:repeat(3,1fr);gap:9px}.hand-card,.hand-gap{height:80px;font-size:35px}.hand-card.special .main{font-size:12px}.hand-card.change .main{font-size:33px}.actions{flex-direction:column}.board-footer{grid-column:1}.score{padding:6px 9px}.score.active{padding:5px 8px}.topbar{padding-top:7px;padding-bottom:5px}.turn-banner{margin-bottom:6px;padding:6px 10px}.ownership{margin-top:4px}}
.scores.many .score-name{display:none}.scores.many .score{gap:4px}.scores.many .score strong{font-size:20px}@media(min-width:650px){.scores.many .score-name{display:inline}}
.score-timer{display:inline-block;min-width:1.8ch;color:var(--player);font-variant-numeric:tabular-nums;text-align:right;transition:color .15s,transform .15s}.score-timer.time-warning{color:#d92d2d;animation:timer-warning .7s ease-in-out infinite alternate}@keyframes timer-warning{to{transform:scale(1.12)}}
@media(max-height:550px) and (orientation:landscape){.hand-panel{padding:14px 12px;overflow:auto}.hand-card,.hand-gap{height:68px}.hand-title{margin-bottom:10px}.actions{gap:6px;margin:10px auto 0}}

.word-label .letter-count{font-size:11px;font-weight:600;letter-spacing:0;color:var(--muted)}.hand-card.hint-playable{box-shadow:0 0 0 3px #e8a61a,0 4px 0 #20324725}.slot:empty{border-style:solid;background:#fffdf5}.slot.valid:empty{background:#e7f2ff}.slot.destination:empty{background:#ffeaa0}

.multiplayer-entry{width:100%;margin-bottom:12px!important;border-color:var(--blue)!important;color:var(--blue)}.field-label{display:block;font-size:14px;font-weight:700;margin:16px 0 8px}.modal input{width:100%;padding:14px;border:1.5px solid var(--line);border-radius:12px;background:white;color:var(--ink);font:inherit;font-size:16px}.modal input:focus{outline:2px solid var(--blue)}#room-code{text-transform:uppercase;letter-spacing:5px;font-weight:800}.room-divider{text-align:center;border-top:1px solid var(--line);margin-top:24px;padding-top:20px;font-size:14px;color:var(--muted)}.lobby{max-width:480px;margin:auto;padding:30px 24px}.lobby .brand{font-size:27px;margin-bottom:42px}.lobby h1{font-size:26px;line-height:1.4;margin-top:14px}.lobby .eyebrow{font-size:12px}.room-code{font-size:43px;font-weight:900;letter-spacing:7px;margin:22px 0 18px;text-align:center}.lobby button{width:100%;margin:8px 0}.lobby p{font-size:14px;line-height:1.7;color:var(--muted);margin:14px 0}.room-players{margin:25px 0;display:grid;gap:10px}.room-player{display:flex;align-items:center;gap:14px;background:#fffdf5;padding:16px;border:1px solid var(--line);border-radius:14px;font-size:16px}.room-player small{margin-left:auto;font-size:12px;color:var(--muted)}.room-player.vacant{border-style:dashed;justify-content:center;color:var(--muted);font-size:14px}.connection-warning{text-align:center;padding:10px;background:#ffedb4;font-size:13px}
/* The home screen uses the player's original printed card artwork. */
.attempts{display:flex;align-items:center;gap:9px;margin-bottom:11px;font-size:13px;font-weight:800;color:var(--muted)}.attempt-dots{display:flex;gap:6px}.attempt-dots i{display:block;width:14px;height:14px;border-radius:50%;border:2px solid var(--red);transition:.2s}.attempt-dots i.available{background:var(--red);box-shadow:0 2px 0 #20324720}.attempt-dots i.used{background:transparent;border-color:#c7c3b8}
.hand-title:has(b:empty){display:none}
.picture-row.picture-only{justify-content:center}.picture-row.picture-only .picture-button{margin-inline:auto}
.settings input{width:100%;padding:11px 10px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font:inherit}.settings input:focus{outline:3px solid #e8a61a;outline-offset:2px}
.home{max-width:570px;padding-top:22px}.home h1{font-size:clamp(46px,12vw,65px);margin-top:18px}.home .intro{font-size:19px;font-weight:800;color:var(--ink);margin-top:13px;line-height:1.5}.hero.original-cards{height:178px;margin:12px 0 17px}.original-cards>img{position:absolute;width:106px;aspect-ratio:63/88;object-fit:contain;filter:drop-shadow(0 8px 6px #20324725)}.original-cards>img:nth-child(1){transform:translateX(-90px) rotate(-15deg)}.original-cards>img:nth-child(2){transform:rotate(4deg);z-index:2}.original-cards>img:nth-child(3){transform:translateX(90px) rotate(16deg)}.home .settings{margin-top:0}.attempts{font-size:13px;margin-bottom:9px;color:var(--muted)}.attempts b{color:var(--red)}.hint-guide{padding:10px 12px;background:#e7f2ff;border:1px solid var(--blue);border-radius:12px;margin-bottom:13px;font-size:14px;line-height:1.5}.hint-letter{opacity:.75;display:block}.slot.valid:after,.slot.destination:after{content:'↓';position:absolute;left:0;right:0;top:-18px;font-size:15px;color:var(--blue);font-weight:900}.slots:has(.valid),.slots:has(.destination){padding-top:14px}.tutorial{text-align:center}.tutorial-top{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:700}.tutorial-top .text-btn{padding:5px 0;font-size:12px}.parrot{width:114px;height:114px;object-fit:contain;margin:8px auto -9px;position:relative;z-index:1;display:block}.parrot.talking{animation:parrot-talk 2s ease-in-out infinite}.speech-bubble{background:#fffdf5;border:2px solid var(--ink);border-radius:20px;padding:18px 12px 12px}.speech-bubble h2{font-size:22px;margin:0 0 8px}.speech-bubble p{font-size:16px!important;line-height:1.65!important;margin:0!important;color:var(--ink)!important}.tutorial-example{margin:12px auto}.tutorial-example>img{width:70px;height:60px;object-fit:contain}.demo-word{display:flex;gap:8px;justify-content:center;margin:10px auto}.demo-word>span{display:grid;place-items:center;width:44px;height:46px;border:2px solid var(--blue);border-radius:9px;font-size:27px;font-weight:800;background:#fff}.demo-choices{display:flex;gap:16px;justify-content:center}.demo-choices button{border:2px solid var(--red);outline:1px solid var(--red);outline-offset:-5px;border-radius:9px;background:var(--paper);color:var(--red);width:50px;height:58px;font-size:30px;font-weight:800}.ownership-demo>span{background:var(--red);color:white;border-color:var(--red)}.ownership-demo>span:last-child{background:var(--blue);border-color:var(--blue)}.tutorial-nav{display:flex;gap:10px}.tutorial-nav button{flex:1}.tutorial-specials{display:flex;justify-content:center;gap:18px;margin:14px auto}.tutorial-specials img{width:74px;aspect-ratio:63/88;object-fit:contain}.tutorial-note{font-size:12px!important;line-height:1.5!important;margin:10px 0 0!important}.tutorial .text-btn{font-size:14px}.tutorial .primary{padding:13px 15px}.tutorial .secondary{padding:13px 15px}@keyframes parrot-talk{0%,100%{transform:rotate(-3deg)}50%{transform:translateY(-4px) rotate(3deg)}}@media(prefers-reduced-motion:reduce){.parrot.talking{animation:none}}@media(max-height:740px){.parrot{width:85px;height:85px}.speech-bubble{padding:14px 10px 10px}.speech-bubble h2{font-size:20px}.speech-bubble p{font-size:15px!important}.tutorial-example>img{height:48px}.modal:has(.tutorial){padding:18px}.home .hero.original-cards{height:145px}.original-cards>img{width:88px}}

/* Player-selected theme: logo accents and primary actions follow the local player's color. */
:root{--accent:var(--blue)}
.brand span{color:var(--accent)}
button.primary{background:var(--accent)}
.multiplayer-entry{border-color:var(--accent)!important;color:var(--accent)}
.modal input:focus{outline-color:var(--accent)}
.slot.valid{border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 20%,transparent)}
.slot.valid:after,.slot.destination:after{color:var(--accent)}

/* Keep touch scrolling, but hide scrollbars throughout the game UI. */
html,body,*{scrollbar-width:none!important;-ms-overflow-style:none!important}
html::-webkit-scrollbar,body::-webkit-scrollbar,*::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
body.student-play-mode,body.student-play-mode #app{overscroll-behavior-y:none}
.meaning-card{width:100%;height:100%;padding:6px;display:grid;place-items:center;border:2px solid currentColor;border-radius:12px;background:#fffdf6;color:var(--ink);font-size:clamp(12px,3.5vw,20px);font-weight:950;line-height:1.25;word-break:keep-all}.image-fallback{display:none}

/* On the local player's turn, fill their profile card with their player color. */
.score{transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s}
.score.my-turn-profile{background:var(--player);border-color:var(--player);color:#fff;box-shadow:0 4px 0 #20324724}
.score.my-turn-profile .avatar{background:#fff;box-shadow:0 0 0 2px #ffffff80}
.score.my-turn-profile .score-name,.score.my-turn-profile strong,.score.my-turn-profile small,.score.my-turn-profile .score-timer{color:inherit}
.score.my-turn-profile[data-player-color="yellow"]{color:var(--ink)}
.score.my-turn-profile .score-timer.time-warning{color:#d92d2d;background:#fff;border-radius:6px;padding:1px 4px}

.game-time-status{display:flex;justify-content:center;align-items:center;gap:16px;padding:8px 16px;background:#e8f2ff;color:#174989;border-radius:12px;margin:8px 0;font-weight:800}.game-duration-clock{font-size:24px;font-variant-numeric:tabular-nums}

.hand-panel,.hand-panel *{touch-action:none;-webkit-user-select:none;user-select:none}
