/* Approved October 25 design; gameplay and symbol order are preserved. */

:root{background:#f5f6f8;color:#252830;font-family:"Yu Gothic",sans-serif}
body{min-height:100svh;background:#f5f6f8}
header{max-width:700px;padding:24px 26px 0;justify-content:flex-end;height:68px}
.switch{border:1px solid #cbd0d8;border-radius:7px;background:#fff}
.switch button{width:46px;height:42px;line-height:26px}
.switch button[aria-pressed=true]{background:#252830}
main{max-width:700px;margin:0 auto;padding:0 26px 30px;flex:1}
h1{font-family:"Yu Gothic",sans-serif;font-weight:700;font-size:32px;letter-spacing:.03em;line-height:1.5;height:140px;margin:0;}
#puzzle{max-width:560px;margin:auto;background:#fff;border-radius:16px;padding:48px 32px 32px;box-shadow:0 3px 18px #28344a06}
.keys{gap:52px}.key{min-width:140px}.cipher-square{width:72px;height:72px}.code{margin-top:22px;gap:6px}
.answer-clue{height:auto;min-height:74px;display:flex;flex-direction:column;gap:14px;margin:44px 0 24px}
.answer-clue>span{font-size:15px}.answer-clue .answer-code{gap:7px}.dot{width:23px;height:23px}.literal{width:23px}
.answer-entry{max-width:350px;grid-template-columns:minmax(0,1fr) 80px;gap:8px}
.answer-entry input,.answer-entry #translate{height:50px;border:1px solid #aeb5c0;border-radius:5px;background:#fff;box-shadow:none;font:inherit;text-align:center}
.answer-entry button[type=submit]{width:80px;height:50px;border-radius:5px;background:#252830}
footer{padding:24px 24px 30px}#end,#start{border-radius:6px}
@media(max-width:500px){header{padding:20px 24px 0;height:64px}main{padding:0 20px 20px}h1{font-size:27px;height:132px;letter-spacing:.01em}#puzzle{padding:36px 16px 28px}.keys{gap:24px}.key{min-width:128px}.cipher-square{width:64px;height:64px}.dot{width:21px;height:21px}.literal{width:21px}.answer-clue .answer-code{gap:6px}.answer-clue{margin-top:36px}footer{padding-bottom:28px}}
@media(max-width:360px){h1{font-size:24px}.keys{gap:12px}.key{min-width:116px}#puzzle{padding-inline:12px}.code{gap:4px}.answer-clue .answer-code{gap:4px}}


/* Corresponding clue and control use exactly the same dimensions. */
:root{--control-w:128px;--control-h:48px;--control-radius:6px}
.cipher-square,#start,#end{width:var(--control-w);min-width:var(--control-w);height:var(--control-h);border-radius:var(--control-radius);border-width:1px;border-style:solid}
.cipher-square{margin-inline:auto}
#start,.start-square{background:#f3e3de;border-color:#b7756c}
#end,.end-square{background:#e0ebef;border-color:#668fa1}
@media(max-width:360px){:root{--control-w:116px}}

:root{--control-w:96px;--control-h:56px;--control-radius:6px}@media(max-width:360px){:root{--control-w:96px}}#start,#end{padding:12px 8px}

.token{display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:28px;color:#252830;font-family:Arial,"Yu Gothic",sans-serif;font-size:25px;font-weight:400;line-height:1}
.code{gap:6px}.answer-clue .answer-code{gap:6px}.literal{width:24px;height:25px}
@media(max-width:360px){.token{width:21px;font-size:23px}.literal{width:21px}.code,.answer-clue .answer-code{gap:4px}}

.token{font-family:"Yu Gothic","Meiryo",sans-serif;font-size:25px}.literal{height:25px}@media(max-width:360px){.token{font-size:23px}}

dialog{width:350px;max-width:calc(100% - 32px);padding:36px 22px 28px;border:0;border-radius:16px;background:#fff;color:#252830;box-shadow:0 16px 64px #17203225;font-family:"Yu Gothic",sans-serif}
dialog::backdrop{background:#25283066}
dialog h2,#share-title{font:700 24px/1.5 "Yu Gothic",sans-serif;margin:4px 0 24px}
dialog p{font-size:14px;line-height:1.8}
#share-dialog{width:350px;padding:36px 20px 28px;transform:translateY(24px);max-height:calc(100svh - 48px)}
#share-dialog .close{top:8px;right:8px;width:40px;height:40px;min-height:40px;padding:0;font-size:25px;color:#697180}
.share-caption{color:#697180}.share-options{gap:4px;margin-top:24px}.social{min-height:90px;gap:12px}.social-label{font-size:11px}
#back-share{margin-top:88px;min-height:44px;padding:10px 16px;border-color:#b3bac4;color:#252830}
#clear-share{width:100%;height:48px;border-radius:6px;border-color:#252830;background:#252830;color:white;margin:28px auto 12px}
#return{height:44px;min-width:96px;background:white;border-radius:6px;border-color:#cbd0d8}
.clear-links{gap:16px;margin-top:28px;font-size:12px}.clear-links a{color:#697180}
.dialog-actions{gap:12px;margin-top:28px}.dialog-actions button{min-width:96px;height:48px;border-radius:6px;border-color:#cbd0d8;background:#fff}
#keep-playing{background:#252830;color:#fff;border-color:#252830}
#quit-title{font-size:20px}#feedback{font-size:14px;min-height:24px;margin-top:16px;color:#697180}#feedback:empty{min-height:0;margin:0}
@media(max-height:650px){#share-dialog{transform:none}#back-share{margin-top:56px}}
