.social-page { --story-image-height:165px; width:100%; max-width:1180px; min-width:0; margin:auto; padding:8px 0 20px; }
.social-controls { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; align-items:end; }
.social-controls label { display:flex; flex-direction:column; gap:3px; font-size:13px; min-width:0; }
.social-controls :is(select,.btn) { min-height:44px; }
.social-page .btn,.calm-dialog .btn { touch-action:manipulation; }
.calm-tools { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin:10px 0; }
.calm-tools label { display:flex; align-items:center; gap:7px; font-size:13px; min-height:44px; cursor:pointer; }
.calm-tools input { width:22px; height:22px; accent-color:#55d6be; }
.calm-tools .btn { min-height:44px; }
.social-progress { color:var(--accent); font-size:14px; font-weight:800; min-height:22px; }
.social-prompt { text-align:center; font-size:clamp(22px,3vw,30px); line-height:1.3; margin:8px 0 12px; }
.social-workspace { display:grid; grid-template-columns:minmax(200px,.85fr) minmax(0,1.4fr); align-items:center; gap:18px; }
.social-workspace.is-self { display:block; max-width:900px; margin:auto; }
.social-controls select { max-width:100%; }
.social-target { min-width:0; text-align:center; border:1px solid #6c7b8d; border-radius:20px; padding:10px; background:#fff7e7; color:#253d50; }
.social-target img { display:block; width:100%; max-width:300px; height:270px; object-fit:contain; margin:auto; }
.social-target p { font-size:17px; line-height:1.4; margin-top:7px; }
.social-target .emotion-word { font-size:clamp(32px,5vw,54px); font-weight:800; padding:35px 0; }
.emotion-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; min-width:0; }
.emotion-choices:has(> :nth-child(4)):not(:has(> :nth-child(5))) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.emotion-card { min-width:44px; min-height:60px; padding:7px; border:2px solid #6c7b8d; border-radius:16px; background:#fff7e7; color:#253d50; font:inherit; font-weight:700; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; }
.emotion-card img { width:100%; height:150px; object-fit:contain; display:block; pointer-events:none; }
.emotion-card span { font-size:17px; pointer-events:none; }
.emotion-card[aria-pressed="true"],.emotion-card.is-chosen { border-color:#55d6be; outline:2px solid #55d6be; }
.emotion-card:disabled { opacity:1; cursor:default; }
.emotion-options { min-width:0; }
.emotion-alternatives { display:flex; gap:8px; padding-top:8px; }
.emotion-alternatives .emotion-card { flex:1; min-height:70px; line-height:1.2; }
.emotion-card .emotion-alternative-icon {
 display:grid; place-items:center; width:28px; height:28px; border-radius:50%;
 background:#dceadf; color:#264b48; font-size:20px; line-height:1;
}
.social-actions .emotion-support { background:#e6ecf1; color:#253d50; border-color:#8c9cad; }
#emotionFeedback:empty { min-height:0; margin-top:0; }
.social-feedback { min-height:58px; font-size:17px; line-height:1.45; text-align:center; margin-top:12px; }
.social-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:9px; min-height:46px; margin-top:8px; }
.social-note { color:var(--muted); font-size:13px; line-height:1.5; margin:12px 0; text-align:center; }
.social-adult { border:1px solid #4d6278; border-radius:12px; padding:10px 12px; margin-top:12px; font-size:14px; line-height:1.6; }
.social-adult summary { cursor:pointer; min-height:28px; font-weight:700; }.social-adult p { margin-top:9px; }.social-adult a { color:#a6d9fa; }
.calm-dialog { width:min(92vw,760px); max-height:90svh; overflow:auto; margin:auto; padding:24px; border:1px solid #698395; border-radius:20px; background:#142337; color:#f5f7fb; }
.calm-dialog::backdrop { background:#081321b8; }.calm-dialog h2 { margin-bottom:12px; font-size:26px; }.calm-dialog p { font-size:18px; line-height:1.5; margin-bottom:15px; }.calm-dialog .btn { min-height:48px; }
.calm-dialog a { color:#a6d9fa; display:inline-block; padding:12px; }
.story-slots,.story-bank,.story-example { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.story-slots { margin-top:10px; }.story-bank { margin-top:10px; }
.story-slot,.story-card { min-width:44px; min-height:160px; padding:8px; border:2px solid #61798d; border-radius:16px; font:inherit; background:#fff7e7; color:#253d50; cursor:pointer; position:relative; }
.story-slot { height:calc(var(--story-image-height) + 78px); border-style:dashed; display:flex; flex-direction:column; align-items:center; justify-content:center; touch-action:none; }
.story-slot img,.story-card img,.story-example img { width:100%; height:var(--story-image-height); object-fit:contain; pointer-events:none; display:block; }
.story-slot .step-number { position:absolute; left:7px; top:4px; font-size:22px; font-weight:900; color:#28465c; background:#fff7e7ed; border-radius:6px; padding:1px 5px; }
.story-slot .story-placeholder { font-size:42px; color:#6b7c86; }
.story-slot p,.story-card p,.story-example p { font-size:15px; line-height:1.35; margin-top:6px; min-height:40px; }
.story-slot.is-locked { border-style:solid; cursor:default; }
.story-card { touch-action:none; display:flex; flex-direction:column; justify-content:start; align-items:center; }
.story-card[aria-pressed="true"],.story-slot[aria-pressed="true"] { border-color:#55d6be; box-shadow:0 0 0 2px #55d6be; }
.story-card:disabled { opacity:.23; cursor:default; }.story-card > * { pointer-events:none; }
.story-bank-title { font-size:16px; margin-top:12px; }
.story-ghost { position:fixed; width:110px; height:110px; object-fit:contain; transform:translate(-50%,-50%); pointer-events:none; z-index:1000; border:3px solid #55d6be; border-radius:12px; background:#fff7e7; }
.story-example figure { min-width:0; }.story-example figcaption { margin:5px 0; font-size:16px; }.story-example p { color:#f5f7fb; }
.story-card.is-chosen { opacity:1; border-color:#55d6be; box-shadow:0 0 0 2px #55d6be; }
.story-slots.is-reference { display:flex; align-items:center; justify-content:center; min-height:calc(var(--story-image-height) + 78px); }
.story-reference { width:65%; max-width:360px; background:#fff7e7; padding:10px; border-radius:16px; color:#253d50; text-align:center; }
.story-reference img { width:100%; height:var(--story-image-height); object-fit:contain; display:block; }
.story-reference figcaption { font-size:15px; line-height:1.4; margin-top:6px; }
.story-direction { font-size:clamp(17px,2.3vw,27px); font-weight:800; text-align:center; padding:10px; }
@media(min-width:1000px) {
 .story-workspace { display:grid; grid-template-columns:minmax(0,3fr) minmax(220px,1fr); gap:18px; align-items:center; }
 .story-inventory { min-width:0; }.story-inventory .story-bank-title { margin:0 0 6px; }
 .story-bank { grid-template-columns:1fr; gap:8px; margin:0; }
 .story-bank .story-card { flex-direction:row; text-align:left; min-height:100px; height:100px; gap:8px; }
 .story-bank .story-card img { width:80px; height:80px; }
 .story-bank .story-card p { flex:1; min-height:0; margin:0; }
 body.game-screen .social-page { max-width:min(100%,var(--play-width,1350px)); }
 body.game-screen .social-target img { height:min(calc(280px * var(--play-scale,1)),calc(100svh - 430px)); max-width:calc(320px * var(--play-scale,1)); }
 body.game-screen .emotion-card img { height:calc(140px * var(--play-scale,1)); }
 body.game-screen .emotion-card span,.social-feedback { font-size:calc(16px * var(--play-scale,1)); }
 body.game-screen .social-page { --story-image-height:min(calc(180px * var(--play-scale,1)),max(100px,calc((100svh - 440px) / 2))); }
}
@media(max-width:759px) {
 .social-page { --story-image-height:90px; }
 .social-controls { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 44px; gap:7px; }
 .social-controls.story-controls { grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.9fr) 44px; gap:6px; }
 .story-reference figcaption { font-size:12px; }.story-direction { padding:4px; }
 .story-bank.is-quiz { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .story-bank.is-quiz:has(> :nth-child(3)) { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .story-bank.is-quiz .story-card img { height:110px; }
 .story-bank.is-quiz .story-card p { min-height:30px; }
 .social-controls label,.social-controls select { width:100%; }.social-controls .social-reset { width:44px; padding:3px; font-size:0!important; }.social-reset::before { content:'↻'; font-size:22px; }
 .social-workspace { grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr); gap:9px; align-items:start; }
 .social-target { padding:6px; }.social-target img { height:150px; }.social-target p { font-size:13px; }.social-target .emotion-word { font-size:26px; padding:25px 0; }
 .emotion-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }.emotion-card { padding:4px; border-radius:12px; }.emotion-card img { height:84px; }.emotion-card span { font-size:13px; }
 .social-workspace.is-self { display:block; }.is-self .emotion-choices { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .social-workspace.is-talk { grid-template-columns:1fr; }
 .is-talk .social-target { display:flex; gap:12px; align-items:center; text-align:left; }
 .is-talk .social-target img { width:86px; height:70px; margin:0; }
 .is-talk .emotion-choices { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .social-feedback { font-size:14px; min-height:62px; }.social-prompt { font-size:21px; }
 .calm-tools { gap:6px; }.calm-tools label { font-size:12px; }
 .story-slots,.story-bank,.story-example { gap:6px; }.story-slot,.story-card { padding:4px; min-height:124px; border-radius:12px; }
 .story-slot { height:158px; }.story-slot p,.story-card p,.story-example p { font-size:11px; min-height:45px; }
 .story-slot .step-number { font-size:17px; left:3px; top:2px; }.story-slot .story-placeholder { font-size:30px; }
 .story-slots { margin-top:8px; }.story-bank { margin-top:7px; }.social-actions { gap:6px; }
}
