/* Scope the game independently of sentence/travel layouts. */
#wordChainScreen[hidden],#wordChainScreen [hidden]{display:none!important}
#wordChainScreen{position:fixed;inset:var(--wc-top,0px) 0 auto;z-index:19000;height:var(--wc-height,100dvh);box-sizing:border-box;display:flex;justify-content:center;align-items:center;padding:24px;background:#f2f0eb;color:#302f2b;overflow:auto;font-family:inherit;}
#wordChainScreen *{box-sizing:border-box}
#wordChainScreen .wc-panel{width:100%;max-width:820px;max-height:100%;overflow:auto;background:#fff;border:1px solid #ddd8cc;border-radius:20px;padding:24px;box-shadow:0 12px 40px #302f2b12}
#wordChainScreen button{min-height:44px;padding:8px 15px;border:1px solid #cfc8b8;background:#fff;color:#302f2b;border-radius:9px;font:inherit;font-size:16px;cursor:pointer;white-space:nowrap}
#wordChainScreen button:disabled{opacity:.5;cursor:default}
#wordChainScreen button:focus-visible,#wcInput:focus-visible{outline:3px solid #ad852d;outline-offset:2px}
#wordChainScreen .wc-header{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-bottom:1px solid #eee7d9;padding-bottom:14px}
#wordChainScreen h2{margin:0 auto 0 0;font-size:24px;color:inherit}
#wcCount{font-size:14px;color:#676055}
#wordChainScreen .wc-turn{display:flex;justify-content:space-between;gap:8px;padding:16px 0 8px;font-size:16px}
#wcTimer{color:#685119}#wcTimer.wc-urgent{color:#b3352e}
#wordChainScreen .wc-current{text-align:center;padding:14px;border-radius:14px;background:#f8f5ed}
#wcWord{font-size:clamp(30px,5vw,46px);font-weight:700;word-break:break-all;color:#604b1e}
#wcClue{margin:5px 0 0;font-size:16px;line-height:1.45}
#wcRequired{margin:14px 0 8px;font-weight:600;font-size:18px}
#wordChainScreen .wc-label{display:block;font-size:14px;margin-bottom:6px;color:#676055}
#wordChainScreen .wc-entry{display:flex;gap:8px;align-items:stretch}
#wcInput{width:100%;min-width:0;height:54px;padding:9px 12px;border:2px solid #b3944d;border-radius:9px;font:inherit;font-size:24px;color:#302f2b;background:white;}
#wordChainScreen #wcSend{background:#ac852f;color:white;border-color:#ac852f;font-weight:600}
#wcMessage{min-height:24px;margin:8px 0;font-size:15px;line-height:1.45;color:#375f42}#wcMessage.wc-error{color:#b3352e}
#wordChainScreen .wc-online-links{display:flex;gap:6px;flex-wrap:wrap}#wordChainScreen .wc-online-search{display:inline-flex;align-items:center;min-height:38px;margin:0 0 8px;padding:5px 10px;border:1px solid #b8a981;border-radius:8px;color:#624a1e;background:#fffaf0;text-decoration:none;font-size:14px}#wordChainScreen .wc-online-search[hidden]{display:none}#wordChainScreen .wc-online-search:focus-visible{outline:3px solid #ad852d;outline-offset:2px}
#wordChainScreen .wc-hints{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#wcHint{flex-basis:100%;font-size:16px;line-height:1.5;min-height:24px}
#wordChainScreen .wc-history{margin-top:14px;border-top:1px solid #eee7d9;padding-top:12px}#wordChainScreen summary{cursor:pointer;font-size:16px;line-height:1.5}
#wcHistory,#wcWrongs{max-height:170px;overflow-y:auto;overscroll-behavior:contain;padding:0 0 0 24px;margin:8px 0;font-size:15px;line-height:1.6;scrollbar-gutter:stable;word-break:break-word}
#wordChainScreen .wc-foot{color:#746b59;font-size:13px;line-height:1.6;margin:12px 0 0}
#wordChainScreen .wc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
#wordChainScreen .wc-stats>div{background:#f8f5ed;border-radius:10px;padding:12px;text-align:center}#wordChainScreen .wc-stats span{display:block;font-size:13px}#wordChainScreen .wc-stats strong{display:block;font-size:24px;margin-top:5px}#wordChainScreen .wc-actions{display:flex;gap:8px;margin-top:14px}
body.wordchain-playing{overflow:hidden}
@media(max-width:820px){#wordChainScreen{padding:8px;align-items:center}#wordChainScreen .wc-panel{padding:16px;border-radius:14px}#wordChainScreen .wc-header{gap:6px;padding-bottom:10px}#wordChainScreen h2{font-size:21px}#wordChainScreen .wc-header button{font-size:14px;padding:8px 10px}#wcCount{flex-basis:100%;order:3}#wordChainScreen .wc-turn{padding-top:10px}#wordChainScreen .wc-stats{grid-template-columns:repeat(2,minmax(0,1fr))}#wcHistory{max-height:120px}}
#wordChainScreen.wc-short{padding:4px;align-items:flex-start}#wordChainScreen.wc-short .wc-panel{padding:10px;border-radius:10px}#wordChainScreen.wc-short .wc-header{padding-bottom:4px}#wordChainScreen.wc-short #wcCount{display:none}#wordChainScreen.wc-short .wc-turn{padding:6px 0;font-size:14px}#wordChainScreen.wc-short .wc-current{padding:5px}#wordChainScreen.wc-short #wcWord{font-size:27px}#wordChainScreen.wc-short #wcClue{display:none}#wordChainScreen.wc-short #wcRequired{margin:6px 0;font-size:16px}#wordChainScreen.wc-short .wc-label{display:none}#wordChainScreen.wc-short #wcInput{height:46px;font-size:22px}#wordChainScreen.wc-short #wcMessage{margin:4px 0;min-height:21px;font-size:14px}#wordChainScreen.wc-short .wc-foot,#wordChainScreen.wc-short .wc-history{display:none}#wordChainScreen.wc-short #wcHint{font-size:14px;min-height:0}#wordChainScreen.wc-short .wc-hints{gap:4px}
