:root{color-scheme:dark;--bg:#0c121d;--panel:#141e2c;--line:#2a3648;--text:#ecf0f5;--muted:#a4b3c6;--gold:#f4be76;--cyan:#8cdbdc;--danger:#ffad9f;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px}
:root:lang(zh){font-family:"Noto Sans CJK SC","Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC",Inter,system-ui,sans-serif;--cjk-mono:ui-monospace,SFMono-Regular,Consolas,"Microsoft YaHei UI","Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans SC",monospace}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 15% 0, #25314266,transparent 45%),var(--bg);color:var(--text);line-height:1.5}a{color:var(--gold);text-decoration:none}a:hover{text-decoration:underline}button,input,textarea{font:inherit}button,.button{border:1px solid var(--gold);background:var(--gold);color:#242017;padding:10px 15px;border-radius:9px;font-weight:650;cursor:pointer;display:inline-block;transition:background .15s,transform .15s}button:hover:not(:disabled){background:#ffd59b;transform:translateY(-1px)}button:disabled{opacity:.42;cursor:not-allowed}button.secondary{background:#1c293b;border-color:#39485e;color:var(--text)}button.secondary:hover:not(:disabled){background:#2a3a50}button.selected{background:#204342;color:var(--cyan);border-color:var(--cyan)}input,textarea{display:block;width:100%;background:#0d1623;border:1px solid #3a4b62;border-radius:9px;color:var(--text);padding:12px;outline:none}input:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px #f4be761a}textarea{resize:vertical;min-height:95px}input:disabled,textarea:disabled{opacity:.55}label{display:block;font-size:.9rem;color:#d8e0eb;font-weight:600;margin-bottom:8px}form label+button,form label+label{margin-top:14px}h1,h2,p{margin-top:0}h1{font-size:clamp(1.65rem,3.5vw,2.7rem);line-height:1.15;letter-spacing:-.035em;margin-bottom:8px}h2{font-size:1.1rem;letter-spacing:-.01em;margin-bottom:12px}p{margin-bottom:12px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:1440px;margin:auto;padding:28px 32px;border-bottom:1px solid var(--line)}.brand{color:var(--text);letter-spacing:.2em;font-size:1.42rem;font-weight:800}.brand span{display:block;color:var(--muted);font-size:.55rem;letter-spacing:.22em;margin-top:3px}.header-right{display:flex;gap:20px;align-items:center;font-size:.85rem}main{max-width:1440px;padding:32px;margin:auto}.eyebrow{font-size:.69rem;font-weight:700;letter-spacing:.2em;color:var(--gold);margin-bottom:10px}.muted{font-size:.84rem;color:var(--muted)}.badge,.pill{font-size:.65rem;letter-spacing:.08em;border:1px solid #3b4a60;padding:5px 9px;border-radius:20px;color:var(--muted);white-space:nowrap}.pill{font-size:.76rem;color:var(--gold);border-color:#886946;background:#f4be760b}.arena-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.status{border-left:3px solid #71849e;background:#172234;border-radius:0 8px 8px 0;padding:14px 18px;font-size:.9rem;color:#c8d5e6;margin-bottom:22px}.status.your-turn{border-left-color:var(--gold);background:#f4be7610;color:var(--gold)}.panel{background:linear-gradient(140deg,#192434,#131d2b);border:1px solid var(--line);border-radius:16px;padding:24px}.battle-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(320px,1fr);gap:22px;align-items:start}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.section-title h2{margin-bottom:0}.portraits{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 24px}.portrait{position:relative;border:1px solid #344158;border-radius:12px;overflow:hidden;min-width:0;background:#0d1623}.portrait img{display:block;width:100%;height:240px;object-fit:contain}.portrait-placeholder{height:200px;display:grid;place-items:center;font-size:5rem;color:#49607c;background:radial-gradient(circle,#263750,transparent)}.portrait-caption{background:#101927e8;padding:12px 14px;display:flex;flex-direction:column;gap:3px}.portrait-caption strong{font-size:.86rem}.portrait-caption span{color:var(--muted);font-size:.76rem}.form-actions{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:12px}.form-actions .muted{font-size:.75rem;max-width:50%}.confirm-row{display:flex;align-items:center;gap:18px;justify-content:space-between;margin:20px 0}.confirm-row p{margin:0;max-width:55%}.confirm-row button{font-size:.8rem;flex-shrink:0}details{border-top:1px solid var(--line);padding-top:15px;margin-top:20px}summary{color:#d5e2f1;font-size:.86rem;font-weight:650;cursor:pointer;margin-bottom:12px}.library{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:12px}.creature-tile{min-width:0;text-align:left;white-space:normal;padding:8px;font-size:.72rem}.creature-tile img{width:100%;aspect-ratio:1;object-fit:contain;background:#0b1421;border-radius:7px}.creature-tile span,.creature-tile p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:6px 0}.creature-tile small{color:var(--muted);font-size:.64rem}.creature-tile button{width:100%;font-size:.7rem;padding:7px}.defenses{margin-top:25px;padding-top:24px;border-top:1px solid var(--line)}.defense-buttons{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0 10px}.defense-buttons button{font-size:.75rem;padding:9px 11px}.sidebar{display:grid;gap:22px}.timeline{height:570px;overflow-y:auto;scrollbar-width:thin;padding-right:8px}.event{padding:13px 0 15px;border-bottom:1px solid #30405775;overflow-wrap:anywhere}.event-name{font-size:.67rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--gold)}.event p{font-size:.86rem;margin:5px 0}.event img{max-height:120px;max-width:100%;border-radius:8px;margin-top:7px}.event video{display:block;width:100%;margin-top:7px;border-radius:8px}.event-error{color:var(--danger)}.event-dice{background:#f4be760a;padding:14px;border:1px solid #f4be7625;border-radius:9px}.defense-reveal{display:block;color:var(--cyan);font-size:.72rem;margin-top:7px}.messages{max-height:175px;min-height:30px;overflow:auto;overflow-wrap:anywhere}.messages p{font-size:.8rem}.messages strong{color:var(--cyan)}.chat form{display:flex;gap:9px}.chat input{min-width:0;font-size:.8rem}.chat button{font-size:.74rem;padding:9px}.video-wrap{margin-bottom:24px}.video-wrap video{width:100%;background:#080d15;border-radius:10px;max-height:450px}.video-wrap p{margin-top:10px}.memory{display:grid;gap:8px}.memory button{text-align:left;font-size:.78rem;overflow-wrap:anywhere}.welcome{max-width:780px;margin:70px auto}.welcome h1{font-size:clamp(2.5rem,6vw,4rem);line-height:1.08;margin-bottom:25px}.welcome>.muted{font-size:1rem;max-width:610px}.notice{border:1px solid #4c5d74;background:#1a293b;padding:16px;border-radius:10px;font-size:.87rem}.room-links{display:grid;gap:10px;margin:25px 0}.room-link{padding:15px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.login{max-width:500px;margin:60px auto}.login h1{margin-bottom:25px}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-bottom:22px}.admin-grid form{display:grid;gap:10px}.settings{margin-bottom:22px}.settings textarea{font-family:ui-monospace,Consolas,monospace;font-size:.8rem;line-height:1.65;margin-bottom:15px}.defaults{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.defaults span{background:#213349;border-radius:7px;padding:6px 10px;font-size:.74rem;color:#d5e4f6}.settings form+ p{margin:14px 0 0}.invite{display:grid;grid-template-columns:1fr auto;gap:9px;margin-top:20px}.invite strong{grid-column:1/-1;font-size:.85rem}.invite input{font-size:.72rem;min-width:0}.invite button{font-size:.75rem}.admin-room{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}.admin-room strong,.admin-room small{width:100%}.admin-room button{font-size:.75rem}.admin-room .invite{width:100%}.job-list{max-height:550px;overflow:auto}.job{padding:15px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.job strong,.job code{display:block}.job strong{font-size:.85rem}.job code{font-size:.67rem;color:var(--muted);margin:5px 0}.job p{font-size:.77rem}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);width:max-content;background:#344a63;color:#fff;padding:15px 22px;border:1px solid #7395b7;border-radius:11px;box-shadow:0 12px 40px #0008;z-index:10;font-size:.88rem}footer{text-align:center;color:#697c95;padding:30px;font-size:.72rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(max-width:950px){.battle-grid{grid-template-columns:minmax(0,1.3fr) minmax(270px,1fr)}.panel{padding:18px}.portrait img{height:190px}.confirm-row{align-items:flex-start;flex-direction:column}.confirm-row p{max-width:100%}.form-actions{align-items:flex-start;flex-direction:column}.form-actions .muted{max-width:100%}.header-right{gap:10px}.badge{font-size:.58rem}.timeline{height:600px}}
.dice-tray{margin-bottom:22px;padding:16px;border:1px solid #f4be7633;border-radius:12px;background:linear-gradient(120deg,#f4be760b,#8cdbdc06);text-align:center}.dice-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.dice-player{display:flex;align-items:center;justify-content:center;gap:13px;min-width:0;padding:10px;border:1px solid transparent;border-radius:9px}.dice-player strong{font-size:.83rem;overflow-wrap:anywhere}.dice-player.winner{border-color:#f4be7655;background:#f4be7609;color:var(--gold)}.die{position:relative;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:5px;padding:9px;width:58px;height:58px;flex-shrink:0;border-radius:11px;border:1px solid #ffdaa0;background:linear-gradient(145deg,#ffdcaa,#e1a761);color:#3b2b1a;box-shadow:0 4px 0 #84613b,0 7px 14px #0005;transform-origin:center}.dice-player:nth-child(2) .die{background:linear-gradient(145deg,#c7f3ed,#78c2c4);border-color:#b4ede8;color:#153b3b;box-shadow:0 4px 0 #46787e,0 7px 14px #0005}.pip{border-radius:50%;background:currentColor;opacity:0}.pip.visible{opacity:1}.die[data-value="0"]:after{content:'?';position:absolute;inset:0;display:grid;place-items:center;font-size:1.8rem;font-weight:800}.dice-result{font-size:.85rem;margin:14px 0 0;min-height:1.5em}.dice-trail{margin:7px 0 0}.is-rolling .die{animation:dice-tumble .46s ease-in-out infinite}.is-rolling .dice-player:nth-child(2) .die{animation-direction:reverse;animation-delay:-.16s}@keyframes dice-tumble{0%,100%{transform:translateY(0) rotate(-12deg)}50%{transform:translateY(-8px) rotate(18deg)}}@media(prefers-reduced-motion:reduce){.is-rolling .die{animation:none}}@media(max-width:950px){.dice-player{flex-direction:column;gap:11px}}@media(max-width:720px){.dice-tray{padding:12px}.dice-player{padding:9px 5px}.dice-player strong{font-size:.75rem}}
.model-catalog{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.72rem;max-height:400px;overflow:auto}.admin-room details{width:100%}.admin-room details form{display:grid;gap:12px}
.chat-dock{position:fixed;right:24px;bottom:20px;z-index:8;width:min(360px,calc(100vw - 32px));border:1px solid #476077;border-radius:13px;background:#162334;box-shadow:0 12px 45px #0008;overflow:hidden}.chat-dock.collapsed{width:min(240px,calc(100vw - 32px))}#chat-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:13px 16px;border:0;border-radius:0;background:#1b3044;color:var(--text);text-align:left;transform:none}#chat-toggle:hover{background:#253f57;transform:none}.chat-title{flex:1;font-size:.85rem}.chat-unread{display:grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:20px;background:var(--gold);color:#242017;font-size:.73rem;font-weight:800}#chat-chevron{color:var(--cyan);font-size:1.05rem}#chat-panel{padding:15px}.chat-dock .messages{max-height:min(220px,35vh);min-height:45px}.chat-dock .messages:empty:before{content:'Un mot avant la prochaine attaque ?';color:var(--muted);font-size:.8rem}.chat-dock form{padding-top:10px;border-top:1px solid var(--line)}body:has(.chat-dock) footer{padding-bottom:95px}@media(max-width:720px){.chat-dock{right:16px;bottom:12px}.chat-dock.collapsed{width:210px}#chat-panel{padding:12px}#chat-toggle{padding:12px 14px}.chat-dock .messages{max-height:30vh}}
@media(max-width:720px){main{padding:24px 16px}.masthead{padding:20px 16px;gap:10px}.brand{font-size:1.12rem}.header-right{align-items:flex-end;flex-direction:column;gap:5px;font-size:.7rem}.battle-grid,.admin-grid{grid-template-columns:1fr}.arena-heading{gap:10px}.arena-heading h1{font-size:1.7rem}.status{font-size:.8rem;padding:12px}.portrait img{height:185px}.portrait-placeholder{height:165px}.portrait-caption{padding:10px}.portrait-caption strong{font-size:.76rem}.portrait-caption span{font-size:.7rem}.portraits{gap:10px}.panel{padding:18px}.timeline{height:400px}.form-actions{align-items:stretch}.form-actions button{width:100%}.defense-buttons button{flex:1 1 44%;font-size:.72rem}.section-title .badge{display:none}.welcome{margin:40px auto}.welcome h1{font-size:2.6rem}.settings textarea{font-size:.68rem}.invite{grid-template-columns:minmax(0,1fr) auto}.chat button{font-size:.68rem}.defaults span{font-size:.66rem}.login{margin:25px 0}}

/* Player device theme. The shared admin stylesheet above remains unchanged. */
.chimera-page {
  color-scheme: light;
  --text: #263c35;
  --muted: #586858;
  --line: #c3c9b5;
  --gold: #873b30;
  --cyan: #266b60;
  --danger: #a32b38;
  background: radial-gradient(circle at 1px 1px, #84908026 1px, transparent 0) 0 0 / 20px 20px, #e5e7dc;
  padding: 28px;
}
.chimera-page .chimera-shell {
  max-width: 1456px;
  margin: auto;
  border: 2px solid #77373b;
  border-radius: 32px 32px 38px 38px;
  background: linear-gradient(110deg, #db5159, #c83e4e 70%, #b83245);
  box-shadow: inset 0 3px 0 #ff9c9f80, inset -7px 0 0 #8c283738, 0 8px 0 #912d3d, 0 22px 45px #26372e28;
  overflow: clip;
}
.chimera-page .masthead { position: relative; min-height: 126px; padding: 25px 32px; border-bottom: 2px solid #9c3040; box-shadow: 0 2px 0 #f9858960; gap: 23px; }
.chimera-page .device-optics { display: flex; align-items: flex-start; gap: 18px; flex-shrink: 0; }
.chimera-page .device-lens { display: block; width: 72px; height: 72px; border: 6px solid #f5ebd8; border-radius: 50%; background: radial-gradient(circle at 33% 28%, #f3ffff 0 9%, #a1eef1 10% 17%, #45c1d3 30%, #1487a9 63%, #125273 95%); box-shadow: 0 0 0 2px #763f45, 0 5px 0 #963341, inset 0 0 0 3px #0f6b8960; }
.chimera-page .device-lights { display: flex; gap: 7px; padding-top: 3px; }
.chimera-page .device-lights i { width: 14px; height: 14px; border: 2px solid #933a40; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff4dd, #f59f65 40%, #c9623d); box-shadow: 0 1px 0 #ffaaa078; }
.chimera-page .device-lights i:nth-child(2) { background: radial-gradient(circle at 30% 25%, #fff7b8, #f1cd60 40%, #c08d30); }
.chimera-page .device-lights i:nth-child(3) { background: radial-gradient(circle at 30% 25%, #caffe3, #85c296 40%, #347f60); }
.chimera-page .brand { margin-right: auto; color: #fff5e3; font-size: 1.75rem; letter-spacing: .2em; text-shadow: 0 2px 0 #983641; line-height: 1.2; }
.chimera-page .brand span { color: #0d090b; font-size: .56rem; letter-spacing: .17em; margin-top: 8px; text-shadow: none; }
.chimera-page .header-right { flex-direction: column; align-items: flex-end; gap: 12px; }
.chimera-page .header-right a { color: #fff4e2; font-size: .74rem; }
.chimera-page .header-right .badge { color: #ffe9db; border-color: #f6a29e; font-size: .59rem; background: #8b283178; }
.chimera-page main { padding: 25px 30px 12px; }
.chimera-page .arena-heading { margin-bottom: 18px; color: #fff6e7; }
.chimera-page .arena-heading .eyebrow { color: #0d090b; font-size: .6rem; letter-spacing: .22em; margin-bottom: 8px; }
.chimera-page .arena-heading h1 { font-size: clamp(1.65rem, 2.5vw, 2.35rem); letter-spacing: -.035em; margin: 0; }
.chimera-page .pill { border: 2px solid #713d3d; border-radius: 7px; background: #ffe5a0; color: #573f26; padding: 8px 14px; font-weight: 800; box-shadow: 0 3px 0 #a63241; }
.chimera-page .status { position: relative; border: 2px solid #385345; border-left-width: 8px; border-radius: 9px; background: #deebc8; color: #344b37; box-shadow: inset 0 2px 5px #5c744520, 0 2px 0 #a02c3b; margin-bottom: 24px; padding: 12px 17px; font-size: .85rem; }
.chimera-page .status.your-turn { background: #f7e5a3; border-color: #6d522d; color: #564020; }
.chimera-page .battle-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
.chimera-page .battle-main { min-width: 0; display: grid; gap: 24px; }
.chimera-page .panel { background: #f4f0de; border: 2px solid #703e3f; border-radius: 14px; box-shadow: 0 4px 0 #962d3e, inset 0 2px 0 #fff8eb; padding: 22px; }
.chimera-page .section-title { margin-bottom: 18px; }
.chimera-page .section-title h2 { font-size: .91rem; }
.chimera-page .screen-label { color: #465741; font-size: .57rem; letter-spacing: .13em; font-weight: 750; white-space: nowrap; }
.chimera-page .stage { background: #dadcc9; border-width: 3px; border-color: #623b3e; border-radius: 14px 14px 14px 35px; padding: 19px 21px 12px; box-shadow: 0 5px 0 #922a3b, inset 0 3px 0 #ffffed; }
.chimera-page .stage > .section-title h2 { text-transform: uppercase; font-size: .69rem; letter-spacing: .12em; color: #4c5c4b; }
.chimera-page .portraits { gap: 14px; margin-bottom: 14px; }
.chimera-page .portrait { background: #edf0dd; border: 2px solid #6d7a61; border-radius: 9px; }
.chimera-page .portrait img { height: 236px; background: radial-gradient(ellipse at center, #e5ecd5, #d5ddc2); }
.chimera-page .portrait:nth-child(2) img { background: radial-gradient(ellipse at center, #d8e8df, #bfcec7); }
.chimera-page .portrait-placeholder { height: 230px; color: #80956b; background: repeating-linear-gradient(0deg, transparent 0 3px, #65804b05 3px 4px), #e1e8d2; }
.chimera-page .portrait-caption { padding: 10px 12px; background: #eff1df; border-top: 1px solid #bec7ac; }
.chimera-page .portrait-caption strong { font-size: .83rem; }
.chimera-page .portrait-caption span { color: #52664e; font-size: .68rem; }
.chimera-page .stage:has(#video-wrap:not([hidden])) .portrait { display: grid; grid-template-columns: 74px minmax(0,1fr); align-items: center; }
.chimera-page .stage:has(#video-wrap:not([hidden])) .portrait img { width: 74px; height: 82px; }
.chimera-page .stage:has(#video-wrap:not([hidden])) .portrait-caption { border: 0; padding: 8px 10px; background: none; }
.chimera-page .video-wrap { margin: 15px 0 0; }
.chimera-page .video-wrap video { display: block; max-height: 500px; aspect-ratio: 16 / 9; object-fit: contain; border: 3px solid #364438; border-radius: 8px; background: #1c2c25; }
.chimera-page .video-wrap p { font-size: .71rem; margin: 10px 2px 0; }
.chimera-page .screen-trim { display: flex; align-items: center; justify-content: space-between; padding: 16px 7px 1px; }
.chimera-page .screen-trim span { width: 11px; height: 11px; border-radius: 100%; background: #b64550; box-shadow: inset 0 1px 2px #68303c; }
.chimera-page .screen-trim i { width: 60px; height: 11px; background: repeating-linear-gradient(0deg, #64715d 0 2px, transparent 2px 4px); }
.chimera-page .battle-health { margin: 12px 0 0; }
.chimera-page .health-bars { gap: 14px; }
.chimera-page .health-card { --hp-color: #327153; background: #ebefd8; border-color: #a9b99a; border-radius: 7px; padding: 10px 12px; }
.chimera-page .health-title { font-size: .73rem; margin-bottom: 6px; }
.chimera-page .health-title > span { color: #3d5842; font-weight: 800; }
.chimera-page .health-value { color: #345c42; font-size: .71rem; margin-top: 4px; text-align: right; font-weight: 800; }
.chimera-page .health-card progress { height: 8px; background: #cad3b9; }
.chimera-page .health-card progress::-webkit-progress-bar { background: #cad3b9; }
.chimera-page .health-wounded { --hp-color: #a26b24; border-color: #bba36c; }
.chimera-page .health-critical { --hp-color: #b93642; border-color: #b77072; }
.chimera-page .health-critical .health-value, .chimera-page .health-critical .health-title > span { color: #a42d37; }
.chimera-page .health-outcome { color: #4b5e49; font-size: .69rem; margin: 8px 1px 0; }
.chimera-page .command-console { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; padding: 22px; }
.chimera-page .command-console:has(#preparation:not([hidden])) { grid-template-columns: 1fr; }
.chimera-page .command-console > section, .chimera-page #preparation { min-width: 0; }
.chimera-page .eyebrow { color: #87434a; font-size: .62rem; letter-spacing: .15em; display: flex; align-items: center; gap: 8px; }
.chimera-page .command-number { display: inline-grid; place-items: center; border: 1px solid #41524c; border-radius: 50%; background: #324942; color: #fcf6df; width: 24px; height: 24px; font-size: .68rem; letter-spacing: 0; box-shadow: 0 2px 0 #1f332c; }
.chimera-page #preparation > h2 { font-size: 1.35rem; margin: 12px 0 20px; }
.chimera-page label { color: #3a4e40; font-size: .8rem; }
.chimera-page input, .chimera-page textarea { background: #fcfbf0; border: 1px solid #98a58e; border-radius: 7px; color: #243c32; padding: 12px; box-shadow: inset 0 2px 3px #42513108; }
.chimera-page input::placeholder, .chimera-page textarea::placeholder { color: #73806b; opacity: 1; }
.chimera-page textarea { min-height: 104px; font-size: .84rem; }
.chimera-page input:focus, .chimera-page textarea:focus { border-color: #30766a; box-shadow: 0 0 0 3px #32736922; }
.chimera-page button, .chimera-page .button { background: #365a54; border: 1px solid #27443d; border-radius: 8px; color: #fffae9; box-shadow: 0 3px 0 #213f37; padding: 11px 15px; font-size: .8rem; font-weight: 750; }
.chimera-page button:hover:not(:disabled) { background: #436c62; transform: translateY(-1px); }
.chimera-page button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.chimera-page button:disabled { opacity: 1; background: #dadccf; border-color: #acb4a3; box-shadow: 0 2px 0 #b3bca9; color: #667260; }
.chimera-page button.secondary { background: #e4e9d5; border-color: #9caa8b; color: #405c42; box-shadow: 0 2px 0 #b5c0a5; }
.chimera-page button.secondary:hover:not(:disabled) { background: #d7e1bf; }
.chimera-page button.selected { background: #385f4b; color: #fff5d7; border-color: #254f3a; box-shadow: 0 2px 0 #244733; }
.chimera-page button:focus-visible, .chimera-page a:focus-visible, .chimera-page summary:focus-visible { outline: 3px solid #217a93; outline-offset: 3px; }
.chimera-page .masthead a:focus-visible { outline-color: #fff3dc; }
.chimera-page .portrait:has(img:focus-visible) { outline: 3px solid #21493d; outline-offset: 2px; }
.chimera-page .portrait img:focus-visible { outline: 2px solid #fff3dc; outline-offset: -2px; }
.chimera-page #attack-submit, .chimera-page #generate-creature { background: #e9c45d; border-color: #987939; color: #493d24; box-shadow: 0 3px 0 #a58943; }
.chimera-page #attack-submit:hover:not(:disabled), .chimera-page #generate-creature:hover:not(:disabled) { background: #f4d77a; }
.chimera-page #attack-submit:disabled, .chimera-page #generate-creature:disabled { background: #e1dcc8; color: #777562; border-color: #b1aa91; box-shadow: 0 2px 0 #b9b19b; }
.chimera-page .form-actions { flex-direction: row; align-items: center; gap: 12px; }
.chimera-page .form-actions .muted { font-size: .69rem; }
.chimera-page .confirm-row { flex-direction: row; align-items: center; padding-top: 15px; margin: 20px 0; border-top: 1px dashed #bac1a9; }
.chimera-page .confirm-row p { max-width: 55%; font-size: .75rem; }
.chimera-page .defenses { margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid #c4cbb4; }
.chimera-page .command-console:has(#preparation:not([hidden])) .defenses { padding: 20px 0 0; border-left: 0; border-top: 1px solid #c4cbb4; }
.chimera-page .defenses .section-title { margin: 16px 0 10px; flex-wrap: wrap; }
.chimera-page .defenses .section-title h2 { font-size: 1rem; }
.chimera-page .defenses .badge { border-color: #a5b394; color: #586c4d; font-size: .49rem; padding: 3px 6px; }
.chimera-page .defenses > .muted { font-size: .73rem; }
.chimera-page .defense-buttons { display: grid; grid-template-columns: 1fr; gap: 8px; }
.chimera-page .defense-buttons button { min-height: 40px; font-size: .72rem; text-align: left; padding: 8px 11px; }
.chimera-page .command-console:has(#preparation:not([hidden])) .defense-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chimera-page #defense-state { margin-bottom: 0; font-size: .7rem; }
.chimera-page details { margin-top: 21px; border-color: #c1cbb1; }
.chimera-page summary { color: #405943; font-size: .76rem; }
.chimera-page .memory button { font-size: .73rem; }
.chimera-page .creature-tile img { background: #d9e2c8; }
.chimera-page .sidebar { gap: 26px; }
.chimera-page .journal { padding: 20px; background: #edf0d9; border-radius: 14px 14px 25px 14px; }
.chimera-page .journal > .muted { font-size: .74rem; }
.chimera-page .timeline { height: 630px; scrollbar-color: #aab899 transparent; padding-right: 5px; }
.chimera-page .event { border-color: #b7c49c80; padding: 14px 0; }
.chimera-page .event-name { color: #8c4f36; font-size: .6rem; }
.chimera-page .event p { font-size: .79rem; line-height: 1.6; margin-bottom: 0; }
.chimera-page .event img { display: block; border: 1px solid #b9c8a6; border-radius: 6px; margin-top: 10px; max-height: 110px; }
.chimera-page .event-dice { background: #dce6c0; border-color: #b9c998; }
.chimera-page .event-damage p { color: #38613e; }
.chimera-page .battle-dock { right: 24px; bottom: 20px; gap: 10px; }
.chimera-page .chat-dock { border: 2px solid #713841; border-radius: 12px; background: #f2f1de; box-shadow: 0 4px 0 #963645, 0 12px 36px #273c3333; width: min(348px, calc(100vw - 28px)); }
.chimera-page .chat-dock.collapsed { width: 215px; }
.chimera-page #chat-toggle { background: #ab394a; color: #fff3df; border: 0; border-bottom: 1px solid #7e3540; box-shadow: none; padding: 12px 15px; transform: none; }
.chimera-page #chat-toggle:hover { background: #982f42; transform: none; }
.chimera-page .chat-title { font-size: .8rem; }
.chimera-page .chat-title:before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ace0ad; margin-right: 9px; box-shadow: 0 0 0 3px #79ae7620; }
.chimera-page #chat-chevron { color: #ffded2; }
.chimera-page .chat-unread { background: #ffe498; color: #653c2d; }
.chimera-page #chat-panel { padding: 12px; }
.chimera-page .messages p { font-size: .75rem; }
.chimera-page #messages .chat-message { padding: 6px 8px; border-left: 3px solid #708571; border-radius: 4px; overflow-wrap: anywhere; }
.chimera-page #messages .chat-message[data-player="0"] { color: #744323; background: #fff0d5; border-left-color: #a7642f; }
.chimera-page #messages .chat-message[data-player="1"] { color: #205a53; background: #dfefe5; border-left-color: #368478; }
.chimera-page #messages .chat-message strong { color: inherit; }
.chimera-page .messages strong { color: #48744c; }
.chimera-page .chat-dock .messages { max-height: min(175px, 24vh); }
.chimera-page .chat-dock .messages:empty:before { font-size: .73rem; }
.chimera-page .chat input { font-size: .75rem; }
.chimera-page #chat-form button { min-height: 42px; padding: 9px 11px; font-size: .71rem; }
.chimera-page #roll-dice { background: #e9c45d; border: 2px solid #7a653b; color: #493d24; box-shadow: 0 3px 0 #917037; }
.chimera-page #roll-dice:disabled { background: #ded8c3; border-color: #a69c82; color: #6b6250; }
.chimera-page #chat-form #roll-dice { min-height: 42px; height: 100%; border-width: 1px; padding: 9px 6px; box-shadow: 0 3px 0 #a58943; font-size: .7rem; }
.chimera-page #dice-modal { color: #fff4df; }
.chimera-page #dice-modal .dice-tray { background: linear-gradient(125deg, #24423ddd, #2c3847cc); border-color: #d5e7cc99; }
.chimera-page #dice-modal .eyebrow { color: #ffe09a; justify-content: center; }
.chimera-page #dice-modal .dice-player.winner { color: #ffe09a; border-color: #eac87c55; }
.chimera-page .generation-progress { background: #e3edd6; border-color: #a1b991; color: #31583d; border-radius: 8px; margin: 16px 0; padding: 15px; }
.chimera-page .generation-progress-details { color: #3d6450; }
.chimera-page .generation-progress progress, .chimera-page .generation-progress progress::-webkit-progress-bar { background: #c6d4b5; }
.chimera-page .generation-progress progress::-webkit-progress-value { background: #48866a; }
.chimera-page .generation-progress progress::-moz-progress-bar { background: #48866a; }
.chimera-page #creature-lightbox { border: 3px solid #cf5b62; border-radius: 16px; }
.chimera-page .attack-announcement { background: #f5efdaf5; border: 3px solid #bc414f; box-shadow: 0 7px 0 #8b3341, 0 20px 80px #233d3460; border-radius: 18px; }
.chimera-page .attack-announcement-icon { color: #995438; border-color: #c7a47a; background: #f0dfb7; }
.chimera-page .attack-announcement-label { color: #8f3e42; }
.chimera-page .attack-announcement-name { color: #305343; }
.chimera-page .attack-announcement-text { color: #293c32; }
.chimera-page .attack-announcement-close { box-shadow: none; }
.chimera-page #toast { background: #2a4c41; border: 2px solid #bfd3ad; color: #fff8e5; }
.chimera-page footer { display: flex; justify-content: space-between; gap: 12px; padding: 26px 32px 34px; color: #fff6e7; background: #9b3344; font-size: .59rem; letter-spacing: .1em; }
.chimera-page footer span { letter-spacing: .01em; }
.chimera-page .welcome { margin: 40px auto 70px; padding: 32px; border: 3px solid #744247; border-radius: 16px 16px 16px 35px; background: #eef1d9; box-shadow: 0 5px 0 #982d3e; }
.chimera-page .welcome h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.chimera-page .notice, .chimera-page .room-link { background: #e1e9cb; border-color: #a9b892; color: #3e6247; }
@media (max-width: 1160px) {
  .chimera-page { padding: 18px; }
  .chimera-page main { padding: 24px 22px 12px; }
  .chimera-page .battle-grid { grid-template-columns: minmax(0, 1fr) 275px; gap: 20px; }
  .chimera-page .command-console { grid-template-columns: 1fr; }
  .chimera-page .defenses { padding: 20px 0 0; border-left: 0; border-top: 1px solid #c4cbb4; }
  .chimera-page .defense-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chimera-page .device-optics { gap: 10px; }
  .chimera-page .device-lights { gap: 5px; }
}
@media (max-width: 850px) {
  .chimera-page .battle-grid { grid-template-columns: minmax(0, 1fr); }
  .chimera-page .sidebar { display: block; }
  .chimera-page .timeline { height: 300px; }
  .chimera-page .command-console { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .chimera-page .command-console:has(#preparation:not([hidden])) { grid-template-columns: 1fr; }
  .chimera-page .defenses { padding: 0 0 0 20px; border-top: 0; border-left: 1px solid #c4cbb4; }
  .chimera-page .defense-buttons { grid-template-columns: 1fr; }
  .chimera-page .masthead { gap: 18px; padding: 22px; }
  .chimera-page .device-lights { display: none; }
  .chimera-page .brand { font-size: 1.5rem; }
}
@media (max-width: 600px) {
  .chimera-page { padding: 10px 8px 18px; font-size: 14px; }
  .chimera-page .chimera-shell { border-radius: 24px 24px 29px 29px; box-shadow: inset 0 3px 0 #ff9c9f80, 0 5px 0 #912d3d, 0 12px 22px #26372e20; }
  .chimera-page .masthead { min-height: 112px; display: grid; grid-template-columns: auto minmax(0, 1fr); padding: 17px 16px 13px; gap: 10px 13px; }
  .chimera-page .device-optics { grid-row: 1 / 3; }
  .chimera-page .device-lens { width: 55px; height: 55px; border-width: 5px; }
  .chimera-page .brand { font-size: 1.22rem; align-self: end; }
  .chimera-page .brand span { font-size: .43rem; margin-top: 4px; }
  .chimera-page .header-right { flex-direction: row; align-items: center; justify-content: space-between; gap: 5px; }
  .chimera-page .header-right .badge { padding: 3px 5px; font-size: .42rem; letter-spacing: 0; }
  .chimera-page .header-right a { color: #0d090b; font-size: .57rem; }
  .chimera-page main { padding: 20px 12px 6px; }
  .chimera-page .arena-heading { margin-bottom: 15px; gap: 8px; }
  .chimera-page .arena-heading .eyebrow { font-size: .49rem; letter-spacing: .14em; }
  .chimera-page .arena-heading h1 { font-size: 1.65rem; overflow-wrap: anywhere; }
  .chimera-page .pill { font-size: .57rem; padding: 7px 8px; max-width: 42%; white-space: normal; text-align: center; }
  .chimera-page .status { font-size: .77rem; padding: 10px 11px; margin-bottom: 20px; border-left-width: 6px; }
  .chimera-page .battle-main, .chimera-page .battle-grid { gap: 20px; }
  .chimera-page .stage { padding: 14px 11px 10px; border-width: 2px; border-bottom-left-radius: 25px; }
  .chimera-page .stage > .section-title { gap: 6px; margin-bottom: 12px; }
  .chimera-page .stage > .section-title h2 { font-size: .58rem; letter-spacing: .08em; }
  .chimera-page .screen-label { font-size: .47rem; letter-spacing: .05em; }
  .chimera-page .portraits { gap: 9px; margin-bottom: 10px; }
  .chimera-page .portrait img { height: 155px; }
  .chimera-page .portrait-placeholder { height: 155px; font-size: 3rem; }
  .chimera-page .portrait-caption { padding: 8px; }
  .chimera-page .portrait-caption strong { font-size: .7rem; overflow-wrap: anywhere; }
  .chimera-page .portrait-caption span { font-size: .58rem; }
  .chimera-page .stage:has(#video-wrap:not([hidden])) .portrait { grid-template-columns: 43px minmax(0, 1fr); }
  .chimera-page .stage:has(#video-wrap:not([hidden])) .portrait img { width: 43px; height: 59px; }
  .chimera-page .stage:has(#video-wrap:not([hidden])) .portrait-caption { padding: 5px 6px; }
  .chimera-page .stage:has(#video-wrap:not([hidden])) .portrait-caption span { font-size: .53rem; }
  .chimera-page .health-bars { gap: 9px; }
  .chimera-page .health-card { padding: 8px; }
  .chimera-page .health-title { font-size: .66rem; }
  .chimera-page .health-value { font-size: .65rem; }
  .chimera-page .health-outcome { font-size: .63rem; }
  .chimera-page .video-wrap { margin-top: 12px; }
  .chimera-page .video-wrap video { border-width: 2px; }
  .chimera-page .video-wrap p { font-size: .64rem; }
  .chimera-page .command-console { padding: 17px 15px; grid-template-columns: 1fr; gap: 20px; }
  .chimera-page .defenses { padding: 20px 0 0; border-top: 1px solid #c4cbb4; border-left: 0; }
  .chimera-page .command-console .defense-buttons, .chimera-page .command-console:has(#preparation:not([hidden])) .defense-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chimera-page .defense-buttons button { font-size: .66rem; padding: 9px 8px; min-height: 43px; }
  .chimera-page .form-actions { flex-wrap: wrap; align-items: center; }
  .chimera-page .form-actions .muted { max-width: 100%; }
  .chimera-page #attack-form .form-actions { flex-wrap: nowrap; }
  .chimera-page #attack-form .form-actions button { width: auto; }
  .chimera-page .confirm-row { flex-direction: column; gap: 12px; align-items: stretch; }
  .chimera-page .confirm-row p { max-width: 100%; }
  .chimera-page .confirm-row button { font-size: .73rem; }
  .chimera-page .journal { padding: 17px; }
  .chimera-page .timeline { height: 310px; }
  .chimera-page .battle-dock { right: 14px; bottom: 12px; gap: 7px; max-width: calc(100vw - 28px); }
  .chimera-page .battle-dock #chat-dock.collapsed { width: min(188px, calc(100vw - 171px)); }
  .chimera-page .chat-title { font-size: .71rem; }
  .chimera-page .chat-title:before { margin-right: 6px; width: 5px; height: 5px; }
  .chimera-page #chat-toggle { padding: 12px 10px; gap: 5px; }
  .chimera-page #roll-dice { padding: 10px; font-size: .73rem; min-height: 47px; }
  .chimera-page footer { flex-direction: column; padding: 20px 16px 95px; font-size: .5rem; gap: 5px; }
  .chimera-page .welcome { padding: 23px 18px; margin: 5px auto 30px; }
  .chimera-page .welcome h1 { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .chimera-page button { transition: none; }
}

/* One shared display/command panel; only the active desktop duel fills the viewport. */
.chimera-page { padding: 12px; }
.chimera-page .chimera-shell { border-radius: 23px; }
.chimera-page .masthead { min-height: 70px; padding: 12px 18px; gap: 16px; }
.chimera-page .device-lens { width: 44px; height: 44px; border-width: 4px; }
.chimera-page .device-lights { gap: 5px; }
.chimera-page .device-lights i { width: 11px; height: 11px; }
.chimera-page .brand { font-size: 1.3rem; }
.chimera-page .brand span { margin-top: 4px; }
.chimera-page .header-right { flex-direction: row; align-items: center; gap: 15px; }
.chimera-page main { padding: 14px 18px; }
.chimera-page .arena-heading { margin-bottom: 10px; }
.chimera-page .arena-heading .eyebrow { margin-bottom: 4px; }
.chimera-page .arena-heading h1 { font-size: 1.55rem; }
.chimera-page .pill { padding: 6px 11px; }
.chimera-page .status { padding: 9px 13px; margin-bottom: 14px; }
.chimera-page .stage { padding: 15px; border-radius: 14px; }
.chimera-page .combat-display { min-width: 0; }
.chimera-page .combat-display > .section-title { margin-bottom: 12px; }
.chimera-page .combat-display > .section-title h2 { text-transform: uppercase; font-size: .69rem; letter-spacing: .1em; color: #4c5c4b; }
.chimera-page .stage .command-console { margin-top: 16px; padding: 18px 0 0; border-top: 1px solid #adbba0; gap: 18px; }
.chimera-page .screen-trim { display: none; }
.chimera-page .stage:has(#preparation[hidden]) .portraits { gap: 10px; margin: 0; }
.chimera-page .stage:has(#preparation[hidden]) .portrait { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; }
.chimera-page .stage:has(#preparation[hidden]) .portrait img { width: 52px; height: 54px; }
.chimera-page .stage:has(#preparation[hidden]) .portrait-placeholder { height: 54px; font-size: 2rem; }
.chimera-page .stage:has(#preparation[hidden]) .portrait-caption { padding: 7px 9px; border: 0; background: transparent; }
.chimera-page .stage:has(#preparation[hidden]) .portrait-caption strong { font-size: .78rem; }
.chimera-page .stage:has(#preparation[hidden]) .portrait-caption span { font-size: .63rem; }
.chimera-page .stage:has(#preparation[hidden]) .battle-health { margin-top: 8px; }
.chimera-page .stage:has(#preparation[hidden]) .health-bars { gap: 10px; }
.chimera-page .stage:has(#preparation[hidden]) .health-card { padding: 7px 9px; }
.chimera-page .stage:has(#preparation[hidden]) .health-title { margin-bottom: 4px; }
.chimera-page .stage:has(#preparation[hidden]) .health-value { margin-top: 3px; }
.chimera-page .stage:has(#preparation[hidden]) .health-outcome { margin-top: 5px; line-height: 1.35; }
.chimera-page .stage:has(#preparation[hidden]) .video-wrap { margin-top: 10px; }
.chimera-page .stage:has(#preparation[hidden]) .video-wrap p { margin-top: 6px; }

@media (min-width: 1050px) and (min-height: 650px) {
  .chimera-page:has(#preparation[hidden]) { height: 100dvh; }
  .chimera-page:has(#preparation[hidden]) .chimera-shell { height: 100%; display: flex; flex-direction: column; }
  .chimera-page:has(#preparation[hidden]) .masthead { width: 100%; flex: none; max-width: none; }
  .chimera-page:has(#preparation[hidden]) main { width: 100%; flex: 1; min-height: 0; }
  .chimera-page:has(#preparation[hidden]) #arena { height: 100%; display: flex; flex-direction: column; }
  .chimera-page:has(#preparation[hidden]) .arena-heading { flex: none; min-height: 32px; gap: 12px; margin-bottom: 8px; }
  .chimera-page:has(#preparation[hidden]) .arena-heading .eyebrow { display: none; }
  .chimera-page:has(#preparation[hidden]) .arena-heading h1 { font-size: 1.4rem; }
  .chimera-page:has(#preparation[hidden]) .status { flex: none; margin-bottom: 12px; font-size: .8rem; }
  .chimera-page:has(#preparation[hidden]) .battle-grid { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: stretch; }
  .chimera-page:has(#preparation[hidden]) .battle-main { display: contents; }
  .chimera-page:has(#preparation[hidden]) .stage { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; padding: 14px; }
  .chimera-page:has(#preparation[hidden]) .combat-display { min-height: 0; display: flex; flex-direction: column; }
  .chimera-page:has(#preparation[hidden]) .combat-display > .section-title { flex: none; margin-bottom: 10px; }
  .chimera-page:has(#preparation[hidden]) .portraits, .chimera-page:has(#preparation[hidden]) .battle-health { flex: none; }
  .chimera-page:has(#preparation[hidden]) .video-wrap { min-height: 0; flex: 1; display: flex; flex-direction: column; }
  .chimera-page:has(#preparation[hidden]) .video-wrap video { flex: 1; min-height: 0; height: 0; max-height: none; aspect-ratio: auto; }
  .chimera-page:has(#preparation[hidden]) .video-wrap p { flex: none; font-size: .66rem; }
  .chimera-page:has(#preparation[hidden]) .generation-progress { flex: none; margin: 9px 0 0; padding: 11px; }
  .chimera-page:has(#preparation[hidden]) .generation-progress-heading { margin-bottom: 8px; }
  .chimera-page:has(#preparation[hidden]) .generation-progress-details, .chimera-page:has(#preparation[hidden]) .generation-progress-note { margin-top: 6px; font-size: .72rem; }
  .chimera-page:has(#preparation[hidden]) .command-console { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #99aa88 transparent; display: flex; flex-direction: column; margin: 0; padding: 0 2px 3px 15px; border: 0; border-left: 1px solid #a7b59b; gap: 14px; }
  .chimera-page:has(#preparation[hidden]) .command-console > section { flex: none; }
  .chimera-page:has(#preparation[hidden]) .command-console .eyebrow { margin-bottom: 9px; gap: 7px; }
  .chimera-page:has(#preparation[hidden]) .command-number { width: 21px; height: 21px; font-size: .63rem; }
  .chimera-page:has(#preparation[hidden]) .command-console label { margin-bottom: 6px; }
  .chimera-page:has(#preparation[hidden]) #attack-text { min-height: 78px; height: 78px; max-height: 140px; padding: 9px; }
  .chimera-page:has(#preparation[hidden]) .form-actions { margin-top: 8px; }
  .chimera-page:has(#preparation[hidden]) #attack-submit { min-height: 38px; padding: 8px 12px; }
  .chimera-page:has(#preparation[hidden]) .command-console details { margin-top: 12px; padding-top: 10px; }
  .chimera-page:has(#preparation[hidden]) .command-console summary { margin-bottom: 0; }
  .chimera-page:has(#preparation[hidden]) .command-console details[open] summary { margin-bottom: 10px; }
  .chimera-page:has(#preparation[hidden]) .defenses { border: 0; border-top: 1px solid #a7b59b; padding: 13px 0 0; margin: 0; }
  .chimera-page:has(#preparation[hidden]) .defenses .section-title { margin: 0 0 7px; gap: 5px; }
  .chimera-page:has(#preparation[hidden]) .defenses .section-title h2 { font-size: .85rem; }
  .chimera-page:has(#preparation[hidden]) .defenses > .muted { margin-bottom: 8px; line-height: 1.45; font-size: .71rem; }
  .chimera-page:has(#preparation[hidden]) .defense-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 9px 0 8px; gap: 7px; }
  .chimera-page:has(#preparation[hidden]) .defense-buttons button { min-height: 37px; padding: 7px 8px; font-size: .66rem; }
  .chimera-page:has(#preparation[hidden]) #defense-state { font-size: .66rem; }
  .chimera-page:has(#preparation[hidden]) .sidebar { min-height: 0; display: block; }
  .chimera-page:has(#preparation[hidden]) .journal { height: 100%; display: flex; flex-direction: column; padding: 15px; }
  .chimera-page:has(#preparation[hidden]) .journal > .section-title { flex: none; gap: 5px; margin-bottom: 10px; }
  .chimera-page:has(#preparation[hidden]) .journal > .section-title h2 { font-size: .85rem; }
  .chimera-page:has(#preparation[hidden]) .journal > .muted { flex: none; font-size: .69rem; }
  .chimera-page:has(#preparation[hidden]) .timeline { flex: 1; min-height: 0; height: auto; overscroll-behavior: contain; }
  .chimera-page:has(#preparation[hidden]) .timeline::after { content: ''; display: block; height: 70px; }
  .chimera-page:has(#preparation[hidden]):has(#chat-dock:not(.collapsed)) .timeline::after { height: 320px; }
  .chimera-page:has(#preparation[hidden]) .event p { font-size: .74rem; }
  .chimera-page:has(#preparation[hidden]) footer { display: none; }
  .chimera-page:has(#preparation[hidden]) .battle-dock { right: max(30px, calc((100vw - 1456px) / 2 + 18px)); bottom: 28px; }
  .chimera-page:has(#preparation[hidden]) .chat-dock { width: 260px; }
  .chimera-page:has(#preparation[hidden]) .chat-dock.collapsed { width: 215px; }
  .chimera-page:has(#preparation[hidden]) #chat-panel { padding: 10px; }
  .chimera-page:has(#preparation[hidden]) .chat-dock .messages { max-height: 135px; }
}
@media (max-width: 600px) {
  .chimera-page { padding: 8px; }
  .chimera-page .masthead { min-height: 79px; padding: 10px 12px; gap: 6px 11px; }
  .chimera-page .device-lens { width: 43px; height: 43px; }
  .chimera-page .brand { font-size: 1.12rem; }
  .chimera-page .header-right { gap: 8px; justify-content: space-between; }
  .chimera-page main { padding: 12px 10px; }
  .chimera-page .arena-heading { margin-bottom: 8px; }
  .chimera-page .arena-heading h1 { font-size: 1.35rem; }
  .chimera-page .arena-heading .eyebrow { font-size: .46rem; }
  .chimera-page .pill { padding: 5px 7px; }
  .chimera-page .status { padding: 8px 10px; margin-bottom: 12px; font-size: .73rem; }
  .chimera-page .stage { padding: 11px; }
  .chimera-page .combat-display > .section-title { margin-bottom: 9px; }
  .chimera-page .combat-display > .section-title h2 { font-size: .59rem; }
  .chimera-page .stage:has(#preparation[hidden]) .portrait { grid-template-columns: 39px minmax(0, 1fr); }
  .chimera-page .stage:has(#preparation[hidden]) .portrait img { width: 39px; height: 45px; }
  .chimera-page .stage:has(#preparation[hidden]) .portrait-caption { padding: 5px 6px; }
  .chimera-page .stage:has(#preparation[hidden]) .portrait-caption strong { font-size: .67rem; }
  .chimera-page .stage:has(#preparation[hidden]) .portrait-caption span { font-size: .55rem; }
  .chimera-page .stage:has(#preparation[hidden]) .health-card { padding: 5px 7px; }
  .chimera-page .stage:has(#preparation[hidden]) .health-title { font-size: .63rem; }
  .chimera-page .stage:has(#preparation[hidden]) .health-value { font-size: .62rem; }
  .chimera-page .stage:has(#preparation[hidden]) .health-outcome { font-size: .61rem; }
  .chimera-page .stage .command-console { margin-top: 12px; padding-top: 14px; }
  .chimera-page .stage:has(#preparation[hidden]) #attack-text { min-height: 70px; height: 70px; }
  .chimera-page .stage:has(#preparation[hidden]) .command-console .eyebrow { margin-bottom: 7px; }
  .chimera-page .stage:has(#preparation[hidden]) .form-actions { margin-top: 8px; }
  .chimera-page .stage:has(#preparation[hidden]) .defenses { padding-top: 14px; }
  .chimera-page .stage:has(#preparation[hidden]) .defenses .section-title { margin-top: 10px; }
}

/* Chinese: keep the monospace look for Latin glyphs, but let CJK glyphs come from a sans face rather than the platform serif fallback. */
.settings textarea:lang(zh) { font-family: var(--cjk-mono); }
