/* PLAYORA 낱말 맞히기 - 조각보 (쪽빛·귤빛·소색 천 조각과 박음질) */
:root {
  --cloth: #f4efe4; --cloth-2: #ebe4d5; --cloth-3: #d8cebb; --card: #fdfbf6;
  --ink: #252f3f; --ink-2: #566172; --ink-3: #7f8794;
  --jjok: #2d5f9b; --jjok-d: #224b7d; --jjok-2: #dbe5f2;
  --gyul: #eba63f; --gyul-d: #c4831b; --gyul-2: #f8ecd2;
  --fade: #8d867a; --fade-2: #e0d9cb;
  --red: #b9432c;
  --page: #e9e2d4; --page-ink: #252f3f; --page-2: #586273; --page-line: #d3c9b6;
  --f-body: "IBM Plex Sans KR", "Pretendard", system-ui, -apple-system, "Malgun Gothic", sans-serif;
  --f-disp: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r1: 5px; --r2: 9px; --r3: 14px;
  --bar: 44px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root {
    --cloth: oklch(0.953 0.015 85); --cloth-2: oklch(0.918 0.021 85); --cloth-3: oklch(0.852 0.027 85); --card: oklch(0.988 0.007 85);
    --ink: oklch(0.302 0.034 258); --ink-2: oklch(0.487 0.03 258); --ink-3: oklch(0.615 0.022 258);
    --jjok: oklch(0.478 0.108 255); --jjok-d: oklch(0.405 0.095 255); --jjok-2: oklch(0.915 0.026 255);
    --gyul: oklch(0.782 0.137 75); --gyul-d: oklch(0.655 0.13 72); --gyul-2: oklch(0.945 0.044 85);
    --fade: oklch(0.622 0.018 80); --fade-2: oklch(0.885 0.02 85);
    --red: oklch(0.535 0.155 33);
    --page: oklch(0.912 0.02 85); --page-ink: oklch(0.302 0.034 258); --page-2: oklch(0.49 0.028 258); --page-line: oklch(0.835 0.027 85);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 400 16px/1.7 var(--f-body); word-break: keep-all; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
button:disabled { cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 페이지 머리 */
.mast { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) clamp(var(--s4), 3vw, var(--s6)); border-bottom: 1px solid var(--page-line); }
.mast-brand { text-decoration: none; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.mast-brand b { font-weight: 700; letter-spacing: 0.08em; color: var(--page-ink); margin-right: 6px; }
.mast-more { margin-left: auto; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.head { max-width: 1240px; margin: 0 auto; padding: var(--s4) clamp(var(--s3), 3vw, var(--s6)) var(--s3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.head h1 { margin: 0; font: 700 clamp(28px, 3.6vw, 38px)/1.1 var(--f-disp); letter-spacing: -0.02em; }
.head p { margin: 0; color: var(--page-2); font-size: 15px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(0px, 2vw, var(--s5)); }

/* ---------------------------------------------------------------- 게임 무대 */
.wd { position: relative; width: 100%; height: clamp(560px, calc(100svh - 128px), 820px); background-color: var(--cloth); color: var(--ink); overflow: hidden; border-radius: var(--r2);
  border: 1px solid var(--page-line); -webkit-tap-highlight-color: transparent; font-family: var(--f-body); container-type: size; user-select: none; -webkit-user-select: none; touch-action: manipulation; outline: 0;
  /* 모시 올 느낌: 아주 옅은 가로세로 줄 */
  background-image: repeating-linear-gradient(0deg, rgba(37, 47, 63, 0.022) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(37, 47, 63, 0.022) 0 1px, transparent 1px 3px);
  --c: 56px; --cw: 56px; --g: 5px; --kh: 48px; --pad: 10px; --sidew: 380px; --sideh: 240px; }
@media (max-width: 640px) { .wd { border-radius: 0; border-left: 0; border-right: 0; height: calc(100svh - 52px); min-height: 560px; } .head { padding-top: var(--s3); } .head p { display: none; } }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--cloth); }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none !important; }
html.embed .wrap { padding: 0; max-width: none; }
html.embed .wd { position: fixed; inset: 0; width: auto; height: auto; min-height: 0; border-radius: 0; border: 0; }
.nojs { padding: var(--s6); text-align: center; }

.bar { position: absolute; top: 0; left: 0; right: 0; height: var(--bar); display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s2); z-index: 8; border-bottom: 1px dashed var(--cloth-3); }
.bar-t { margin: 0 0 0 var(--s1); font: 600 13px/1.2 var(--f-body); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.bar-r { display: flex; align-items: center; gap: 2px; flex: none; }
.ib { height: 36px; min-width: 36px; padding: 0 8px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: 600 13px/1 var(--f-body); flex: none; }
.ib svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ib span { display: none; }
.wd.wide .ib span { display: inline; }
.wd.wide .ib { padding: 0 11px; }
.ib:hover { background: var(--cloth-2); color: var(--ink); }
.ib:focus-visible, .pt:focus-visible, .btn:focus-visible, .sw:focus-visible, .tab:focus-visible, .x:focus-visible { outline: 2px solid var(--jjok); outline-offset: 1px; }
.ib.off { color: var(--ink-3); }
.ib.off .wave { display: none; }
.ib:not(.off) .mute { display: none; }
.wd:not(.wide) #bMute { display: none; }

.scr { position: absolute; inset: var(--bar) 0 0 0; }

/* ---------------------------------------------------------------- 첫 화면 (조각 여섯 개) */
.home { display: grid; gap: var(--s3); padding: var(--s3) var(--s3) var(--s4); }
.wd.land .home { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr); align-items: center; padding: var(--s4) clamp(16px, 4cqw, 64px); gap: clamp(16px, 4cqw, 56px); max-width: 1180px; margin: 0 auto; left: 0; right: 0; }
.wd.port .home { grid-template-rows: auto minmax(0, 1fr); max-width: 560px; margin: 0 auto; left: 0; right: 0; }
.hd { min-width: 0; }
.hd-k { margin: 0 0 var(--s2); font: 600 12px/1 var(--f-body); letter-spacing: 0.14em; color: var(--ink-3); }
.hd-t { margin: 0; font: 700 34px/1.1 var(--f-disp); font-size: clamp(30px, 7cqmin, 66px); letter-spacing: -0.03em; color: var(--ink); }
.wd.port .hd-t br { display: none; }
.hd-tiles { display: flex; gap: 4px; margin: var(--s3) 0 0; }
.hd-tiles i { width: clamp(22px, 4.6cqmin, 38px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; font: 700 15px/1 var(--f-disp); font-size: clamp(13px, 2.5cqmin, 21px); font-style: normal; position: relative; }
.hd-tiles i::after, .mini i::after { content: ''; position: absolute; inset: 2px; border-radius: 2px; border: 1px dashed rgba(255, 255, 255, 0.55); }
.hd-tiles .t2 { background: var(--jjok); color: #fff; }
.hd-tiles .t1 { background: var(--gyul); color: var(--ink); }
.hd-tiles .t1::after { border-color: rgba(37, 47, 63, 0.35); }
.hd-tiles .t0 { background: var(--fade); color: #fff; }
.hd-tiles .t0::after { border-color: transparent; }
.hd-d { margin: var(--s3) 0 0; font: 400 15px/1.55 var(--f-body); color: var(--ink-2); max-width: 30em; }
.wd.port .hd-d { font-size: 14px; margin-top: var(--s2); }
.wd.tiny .hd-d { font-size: 13px; margin-top: var(--s2); }
.wd.tiny .hd-k { display: none; }
.opt { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); font: 500 13.5px/1.3 var(--f-body); color: var(--ink-2); }
.wd.tiny .opt { margin-top: var(--s2); }
.wd.port .hd .opt { display: none; }
.wd.land .menu .opt { display: none; }
.menu .opt { grid-area: op; margin-top: var(--s1); }
.sw { position: relative; width: 44px; height: 26px; border-radius: 999px; border: 1px solid var(--cloth-3); background: var(--cloth-2); flex: none; padding: 0; transition: background 0.18s; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 1px solid var(--cloth-3); transition: transform 0.2s var(--ease); }
.sw[aria-checked="true"] { background: var(--jjok); border-color: var(--jjok-d); }
.sw[aria-checked="true"]::after { transform: translateX(18px); border-color: transparent; }
.opt b { font-weight: 600; color: var(--ink); }
.opt em { font-style: normal; }
.wd.tiny .opt em { display: none; }

.menu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); min-height: 0; min-width: 0; }
.wd.port .menu { grid-template-areas: "ld ld ld ld ld ld" "a a a a a a" "b b b c c c" "le le le le le le" "d d e e f f" "op op op op op op"; grid-template-rows: auto minmax(64px, 1.15fr) minmax(64px, 1fr) auto minmax(64px, 1fr) auto; max-height: 520px; }
.wd.land .menu { grid-template-areas: "ld ld ld ld ld ld" "a a a b b b" "a a a c c c" "le le le le le le" "d d e e f f"; grid-template-rows: auto minmax(58px, 1fr) minmax(58px, 1fr) auto minmax(58px, 0.9fr); height: min(100%, 470px); }
.sl { margin: 0; display: flex; align-items: baseline; gap: var(--s2); font: 600 13px/1.3 var(--f-body); color: var(--ink); }
.sl span { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.sl.ld { grid-area: ld; }
.sl.le { grid-area: le; margin-top: var(--s1); }
.pt { position: relative; text-align: left; border-radius: var(--r2); border: 1px solid var(--cloth-3); background: var(--card); padding: 9px 12px 9px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 2px; min-width: 0; min-height: 0; color: var(--ink); overflow: hidden; white-space: normal; transition: transform 0.16s var(--ease), box-shadow 0.16s; }
.pt::after { content: ''; position: absolute; inset: 4px; border: 1px dashed var(--cloth-3); border-radius: 6px; pointer-events: none; }
.pt:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--cloth-3); }
.pt:active { transform: translateY(1px); box-shadow: none; }
.pt-n { font: 700 19px/1.15 var(--f-disp); font-size: clamp(17px, 3.4cqmin, 27px); letter-spacing: -0.02em; white-space: nowrap; }
.pt-s { font: 500 12.5px/1.35 var(--f-body); color: var(--ink-2); align-self: start; }
.pt-st { font: 600 12.5px/1.25 var(--f-body); color: var(--jjok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt.a { grid-area: a; background: var(--jjok); color: #fff; border-color: var(--jjok-d); }
.pt.a::after { border-color: rgba(255, 255, 255, 0.42); }
.pt.a .pt-s { color: rgba(255, 255, 255, 0.86); }
.pt.a .pt-st { color: #fff; }
.pt.a .pt-n { font-size: clamp(21px, 4.6cqmin, 36px); }
.pt.b { grid-area: b; } .pt.c { grid-area: c; } .pt.d { grid-area: d; } .pt.e { grid-area: e; } .pt.f { grid-area: f; }
.pt.d, .pt.e, .pt.f { background: var(--cloth-2); }
.pt.d .pt-st, .pt.e .pt-st, .pt.f .pt-st { color: var(--ink-2); }
.pt.c { background: var(--gyul-2); border-color: var(--gyul); }
.pt.c::after { border-color: var(--gyul); }
.pt.c .pt-st { color: var(--ink); }
.mini { position: absolute; top: 9px; right: 11px; display: flex; gap: 2px; }
.mini i { width: 11px; height: 11px; border-radius: 2px; background: var(--cloth-3); position: relative; }
.mini i::after { inset: 0; border: 0; }
.mini .t2 { background: var(--jjok); } .mini .t1 { background: var(--gyul); } .mini .t0 { background: var(--fade); }
.pt.a .mini i { background: rgba(255, 255, 255, 0.28); }
.pt.a .mini .t2 { background: #fff; } .pt.a .mini .t1 { background: var(--gyul); }
.mini.w3 i { width: 15px; }
.pt.d .mini, .pt.e .mini, .pt.f .mini { display: none; }
.wd.xw.land .pt.d .mini, .wd.xw.land .pt.e .mini, .wd.xw.land .pt.f .mini { display: flex; }
.wd.port .pt.d .pt-s, .wd.port .pt.e .pt-s, .wd.port .pt.f .pt-s { display: none; }
/* 가장 큰 조각(오늘의 낱말 여섯 칸)은 칸 그림을 크게 */
.pt.a { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pt.a .pt-n { grid-row: 1; } .pt.a .pt-s { grid-row: 2; } .pt.a .pt-st { grid-row: 4; }
.pt.a .mini { position: static; grid-row: 3; align-self: center; gap: 4px; }
.pt.a .mini i { width: 22px; width: clamp(18px, 4.4cqmin, 34px); height: auto; aspect-ratio: 1; border-radius: 4px; }
.wd.port .pt.a .mini { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); }
.wd.port .pt.a .mini i { width: 18px; }
.wd.tiny .pt { padding: 6px 10px; }
.wd.tiny .pt-s { display: none; }
.wd.tiny .menu { gap: 6px; }

/* ---------------------------------------------------------------- 판 */
.play { display: grid; padding: var(--pad); }
.wd.port .play { grid-template-rows: minmax(0, 1fr) auto; gap: 0; padding-bottom: max(var(--pad), env(safe-area-inset-bottom)); }
.wd.land .play { grid-template-columns: auto var(--sidew); align-items: center; justify-content: center; gap: clamp(14px, 3cqw, 44px); }
.bdw { display: grid; place-items: center; min-height: 0; min-width: 0; }
.bd { display: grid; gap: var(--g); }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: var(--cw); gap: var(--g); height: var(--c); }
.cell { position: relative; display: grid; place-items: center; border-radius: var(--r1); background-color: var(--card); border: 1.5px solid var(--cloth-3); font: 700 28px/1 var(--f-disp); font-size: calc(var(--c) * 0.5); color: var(--ink); min-width: 0; }
.cell.on { border-color: var(--ink-2); }
.cell.cur { border-color: var(--jjok); border-style: dashed; }
.cell.pop { animation: pop 0.12s ease-out; }
.cell.t0 { --tc: var(--fade); --tt: #fff; }
.cell.t1 { --tc: var(--gyul); --tt: var(--ink); }
.cell.t2 { --tc: var(--jjok); --tt: #fff; }
.cell.t0, .cell.t1, .cell.t2 { background-image: linear-gradient(var(--tc), var(--tc)); background-repeat: no-repeat; background-position: bottom; background-size: 100% 100%; color: var(--tt); border-color: transparent; }
.cell.t1::after, .cell.t2::after { content: ''; position: absolute; inset: 3px; border-radius: 3px; border: 1px dashed rgba(255, 255, 255, 0.6); pointer-events: none; }
.cell.t1::after { border-color: rgba(37, 47, 63, 0.36); }
/* 실마리 공개: 아래에서부터 물이 듦 */
.cell.rv { animation: dye 0.48s var(--ease) both; animation-delay: calc(var(--i) * 0.13s); }
.cell.rv::after { animation: stitch 0.2s linear both; animation-delay: calc(var(--i) * 0.13s + 0.4s); }
@keyframes dye {
  0% { background-size: 100% 0%; color: var(--ink); border-color: var(--ink-2); transform: none; }
  38% { color: var(--ink); transform: translateY(3px); }
  56% { color: var(--tt); }
  100% { background-size: 100% 100%; color: var(--tt); border-color: transparent; transform: none; }
}
@keyframes stitch { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0.9); } to { transform: none; } }
.row.no { animation: no 0.36s linear; }
@keyframes no { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.row.win .cell { animation: hop 0.5s var(--ease) both; animation-delay: calc(var(--i) * 0.07s); }
@keyframes hop { 0% { transform: none; } 40% { transform: translateY(-9px); } 100% { transform: none; } }

/* 세 글자 판: 글자 + 아래 세 조각(첫소리·가운뎃소리·받침) */
.cell.syl { grid-template-rows: minmax(0, 1fr) auto; place-items: stretch; padding: 0; overflow: hidden; font-family: var(--f-body); }
.gl { display: grid; place-items: center; font: 700 26px/1 var(--f-body); font-size: calc(var(--c) * 0.42); min-height: 0; }
.lamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 0 3px 3px; height: calc(var(--c) * 0.4); }
.lamp { position: relative; display: grid; place-items: center; border-radius: 3px; background-color: var(--cloth-2); color: var(--ink-3); font: 700 13px/1 var(--f-body); font-size: max(12px, calc(var(--c) * 0.25)); min-width: 0; overflow: hidden; }
.lamp.nb { background-color: transparent; background-image: repeating-linear-gradient(135deg, var(--cloth-3) 0 1.5px, transparent 1.5px 5px); }
.lamp.t0 { --tc: var(--fade); --tt: #fff; }
.lamp.t1 { --tc: var(--gyul); --tt: var(--ink); }
.lamp.t2 { --tc: var(--jjok); --tt: #fff; }
.lamp.t0, .lamp.t1, .lamp.t2 { background-image: linear-gradient(var(--tc), var(--tc)); background-repeat: no-repeat; background-position: bottom; background-size: 100% 100%; color: var(--tt); }
.lamp.rv { animation: dye2 0.4s var(--ease) both; animation-delay: calc(var(--i) * 0.09s); }
@keyframes dye2 { 0% { background-size: 100% 0%; color: var(--ink-2); } 55% { color: var(--tt); } 100% { background-size: 100% 100%; color: var(--tt); } }
.cell.syl.all { background-color: var(--jjok); border-color: transparent; }
.cell.syl.all .gl { color: #fff; }
.cell.syl.all .lamp { background-image: none; background-color: rgba(255, 255, 255, 0.22); color: #fff; }
.cell.syl.all.rv2 { animation: fill 0.3s linear both; animation-delay: calc(var(--i) * 0.09s + 0.3s); }
.cell.syl.all.rv2 .gl { animation: ink 0.3s linear both; animation-delay: calc(var(--i) * 0.09s + 0.3s); }
@keyframes fill { from { background-color: var(--card); border-color: var(--ink-2); } to { background-color: var(--jjok); border-color: transparent; } }
@keyframes ink { from { color: var(--ink); } to { color: #fff; } }
.cell.syl.seen { border-color: var(--cloth-3); background-color: var(--card); }

/* 색약 모드: 색에 무늬를 더함 (자리 맞음 = 꽉 찬 칸에 점, 있음 = 빗금, 없음 = 빈 칸) */
.wd.cb .cell.t1, .wd.cb .lamp.t1, .wd.cb .k.s1 > i, .wd.cb .hd-tiles .t1, .wd.cb .lg .t1 { background-image: repeating-linear-gradient(135deg, rgba(37, 47, 63, 0.3) 0 2px, transparent 2px 7px), linear-gradient(var(--gyul), var(--gyul)); }
.wd.cb .cell.t0, .wd.cb .lamp.t0, .wd.cb .hd-tiles .t0, .wd.cb .lg .t0 { background-image: none; background-color: transparent; color: var(--ink-3); border: 1.5px dotted var(--ink-3); }
.wd.cb .k.s0 > i { background: transparent; border: 1px dotted var(--ink-3); color: var(--ink-3); }
.wd.cb .cell.t2::before, .wd.cb .lamp.t2::before, .wd.cb .k.s2 > i::before { content: ''; position: absolute; top: 4px; left: 4px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.wd.cb .lamp.t2::before { top: 2px; left: 2px; width: 3px; height: 3px; }
.wd.cb .cell.rv, .wd.cb .lamp.rv { animation-name: cbin; }
@keyframes cbin { from { opacity: 0.2; } to { opacity: 1; } }

/* ---------------------------------------------------------------- 안내 줄과 자판 */
.side { display: grid; gap: 6px; min-width: 0; min-height: 0; }
.wd.port .side { grid-template-rows: auto auto; width: 100%; max-width: 560px; margin: 0 auto; }
.wd.land .side { grid-template-rows: minmax(0, 1fr) auto; height: 100%; max-height: calc(var(--c) * 6 + var(--g) * 5); align-content: end; }
.info { display: grid; min-width: 0; }
.wd.port .info { height: 34px; align-items: center; justify-items: center; grid-template-columns: minmax(0, 1fr); }
.wd.port .cap { display: none; }
.wd.land .info { align-content: center; justify-items: start; gap: var(--s2); padding: 0 2px; }
.cap { margin: 0; font: 600 13px/1.3 var(--f-body); color: var(--ink-3); letter-spacing: 0.02em; }
.pv { margin: 0; font: 700 22px/1.15 var(--f-body); color: var(--ink); letter-spacing: 0.04em; white-space: nowrap; min-height: 1.15em; }
.wd.land .pv { font-size: clamp(24px, 6cqh, 44px); line-height: 1.4; }
.pv.ph { font: 500 14px/1.4 var(--f-body); color: var(--ink-3); letter-spacing: 0; white-space: normal; }
.wd.land .pv.ph { font-size: 14.5px; }
.msg { margin: 0; font: 600 14px/1.35 var(--f-body); color: var(--red); }
.wd.port .pv.ph { font-size: 13.5px; white-space: nowrap; }
.wd.port .info.has-msg .pv { display: none; }
.wd.land .msg { min-height: 1.35em; }
.focus-tip { margin: 0; font: 500 12.5px/1.4 var(--f-body); color: var(--ink-3); }
.wd.port .focus-tip { display: none; }

.kb { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); grid-auto-rows: var(--kh); width: 100%; touch-action: none; }
.k { grid-column: span 2; padding: 0; border: 0; background: none; display: grid; min-width: 0; }
.k > i > b { font-weight: inherit; }
.k > i { position: relative; margin: 2.5px; border-radius: var(--r1); background: var(--card); border: 1px solid var(--cloth-3); border-bottom-width: 2.5px; display: grid; place-items: center; font: 700 19px/1 var(--f-disp); font-size: clamp(16px, calc(var(--kh) * 0.42), 24px); font-style: normal; color: var(--ink); min-width: 0; pointer-events: none; }
.k.dn > i { transform: translateY(1.5px); border-bottom-width: 1px; background: var(--cloth-2); }
.k.xl { grid-column: span 3; padding-left: 5%; }
.k.xr { grid-column: span 3; padding-right: 5%; }
.k.w3 { grid-column: span 3; }
.k.go { grid-column: span 20; }
.k.go > i { background: var(--ink); color: var(--card); border-color: var(--ink); font: 600 15px/1 var(--f-body); letter-spacing: 0.1em; }
.k.go.dn > i { background: var(--ink-2); }
.k svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.k.s2 > i { background: var(--jjok); color: #fff; border-color: var(--jjok-d); }
.k.s1 > i { background: var(--gyul); color: var(--ink); border-color: var(--gyul-d); }
.k.s0 > i { background: var(--fade-2); color: var(--ink-3); border-color: var(--cloth-3); border-bottom-width: 1px; }
.k.sh.on > i { background: var(--ink); color: var(--card); border-color: var(--ink); }
.kb.shift .k.j:not(.has-alt) > i { opacity: 0.38; }

/* ---------------------------------------------------------------- 판이 끝난 뒤 */
.res { display: grid; align-content: center; gap: var(--s2); min-width: 0; padding: var(--s3) var(--s3); border-radius: var(--r2); background: var(--card); border: 1px solid var(--cloth-3); position: relative; }
.res::after { content: ''; position: absolute; inset: 4px; border: 1px dashed var(--cloth-3); border-radius: 6px; pointer-events: none; }
.wd.port .res { height: var(--sideh); }
.wd.land .res { align-self: center; padding: var(--s5); gap: var(--s3); }
.wd.land .res-h { font-size: clamp(20px, 4.2cqmin, 30px); }
.wd.land.tiny .res { padding: var(--s3); gap: 6px; }
.side.fin { grid-template-rows: minmax(0, 1fr); }
.side.fin .info, .side.fin .kb { display: none; }
.res-h { margin: 0; font: 700 19px/1.25 var(--f-disp); font-size: clamp(18px, 3.4cqmin, 25px); letter-spacing: -0.02em; color: var(--ink); }
.res-h.lose { color: var(--ink-2); }
.res-w { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r1); background: var(--jjok-2); }
.res-w strong { font: 700 22px/1.1 var(--f-body); font-size: clamp(21px, 4cqmin, 30px); color: var(--jjok-d); letter-spacing: 0.04em; white-space: nowrap; }
.res-w p { margin: 0; font: 400 14px/1.45 var(--f-body); color: var(--ink); user-select: text; -webkit-user-select: text; }
.res-s { margin: 0; font: 500 13px/1.4 var(--f-body); color: var(--ink-2); }
.res-s b { color: var(--ink); font-weight: 700; }
.res-b { display: flex; flex-wrap: wrap; gap: var(--s2); position: relative; z-index: 1; }
.btn { height: 40px; padding: 0 var(--s4); border-radius: 999px; border: 1px solid var(--cloth-3); background: var(--card); color: var(--ink); font: 600 14px/1 var(--f-body); flex: none; }
.btn:hover { border-color: var(--ink-3); }
.btn.pri { background: var(--ink); border-color: var(--ink); color: var(--card); }
.btn.pri:hover { background: var(--jjok-d); border-color: var(--jjok-d); }
.btn.warn { color: var(--red); }
.res-n { margin: 0; font: 500 12.5px/1.3 var(--f-body); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.wd.tiny .res { gap: 6px; padding: var(--s2) var(--s3); }
.wd.tiny .btn { height: 36px; }

/* ---------------------------------------------------------------- 창 (방법·기록·설정) */
.modal { position: absolute; inset: 0; background: rgba(37, 47, 63, 0.4); display: grid; place-items: center; z-index: 30; padding: var(--s3); }
.dlg { position: relative; background: var(--card); border-radius: var(--r3); width: min(100%, 540px); max-height: 100%; overflow-x: hidden; overflow-y: auto; padding: var(--s5) var(--s5) var(--s4); box-shadow: 0 14px 44px rgba(37, 47, 63, 0.26); animation: rise 0.26s var(--ease); overscroll-behavior: contain; }
.wd.land .dlg.wide { width: min(100%, 760px); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg h2 { margin: 0 var(--s7) var(--s3) 0; font: 700 23px/1.2 var(--f-disp); letter-spacing: -0.02em; }
.dlg h3 { margin: var(--s5) 0 var(--s2); font: 700 17px/1.3 var(--f-disp); }
.dlg p { margin: 0 0 var(--s2); font: 400 14.5px/1.6 var(--f-body); color: var(--ink); }
.dlg .dim { color: var(--ink-2); font-size: 13.5px; }
.x { position: absolute; top: var(--s3); right: var(--s3); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cloth-2); color: var(--ink-2); display: grid; place-items: center; }
.x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.x:hover { background: var(--cloth-3); color: var(--ink); }
.dlg-b { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.shr { display: block; width: 100%; resize: none; border: 1px solid var(--cloth-3); border-radius: var(--r1); background: var(--cloth); color: var(--ink); font: 400 15px/1.5 var(--f-body); padding: var(--s2) var(--s3); user-select: text; -webkit-user-select: text; }
.wd.land .help-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--s6); }
.wd.land .help-cols h3:first-child { margin-top: var(--s2); }
.wd.land .help-cols > div > h3:first-child { margin-top: var(--s2); }
/* 방법 창의 예시 판 */
.ex { display: flex; gap: 4px; margin: var(--s2) 0; --c: 40px; }
.ex .cell { width: 40px; height: 40px; flex: none; font-size: 20px; }
.ex .cell.syl { width: 64px; height: 58px; --c: 58px; }
.ex.sm { --c: 32px; gap: 3px; margin: 2px 0; }
.ex.sm .cell { width: 32px; height: 32px; font-size: 17px; }
.lg { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 6px; }
.lg li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: var(--s2); align-items: center; font: 400 14px/1.45 var(--f-body); }
.lg i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; font: 700 16px/1 var(--f-disp); font-style: normal; position: relative; }
.lg .t2 { background: var(--jjok); color: #fff; } .lg .t1 { background: var(--gyul); color: var(--ink); } .lg .t0 { background: var(--fade); color: #fff; }
.lg b { font-weight: 600; }
.split { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--s3); align-items: center; margin: var(--s2) 0; }
.split b { font: 700 17px/1 var(--f-body); letter-spacing: 0.04em; }
.split span { grid-column: 1 / -1; font: 400 13.5px/1.45 var(--f-body); color: var(--ink-2); margin-bottom: 6px; }
/* 기록 창 */
.tabs { display: flex; gap: 4px; margin: 0 0 var(--s3); padding: 3px; border-radius: 999px; background: var(--cloth-2); width: max-content; max-width: 100%; }
.tab { height: 34px; padding: 0 var(--s3); border-radius: 999px; border: 0; background: none; font: 600 13.5px/1 var(--f-body); color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 0 var(--cloth-3); }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin: 0 0 var(--s3); }
.nums div { padding: var(--s2) 4px; border-radius: var(--r1); background: var(--cloth); text-align: center; min-width: 0; }
.nums b { display: block; font: 700 24px/1.15 var(--f-disp); font-variant-numeric: tabular-nums; }
.nums span { font: 500 12.5px/1.3 var(--f-body); color: var(--ink-2); }
.dist { display: grid; gap: 4px; margin: var(--s2) 0; }
.dist div { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: var(--s2); font: 500 13px/1 var(--f-body); color: var(--ink-2); }
.dist i { display: block; height: 22px; min-width: 28px; border-radius: 3px; background: var(--fade); color: #fff; font: 700 12.5px/22px var(--f-body); font-style: normal; text-align: right; padding: 0 7px; font-variant-numeric: tabular-nums; }
.dist i.hi { background: var(--jjok); }
.dist i.z { background: var(--cloth-2); color: var(--ink-3); }
/* 설정 창 */
.setl { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.setl li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px dashed var(--cloth-3); }
.setl li:first-child { border-top: 0; }
.setl b { display: block; font: 600 15px/1.3 var(--f-body); }
.setl span { display: block; font: 400 13px/1.45 var(--f-body); color: var(--ink-2); }

.toast { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); z-index: 40; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--card); font: 600 13.5px/1.3 var(--f-body); white-space: nowrap; animation: rise 0.2s var(--ease); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .cell.rv, .cell.rv::after, .lamp.rv, .row.no, .row.win .cell, .cell.pop, .dlg, .toast, .cell.syl.all.rv2, .cell.syl.all.rv2 .gl { animation: none !important; }
  .pt, .sw::after { transition: none; }
}

/* ---------------------------------------------------------------- 게임 아래 소개 글 */
.about { max-width: 1240px; margin: 0 auto; padding: var(--s7) clamp(var(--s4), 4vw, var(--s7)) var(--s6); display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.8fr); gap: var(--s6) clamp(var(--s5), 5vw, var(--s8)); }
.about-main { min-width: 0; }
.about h2 { margin: var(--s6) 0 var(--s2); font: 700 25px/1.3 var(--f-disp); letter-spacing: -0.01em; }
.about h2:first-child { margin-top: 0; }
.about p, .about li { font-size: 16px; color: var(--page-ink); }
.about p { margin: 0 0 var(--s3); }
.about ul, .about ol { margin: 0 0 var(--s3); padding-left: 1.3em; }
.about li { margin-bottom: 6px; }
.about strong { font-weight: 600; }
.about dl { margin: 0; }
.about dt { margin-top: var(--s4); font-weight: 600; }
.about dd { margin: 4px 0 0; color: var(--page-2); }
.about .note { padding: var(--s3) var(--s4); border-left: 3px solid var(--jjok); background: var(--cloth); border-radius: 0 var(--r1) var(--r1) 0; font-size: 15px; color: var(--page-2); }
.about-side { min-width: 0; font-size: 14px; color: var(--page-2); }
.about-side h3 { margin: 0 0 var(--s2); font: 700 19px/1.3 var(--f-disp); color: var(--page-ink); }
.keytab { width: 100%; border-collapse: collapse; margin-bottom: var(--s5); font-size: 14px; }
.keytab th { text-align: left; font-weight: 500; padding: 6px 0; color: var(--page-2); }
.keytab td { padding: 6px 0; font-weight: 600; color: var(--page-ink); text-align: right; }
.keytab tr + tr th, .keytab tr + tr td { border-top: 1px solid var(--page-line); }
.sw-c { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.sw-c.c2 { background: var(--jjok); } .sw-c.c1 { background: var(--gyul); } .sw-c.c0 { background: var(--fade); }
.ex-split { margin: 0 0 var(--s5); padding: var(--s3); border-radius: var(--r2); background: var(--cloth); border: 1px solid var(--page-line); font-size: 14px; line-height: 2; color: var(--page-ink); }
.ex-split b { font-weight: 700; color: var(--jjok-d); letter-spacing: 0.12em; }
.credits { font-size: 13px; color: var(--page-2); line-height: 1.6; }
.credits a { color: var(--page-2); }
.more { margin-top: var(--s5); font-size: 14px; color: var(--page-2); line-height: 1.9; }
.more a { white-space: nowrap; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; padding-top: var(--s6); } }
.foot { border-top: 1px solid var(--page-line); padding: var(--s5) clamp(var(--s4), 4vw, var(--s7)) var(--s6); font-size: 13px; color: var(--page-2); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); max-width: 1240px; margin: 0 auto; }
.foot a { color: var(--page-2); white-space: nowrap; }
.foot p { flex-basis: 100%; margin: var(--s2) 0 0; }
