/* Original tactile face-building table, using the shared immersive viewport. */
.emotion-game{font-family:FalaPiano,system-ui,sans-serif}
.em-toolbar{position:absolute;left:max(10px,var(--safe-left));right:max(10px,var(--safe-right));top:max(10px,var(--safe-top));height:54px;display:flex;justify-content:space-between;z-index:25;pointer-events:none}
.em-toolbar button{pointer-events:auto;width:54px;height:54px;min-width:54px;min-height:54px;padding:11px;border:1px solid #c7dcf6;border-radius:18px;background:linear-gradient(145deg,#fff,#edf5ff);color:#3566a8;box-shadow:0 4px 0 #cbdcf1,0 7px 18px #3566a81c}.em-toolbar svg{width:32px;height:32px}
.em-modes{position:absolute;left:80px;right:80px;top:10px;height:50px;display:flex;justify-content:center;gap:8px;z-index:10}.em-modes button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;flex:1;max-width:220px;padding:4px 12px;background:#eaf2fc;border:1px solid #c6d9ef;border-bottom:4px solid #c2d4eb;border-radius:15px;font-size:clamp(12px,calc(var(--pvw)*1.7),22px);font-weight:800;line-height:1.1;color:#3566a8}.em-modes button>span:first-child{font:800 26px system-ui}.em-modes button[aria-pressed=true]{background:linear-gradient(145deg,#5288c6,#3566a8);color:#fff;border-color:#3566a8;border-bottom-color:#244f88}
.em-workspace{position:absolute;inset:78px 14px 52px;display:grid;grid-template-columns:minmax(110px,.21fr) minmax(0,.40fr) minmax(0,.39fr);gap:12px}
.em-side{min-width:0;min-height:0;display:flex;flex-direction:column;gap:9px;align-items:stretch;overflow:hidden;color:#345e8c;text-align:center}
.em-example,.em-free-card{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;border-radius:22px;background:linear-gradient(145deg,#fff,#e9f2ff);border:1px solid #cbddf1;padding:10px}.em-example>span{font:650 clamp(11px,calc(var(--pvw)*1.5),18px) system-ui}.em-example-face,.em-free-icon{flex:1;min-height:0;display:block;width:100%;max-height:260px}.em-example-face svg,.em-free-icon svg{display:block;width:100%;height:100%}.em-example strong,.em-free-card strong{font-size:clamp(16px,calc(var(--pvw)*2.5),30px)}.em-free-card p{font:500 clamp(12px,calc(var(--pvw)*1.5),18px)/1.3 system-ui;color:#56708c}.em-free-icon{max-height:170px}
.em-characters{display:flex;gap:4px;flex:none}.em-characters button{flex:1;min-width:0;min-height:44px;padding:5px 3px;border-radius:12px;border:1px solid #c7dbee;background:#f7fbff;color:#3566a8;font:700 clamp(11px,calc(var(--pvw)*1.5),17px) system-ui}.em-characters button[aria-pressed=true]{background:#d3e6fb;border-color:#75a4d8}
.em-progress{display:flex;justify-content:center;gap:7px;flex:none}.em-progress i{height:10px;width:28px;border-radius:20px;background:#d9e4f2}.em-progress i.is-filled{background:#559ac7}
.em-next{min-height:48px;flex:none;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:14px;background:#3566a8;border-bottom:4px solid #244f88;color:white;font:700 clamp(11px,calc(var(--pvw)*1.4),16px) system-ui}.em-next svg{height:30px;width:30px;flex:none}
.em-stage{min-width:0;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #cfdef0;border-radius:28px;background:radial-gradient(ellipse at 50% 35%,#fff,#e9f3ff);box-shadow:inset 0 1px 3px #fff,0 6px 14px #365d8720;padding:6px}
.em-face-board{width:100%;flex:1;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;background:none;border:0;padding:0;border-radius:22px;touch-action:none;position:relative;color:#3566a8}.em-face-board>.emotion-face{display:block;width:100%;height:100%;max-height:100%;filter:drop-shadow(0 8px 7px #45658418)}.em-face-board.is-hovered{background:#c9e4ff80;box-shadow:inset 0 0 0 3px #78a9dc}.em-face-caption{flex:none;max-width:100%;font-size:clamp(12px,calc(var(--pvw)*1.6),20px);font-weight:800;line-height:1.15;text-align:center;padding:5px 3px 7px;color:#426a96}
.em-tray{min-width:0;min-height:0;display:flex;flex-direction:column;gap:9px;padding:9px;border-radius:23px;border:1px solid #c5d9f0;border-bottom:5px solid #b9d0e9;background:linear-gradient(145deg,#e9f2ff,#dceafa);box-shadow:inset 0 2px 2px #fff}
.em-part-tabs{display:flex;gap:5px;flex:none}.em-part-tabs button{flex:1;min-width:0;min-height:44px;padding:4px 2px;border-radius:13px;background:#f9fcff;border:1px solid #bad0e9;color:#3566a8;font:800 clamp(11px,calc(var(--pvw)*1.5),18px) system-ui}.em-part-tabs button[aria-pressed=true]{background:#3566a8;border-color:#2b588e;color:#fff}
.em-pieces{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:8px;flex:1;min-height:0}.em-piece{min-width:0;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:linear-gradient(145deg,#fff,#f6faff);border:1px solid #bdcee2;border-bottom:4px solid #b4c9e2;border-radius:18px;padding:6px;box-shadow:0 3px 5px #345a8010}.em-piece-art{flex:1;min-height:0;width:100%;display:block}.em-piece-art svg{height:100%;width:100%;display:block}.em-piece strong{font-size:clamp(11px,calc(var(--pvw)*1.6),20px);font-weight:900;line-height:1.1;color:#345f90}.em-piece.is-selected{background:#d2e8ff;border:2px solid #5494d3;border-bottom:4px solid #3976b5;box-shadow:0 0 0 2px #b2d3f3}.em-piece.is-dragging{opacity:.35}.em-single{display:flex;align-items:center;justify-content:center}.em-single .em-piece{width:80%;height:65%;max-height:260px}.em-single svg{max-height:170px}
.em-message{position:absolute;left:18px;right:62px;bottom:9px;max-height:25px;overflow:hidden;font:650 clamp(11px,calc(var(--pvw)*1.4),18px)/1.25 system-ui;text-align:center;color:#42658b;pointer-events:none}
.em-info{position:absolute;bottom:5px;right:12px;height:44px;min-height:44px;width:44px;border-radius:10px;color:#3566a8;background:#e3eefb;font:900 22px system-ui}
.em-situation{min-height:0;flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;border-radius:21px;background:#fff;border:1px solid #c5d9f0;padding:10px;overflow:hidden}.em-draw{min-height:44px;flex:none;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;border-radius:12px;background:#e6f1ff;color:#3566a8;font:750 clamp(11px,calc(var(--pvw)*1.5),18px)/1.15 system-ui;padding:3px}.em-draw svg{width:42px;height:42px;flex:none}.em-scene-icon{display:block;font-size:clamp(27px,calc(var(--pvh)*8),60px);line-height:1.1}.em-situation p{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;font:700 clamp(12px,calc(var(--pvw)*1.8),24px)/1.3 system-ui;color:#3b5c7d}.em-situation.is-new .em-wheel{transform-origin:50px 50px;animation:em-spin .8s ease-out}.emotion-game[data-em-motion=false] .em-wheel{animation:none!important}@keyframes em-spin{from{transform:rotate(-360deg)}to{transform:rotate(0)}}
.em-drag-ghost{position:fixed;z-index:999;pointer-events:none;width:140px;height:90px;transform:translate(-50%,-50%);filter:drop-shadow(0 4px 5px #284c7755)}.em-drag-ghost svg{width:100%;height:100%}.game-turned .em-drag-ghost{transform:translate(-50%,-50%) rotate(90deg)}
.em-help{position:absolute;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#eaf3fff5;padding:15px}.em-help-card{width:min(640px,92%);max-height:100%;overflow:auto;padding:22px;border:1px solid #bdd4ee;border-radius:24px;background:white;box-shadow:0 8px 28px #315a8720;font-family:system-ui;color:#34577d}.em-help-card h3{font-size:22px;margin-bottom:15px}.em-help-card p{font-size:17px;line-height:1.45;margin-bottom:12px}.em-help-card button{min-height:48px;min-width:130px;border-radius:14px;background:#3566a8;color:#fff;font-weight:800}
@media(max-height:350px),(max-width:350px){.em-workspace{top:70px;bottom:50px;gap:7px;left:9px;right:9px;grid-template-columns:minmax(100px,.23fr) minmax(0,.35fr) minmax(0,.42fr)}.em-modes{left:74px;right:74px;gap:4px}.em-modes button{padding:3px;gap:3px;font-size:11px}.em-modes button>span:first-child{font-size:19px}.em-tray{padding:5px;gap:5px;border-radius:16px}.em-pieces{gap:5px}.em-piece{padding:3px;border-radius:12px;gap:2px}.em-piece strong{font-size:11px}.em-side{gap:5px}.em-example,.em-free-card{padding:5px}.em-free-icon{max-height:85px}.em-free-card p{font-size:11px}.em-situation{padding:5px;gap:3px}.em-scene-icon{font-size:25px}.em-situation p{font-size:12px}.em-draw{padding:2px;gap:2px}.em-draw svg{width:28px;height:28px}.em-face-caption{font-size:11px}.em-message{font-size:11px}.em-help-card{padding:13px}.em-help-card h3{font-size:18px;margin-bottom:8px}.em-help-card p{font-size:14px;margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){.emotion-game *{animation:none!important}}
