.hero.top-split .hero-art{overflow:hidden}.split-image-frame{overflow:hidden;display:flex;align-items:center;justify-content:center;margin:auto;flex:none}.split-image-frame>img{height:100%;width:100%;display:block}.split-image-frame svg{max-height:none;width:100%;height:100%}.hero.top-wide{display:block;min-height:0}.wide-image-frame{overflow:hidden;margin:0 auto;position:relative;background:var(--accent-soft)}.wide-image-frame>img,.poster-image>img{display:block;height:100%;width:100%}.wide-image-frame>svg,.poster-image>svg{width:100%;height:100%}.top-text{padding:28px 35px;position:relative;z-index:1}.top-text h1{margin:14px 0;font-size:38px}.top-text p{white-space:normal}.hero.top-poster{display:flex;min-height:var(--top-height);position:relative;align-items:center}.poster-image{position:absolute;top:35px;bottom:0;left:50%;transform:translateX(-50%);overflow:hidden;max-height:calc(var(--top-height) - 35px)}.top-poster .top-text{background:color-mix(in srgb,var(--card) 88%,transparent);border:1px solid var(--ink);margin:28px;max-width:60%}.editor-game-frame{height:auto!important;overflow:hidden}.editor-game-frame>svg{height:100%;width:100%}.editor-game-frame>img{position:absolute;inset:0;display:block}.editor-game-frame .tag,.editor-game-frame .art-caption{z-index:1}
#appearance-dialog{width:calc(100vw - 28px);max-width:1800px;height:94vh;max-height:94vh;padding:0;overflow:hidden}#appearance-dialog .editor-shell{height:100%;display:grid;grid-template-columns:minmax(340px,410px) minmax(0,1fr)}.editor-sidebar{padding:28px;overflow-y:auto;background:var(--card);border-right:2px solid var(--ink)}.editor-sidebar .dialog-head{position:sticky;top:-28px;z-index:3}.editor-sidebar .settings-grid{gap:0 12px}.editor-sidebar .settings-actions{position:sticky;bottom:-28px;z-index:2;background:var(--card);padding:15px 0;margin-top:20px}.editor-sidebar .settings-actions .button{font-size:11px;padding:8px 12px}.editor-sidebar label{font-size:11px}.editor-previews{background:#d8d3e4;padding:20px;overflow:auto;min-width:0}.preview-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}.preview-heading strong{font-size:18px}.preview-heading span{font-size:11px}.preview-tabs{display:flex;gap:8px;margin:15px 0 24px;flex-wrap:wrap}.preview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,30%);gap:18px;align-items:start}.preview-device{min-width:0;background:white;border:2px solid var(--ink);box-shadow:5px 5px 0 #9b90b3}.preview-device h3{font:11px monospace;margin:0;padding:10px;background:var(--accent);color:#fff}.preview-viewport{position:relative;width:100%;overflow:hidden;background:white}.preview-viewport iframe{border:0;display:block;transform-origin:top left;background:var(--bg)}.preview-grid[data-mode=desktop]{grid-template-columns:1fr}.preview-grid[data-mode=desktop] .mobile-device{display:none}.preview-grid[data-mode=mobile]{grid-template-columns:minmax(0,390px);justify-content:center}.preview-grid[data-mode=mobile] .desktop-device{display:none}.drag-grip{font-size:24px;cursor:grab;user-select:none}.module-row[draggable=true]{cursor:grab}.module-row.dragging{opacity:.4;border:1px dashed var(--accent)}.module-row label,.module-row button{cursor:pointer}#editor-history button{margin-bottom:8px}#editor-status{color:var(--ink)}#login-error{color:#a51e45}.editor-sidebar details{border-top:1px solid var(--line);padding-top:15px;margin-top:15px}.editor-sidebar summary{cursor:pointer;font-weight:bold}
.drag-grip{touch-action:none}
.artwork-status,#editor-feedback{color:var(--accent);font-weight:600;overflow-wrap:anywhere}#editor-feedback{position:sticky;bottom:100px;z-index:3;background:var(--card);padding:8px;border:1px solid var(--line)}#editor-feedback:empty{display:none}
@media(max-width:900px){#appearance-dialog .editor-shell{grid-template-columns:minmax(280px,40%) minmax(0,1fr)}.editor-sidebar{padding:22px}.editor-previews{padding:13px}.preview-grid{grid-template-columns:1fr}.mobile-device{max-width:390px}.top-text h1{font-size:30px}.top-poster .top-text{max-width:75%}}
@media(max-width:600px){#appearance-dialog{width:calc(100vw - 12px);height:96vh;max-height:96vh}#appearance-dialog .editor-shell{display:flex;flex-direction:column;overflow:auto}.editor-sidebar{overflow:visible;border-right:0;border-bottom:2px solid var(--ink)}.editor-previews{overflow:visible;min-height:400px}.editor-sidebar .settings-actions{position:static}.editor-sidebar .dialog-head{position:static}.top-text{padding:20px}.top-text h1{font-size:28px}.top-poster .top-text{max-width:calc(100% - 30px);margin:15px}.hero.top-poster{min-height:min(var(--top-height),580px)}.top-wide .wide-image-frame{max-height:500px}.split-image-frame{max-height:270px!important}}
.preview-route{display:inline-flex;gap:6px;align-items:center;margin:0 0 0 8px;font-size:12px}.preview-route select{margin:0;padding:4px 8px}.confirm-dialog{max-width:420px}.confirm-dialog .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:16px}

/* Weekly schedule editor: a compact one-row-per-day table. */
.schedule-toolbar{display:flex;align-items:center;gap:8px;margin:10px 0}
.schedule-toolbar .week-tabs{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:6px}
.schedule-week-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}
.schedule-monday{display:flex;align-items:center;gap:8px;margin:0 0 0 auto;font-weight:700}
.schedule-monday input{width:auto!important;margin:0!important}
.schedule-status{margin:10px 0;padding:8px 14px;border-radius:12px;background:#e4f4ec;color:#245c47;font-size:13px;font-weight:700}
.schedule-status.warn{background:#fff1d6;color:#7a4a00}
.schedule-table{display:flex;flex-direction:column;gap:6px;margin:8px 0 12px}
.schedule-row{display:grid;grid-template-columns:64px 170px minmax(0,1fr) 92px 72px;gap:8px;align-items:center;padding:6px 8px;border-radius:14px;background:var(--card);border:1.5px solid var(--line)}
.schedule-row.is-rest{background:#f4eff2}
.schedule-row select,.schedule-row input{margin:0!important;padding:8px 10px!important}
.schedule-row input:disabled{opacity:.55}
.schedule-row input.invalid{border-color:#c0392b!important;background:#fff0ee!important}
.schedule-day{display:flex;flex-direction:column;line-height:1.2}
.schedule-day small{color:var(--muted);font-size:11px}
.schedule-head{background:none;border:0;padding:0 8px;font-size:11px;font-weight:700;color:var(--muted)}
@media(max-width:700px){.schedule-row{grid-template-columns:56px minmax(0,1fr) 84px;grid-template-areas:"day kind time" "day title copy"}
.schedule-row .schedule-day{grid-area:day}.schedule-row select{grid-area:kind}.schedule-row [data-prop=title]{grid-area:title}.schedule-row [data-prop=time]{grid-area:time}.schedule-row>button,.schedule-row>span:last-child{grid-area:copy}
.schedule-head{display:none}.schedule-monday{margin-left:0}}
.schedule-row>button{white-space:nowrap;padding:6px 10px}

/* Font pickers: each select is followed by a sample line set in the chosen face. */
.font-sample{margin:-8px 0 14px;padding:8px 12px;border-radius:12px;background:var(--card);border:1.5px dashed var(--line);font-size:17px;line-height:1.5}

/* 首頁文字 editor: fields on the left, a small live preview on the right (stacked on phones). */
.text-editor{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:20px;align-items:start}
.text-fields{display:flex;flex-direction:column;gap:14px;min-width:0}
.text-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.text-field-head,.text-field-foot{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.text-field-head label{margin:0;font-weight:700;font-size:13px}
.text-field input,.text-field textarea{margin:0!important}
.text-field textarea{min-height:0}
.text-preview{position:sticky;top:12px;display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:18px;border:2px dashed var(--line);background:var(--bg);min-width:0}
.text-preview p{margin:0;white-space:pre-line;overflow-wrap:anywhere}
.tp-hero{display:flex;flex-direction:column;gap:2px}
.tp-hero strong{font-family:var(--font-head);font-weight:var(--font-head-weight,400);font-size:22px;line-height:1.3;overflow-wrap:anywhere}
.tp-hero .tp-em{color:var(--accent)}
.tp-hero p{font-size:12px;color:var(--muted);margin-top:4px}
.tp-ticker{display:flex;gap:8px;align-items:center;font-size:12px;padding:6px 10px;border-radius:999px;background:var(--card);border:1.5px solid var(--line);min-width:0}
.tp-ticker b{flex:none;font-size:10px;color:var(--accent)}
.tp-ticker span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp-note{padding:10px 12px;border-radius:14px;background:#fff6d6;color:#5e4e5c;font-size:12px;transform:rotate(-1deg)}
@media(max-width:760px){.text-editor{grid-template-columns:minmax(0,1fr)}.text-preview{position:static}}

/* 遊戲卡片內容 editor: one collapsible row per game. */
.game-search-label{display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:13px;max-width:360px}
.game-edit-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.game-edit{border:2px solid var(--line);border-radius:18px;background:var(--card)}
.game-edit[open]{border-color:var(--accent)}
.game-edit summary{display:flex;align-items:center;gap:12px;padding:8px 12px;cursor:pointer;list-style:none}
.game-edit summary::-webkit-details-marker{display:none}
.game-edit summary:after{content:'▾';margin-left:auto;color:var(--muted);transition:transform .15s}
.game-edit[open] summary:after{transform:rotate(180deg)}
.game-edit summary .tag{margin:0}
.game-edit-cover{width:92px;aspect-ratio:460/215;object-fit:cover;border-radius:10px;flex:none;background:var(--bg)}
.game-edit-name{display:flex;flex-direction:column;min-width:0}
.game-edit-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-edit-name small{color:var(--muted);font-size:11px}
.game-edit-body{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:18px;padding:4px 14px 16px}
.game-edit-fields{display:flex;flex-direction:column;gap:12px;min-width:0}
.tag-picks{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.tag-pick{font:inherit;font-size:12px;padding:3px 10px;border-radius:999px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);cursor:pointer}
.tag-pick:hover{border-color:var(--accent)}
.game-edit-original{margin:0;padding:8px 10px;border-radius:12px;background:var(--bg);overflow-wrap:anywhere}
.game-edit-actions{display:flex;flex-wrap:wrap;gap:8px}
.game-edit-preview{display:flex;flex-direction:column;gap:6px;min-width:0}
.ge-card{position:relative;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:18px;border:2px solid var(--line);background:var(--card)}
.ge-card img{width:100%;aspect-ratio:460/215;object-fit:cover;border-radius:12px}
.ge-card .tag{position:absolute;top:14px;left:14px;margin:0}
.ge-card strong{font-family:var(--font-head);font-weight:var(--font-head-weight,400);font-size:17px;overflow-wrap:anywhere}
.ge-card p{margin:0;font-size:12px;color:var(--muted);white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:760px){.game-edit-body{grid-template-columns:minmax(0,1fr)}.game-edit-cover{width:72px}}
/* Phones: the sticky save bar becomes a compact two-column strip so it does not cover the form. */
@media(max-width:600px){.content-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px 4px}
.content-actions .button{padding:7px 8px;font-size:12px;min-height:36px}
.content-actions #content-status{grid-column:1/-1;text-align:center}}
