*{box-sizing:border-box}body{margin:0;background:#f3f5fa;color:#243047;font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-size:14px}.nm-shell{max-width:1040px;margin:auto;padding:12px}.nm-head{display:flex;align-items:center;gap:15px;background:#fff;border:1px solid #dce2ed;border-radius:12px;padding:10px 15px;min-height:44px}.nm-head>a{color:#4e4380;text-decoration:none;font-weight:600}.nm-head>strong{font-size:16px}.nm-head>span{margin-left:auto;color:#69758a;font-size:12px}.nm-main{margin-top:12px;background:#fff;border:1px solid #dce2ed;border-radius:14px;padding:17px}.nm-eyebrow{font-size:11px;letter-spacing:.09em;color:#6c5f96;margin:0 0 4px;font-weight:700}.nm-top{display:flex;justify-content:space-between;align-items:end;gap:14px}.nm-top h1{font-size:23px;line-height:1.15;margin:0 0 5px}.nm-top p{margin:0;color:#58677a;font-size:13px}.nm-level{display:grid;gap:4px;font-weight:650;min-width:220px;font-size:12px}.nm-level select{font:inherit;font-weight:500;min-height:36px;border:1px solid #bfcad9;border-radius:8px;padding:6px;background:#fff}.nm-play{margin-top:14px}.nm-puzzle-row{display:grid;grid-template-columns:minmax(0,1fr) 175px;gap:12px}.nm-puzzle,.nm-monster-area{border:1px solid #e2e5ef;background:#fbfaff;border-radius:12px;padding:13px}.nm-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#665b86}.nm-word{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;min-height:76px;align-items:center;padding:12px 2px 8px}.nm-token{display:inline-flex;flex-direction:column;gap:3px;align-items:center;justify-content:end;min-width:24px;height:43px;border-bottom:2px solid #5e5893;padding:2px 3px}.nm-token-letter{white-space:pre;letter-spacing:.09em;font-weight:780;font-size:20px}.nm-token[data-length="3"]{min-width:62px}.nm-token[data-length="2"]{min-width:44px}.nm-token.is-found{border-color:#2f906c;color:#236649}.nm-token.is-missed{border-color:#ad4d63;color:#923e52}.nm-notice{margin:2px 0 9px;min-height:21px;color:#58647a;text-align:center;font-size:13px}.nm-notice.success{color:#1d7551}.nm-notice.error{color:#9a4053}.nm-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.nm-btn{border:1px solid #65489e;background:#65489e;color:white;font:inherit;font-weight:650;padding:7px 12px;border-radius:9px;cursor:pointer;min-height:35px}.nm-btn.nm-ghost{background:#fff;color:#594381}.nm-btn:hover{filter:brightness(.94)}.nm-btn:disabled{opacity:.48;cursor:default}.nm-monster-area{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px}.nm-monster-image-wrap{height:125px;width:140px;overflow:hidden;position:relative;border-radius:16px;background:#f4edfc}.nm-monster-image{width:100%;height:100%;object-fit:contain;filter:saturate(.75);clip-path:inset(100% 0 0 0);transition:clip-path .35s ease,filter .25s}.nm-monster-image-wrap.is-won .nm-monster-image{clip-path:inset(0);filter:hue-rotate(65deg) saturate(1.5)}.nm-mistakes{text-align:center;font-size:11px;margin-top:6px}.nm-lights{display:flex;gap:5px;justify-content:center;margin-top:5px}.nm-light{width:13px;height:7px;border-radius:9px;background:#dbdce6}.nm-light.is-on{background:#a771bd}.nm-theory{border:1px solid #e0e4ed;border-radius:12px;margin-top:12px;padding:11px 14px 14px}.nm-theory-head{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:14px}.nm-theory-head a{font-size:12px;color:#554685;text-decoration:none}.nm-note,.nm-keyhelp{font-size:11px;color:#677084;line-height:1.4;margin:5px 0 6px}.nm-staff{height:102px;display:flex;justify-content:center;align-items:center}.nm-staff img{width:min(100%,700px);max-height:95px;object-fit:contain}.nm-keyboard{position:relative;max-width:670px;margin:2px auto 0;padding-top:0;user-select:none}.nm-whites{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));height:94px}.nm-white{position:relative;background:linear-gradient(#fff,#f0f0f5);border:1px solid #606477;border-radius:0 0 6px 6px;padding:0 1px 9px;display:flex;align-items:end;justify-content:center;font-size:14px;font-weight:750;color:#2c3549;cursor:pointer}.nm-white:first-child{border-radius:7px 0 6px 6px}.nm-white:last-child{border-radius:0 7px 6px 6px}.nm-blacks{position:absolute;inset:0;pointer-events:none}.nm-black{pointer-events:auto;position:absolute;top:0;width:9.4%;height:60%;transform:translateX(-50%);background:linear-gradient(#232537,#3d4051);color:#fff;border:1px solid #121320;border-radius:0 0 7px 7px;font-size:10px;font-weight:650;display:flex;flex-direction:column;align-items:center;justify-content:end;padding:0 0 6px;cursor:pointer;line-height:1.25;box-shadow:0 3px 3px #0003}.nm-white:focus-visible,.nm-black:focus-visible{outline:3px solid #e19642;outline-offset:2px;z-index:6}.nm-white:disabled,.nm-black:disabled{cursor:default;opacity:.45}.nm-white.is-right{background:#bde9d5}.nm-white.is-wrong{background:#ffd3d7}.nm-black.is-right{background:#276b4f}.nm-black.is-wrong{background:#923d58}.nm-foot{margin:12px 0 0;text-align:center;color:#7a8495;font-size:11px}@media(max-width:610px){.nm-shell{padding:6px}.nm-main{padding:10px}.nm-top{align-items:stretch;flex-direction:column}.nm-level{min-width:0}.nm-puzzle-row{grid-template-columns:minmax(0,1fr) 112px;gap:7px}.nm-puzzle,.nm-monster-area{padding:8px}.nm-monster-image-wrap{width:98px;height:110px}.nm-top h1{font-size:20px}.nm-word{min-height:67px}.nm-token-letter{font-size:16px}.nm-token{min-width:19px;height:36px}.nm-token[data-length="3"]{min-width:49px}.nm-token[data-length="2"]{min-width:33px}.nm-whites{height:80px}.nm-white{font-size:11px;padding-bottom:7px}.nm-black{font-size:8px;padding-bottom:4px;width:10.4%}.nm-staff{height:80px}.nm-staff img{max-height:75px}.nm-note{display:none}.nm-head{gap:8px;padding:7px 9px}.nm-head>span{display:none}.nm-meta{font-size:10px}}

/* V1a: mobile portrait orientation guidance; never blocks tablets/desktops */
.nm-rotate{display:none}
@media (orientation:portrait) and (max-width:850px) and (pointer:coarse){
 body{overflow:hidden}
 .nm-shell{visibility:hidden;pointer-events:none}
 .nm-rotate{position:fixed;z-index:10000;inset:0;display:flex;align-items:center;justify-content:center;overflow-y:auto;padding:calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));background:#f3f1fb;text-align:center}
 .nm-rotate-card{background:#fff;border:1px solid #d9d1ea;border-radius:18px;max-width:380px;width:100%;padding:20px 18px;box-shadow:0 10px 26px #362b6320;display:grid;gap:11px;justify-items:center}
 .nm-rotate-icon{font-size:56px;line-height:1.1;display:block;transform:rotate(90deg)}
 .nm-rotate-card strong{font-size:20px;line-height:1.2;color:#402d6d}
 .nm-rotate-card p{font-size:14px;line-height:1.45;margin:0}
 .nm-rotate-card button{font:inherit;font-weight:700;min-height:43px;padding:9px 18px;border-radius:9px;border:1px solid #65489e;background:#65489e;color:#fff;cursor:pointer}
 .nm-rotate-card small{font-size:12px;line-height:1.35;color:#68677a}
}
/* Landscape phones: prioritize gameplay and keyboard over decoration */
@media (orientation:landscape) and (max-height:520px) and (pointer:coarse){
 .nm-shell{max-width:100%;padding:4px 6px}
 .nm-head{min-height:30px;padding:3px 10px;border-radius:7px}
 .nm-head>strong{font-size:13px}.nm-head>span{display:none}
 .nm-main{margin-top:4px;padding:7px 10px;border-radius:9px}
 .nm-top{display:flex;flex-direction:row;align-items:center;gap:12px}
 .nm-eyebrow,.nm-top h1{display:none}
 .nm-top p{font-size:11px;line-height:1.25}
 .nm-level{display:flex;align-items:center;gap:6px;min-width:180px;flex-shrink:0;font-size:11px}
 .nm-level select{min-height:28px;padding:3px;font-size:11px;max-width:210px}
 .nm-play{margin-top:5px}
 .nm-puzzle-row{grid-template-columns:minmax(0,1fr) 140px;gap:7px}
 .nm-puzzle,.nm-monster-area{padding:5px 8px;border-radius:8px}
 .nm-word{min-height:44px;padding:2px;gap:4px}
 .nm-token{height:29px;min-width:19px}.nm-token[data-length="3"]{min-width:46px}.nm-token[data-length="2"]{min-width:30px}
 .nm-token-letter{font-size:15px}.nm-notice{min-height:16px;margin:1px 0 3px;font-size:11px}
 .nm-btn{min-height:27px;padding:3px 9px;font-size:11px}
 .nm-monster-image-wrap{height:65px;width:83px}
 .nm-mistakes{font-size:10px;margin-top:2px}.nm-lights{margin-top:2px}
 .nm-theory{margin-top:5px;padding:5px 8px 8px}
 .nm-theory-head{font-size:12px}.nm-note,.nm-keyhelp{display:none}
 .nm-staff{height:64px}.nm-staff img{max-height:62px}
 .nm-whites{height:64px}.nm-white{font-size:12px;padding-bottom:4px}
 .nm-black{font-size:9px;padding-bottom:3px}
 .nm-foot{display:none}
}
