/* Hank1028: App-native navigation, explicit selected state, no face framing. */
.golden-page main{max-width:850px;padding-bottom:160px;padding-top:max(20px,env(safe-area-inset-top))}.golden-heading h1{font-size:clamp(25px,5vw,34px);line-height:1.4;margin:6px 0 12px}.golden-heading p{font-size:15px}.golden-badge{font-size:12px;background:#e7eedf;border-radius:20px;padding:6px 12px;color:#486c51;white-space:nowrap}.golden-page fieldset{margin-top:20px}.golden-page select{font:inherit;font-size:16px;max-width:100%;width:100%;min-height:48px;padding:10px;border:1px solid #ded8cb;border-radius:12px;background:#fff;color:inherit}.golden-page h2{font-size:18px;margin:18px 0 8px}.golden-selected-panel{background:#f0f4e8;border-radius:14px;padding:0 12px 12px;margin-top:18px;display:flow-root}.golden-selected-panel p{font-size:13px}.golden-selected{display:flex;gap:10px;overflow-x:auto;padding:4px 0 8px}.golden-selected-item{width:94px;flex:none}.golden-selected-item img{width:94px;height:84px;object-fit:contain;background:#fff;border-radius:9px}.golden-selected-item button{font-size:12px;min-height:36px;margin:2px 0 0;padding:4px 8px;width:100%}.golden-missing{height:84px;display:grid;place-items:center;background:#fff;border-radius:9px;font-size:12px}.golden-grid-heading p{font-size:13px;margin-top:0}.golden-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.golden-page .golden-photo{display:block;position:relative;border:2px solid transparent;border-radius:14px;overflow:hidden;background:#f4f0e7;cursor:pointer}.golden-photo img{width:100%;aspect-ratio:1;object-fit:contain;display:block}.golden-photo input{position:absolute;right:8px;top:8px;width:24px;height:24px;accent-color:#486c51;z-index:1}.golden-photo:has(input:checked){border-color:#486c51;box-shadow:0 0 0 1px #486c51}.golden-photo:focus-within{outline:3px solid #b48835;outline-offset:2px}.golden-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}.golden-page .golden-pagination button{min-height:44px;padding:8px 12px;font-size:14px}.golden-explanation{font-size:12px;color:#716454}.golden-save-bar{position:fixed;z-index:20;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px max(18px,calc((100vw - 790px)/2)) max(14px,env(safe-area-inset-bottom));background:#fffef9f5;border-top:1px solid #e6dcc8;box-shadow:0 -4px 20px #4d35290b}.golden-save-bar{flex-wrap:wrap}.golden-save-bar>div{flex:1 1 7.5em;min-width:0}.golden-save-bar>button{flex:1 0 auto;white-space:nowrap}.golden-save-bar strong,.golden-save-bar span{display:block;font-size:14px}.golden-save-bar span{font-size:12px;color:#716454}.golden-save-bar button{margin:0;min-width:150px}.line-golden-rows{padding:0!important;list-style:none}.line-golden-rows li{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:12px 0;border-top:1px solid #ece5d7}.line-golden-rows span small{display:block;font-size:12px;color:#716454}.line-golden-rows a{min-height:44px;display:inline-flex;align-items:center;flex:none}.golden-entry-link{display:inline-flex;min-height:44px;align-items:center;font-weight:650}.golden-entry-note{font-size:12px;color:#716454}@media(max-width:420px){.golden-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.golden-page fieldset{padding-left:12px;padding-right:12px}.golden-save-bar button{min-width:140px;padding:10px;font-size:14px}}
.golden-confirm-overlay{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:#33241d70;padding:20px}.golden-confirm-overlay[hidden]{display:none}.golden-confirm-overlay section{background:#fffef9;border-radius:22px;padding:22px;max-width:380px;box-shadow:0 16px 60px #0003}.golden-confirm-overlay section>div{display:flex;gap:12px;justify-content:flex-end}.golden-confirm-overlay button{margin:10px 0 0}

/* Preview errors are recoverable without resetting the user's selection. */
.golden-photo-choice{display:block;position:relative;margin:0!important}.golden-preview{position:relative;display:block;width:100%;aspect-ratio:1;overflow:hidden;background:#f4f0e7}.golden-preview img{width:100%;height:100%;object-fit:contain;display:block}.golden-preview-status{position:absolute;inset:0;display:grid;place-items:center;padding:12px;font-size:13px;text-align:center;color:#716454}.golden-preview-status[hidden]{display:none}.golden-preview-retry{position:relative!important;display:block;width:calc(100% - 12px);min-height:44px!important;margin:6px!important;padding:6px!important;font-size:12px!important}.golden-preview-retry[hidden]{display:none!important}.golden-selected-item .golden-preview{height:84px;aspect-ratio:auto}.golden-photo:has(input:checked){border-color:#486c51}.golden-photo input:disabled{opacity:.55}

/* Hank 2026-11-18: one sliding switch per album, 辨識後上傳 (off) / 直接上傳 (on). The selectors are long on purpose:
   app-ui.css sizes every checkbox in this list to 20 px (body.app-ui.line-page .line-golden-rows label input). */
html body .line-golden-rows li{flex-wrap:wrap}
html body .line-golden-rows li>.mcode-switches{order:1;grid-column:1/-1;flex:1 1 100%;display:flex;width:100%;min-width:0}
html body .line-golden-rows li>a{order:2}
html body .line-golden-rows .mcode-switch-row{display:inline-flex;align-items:center;gap:12px;min-height:44px;margin:0;font-size:16px;line-height:1.4;cursor:pointer}
html body .line-golden-rows .mcode-side{color:#8a7c6c;transition:color .18s ease}
html body .line-golden-rows li[data-mode=match] .mcode-side[data-side=match],html body .line-golden-rows li[data-mode=all] .mcode-side[data-side=all]{color:var(--tk-primary,#2f6b4f);font-weight:700}
html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:50px;height:30px;min-width:50px;min-height:30px;margin:0;padding:0;border:0;border-radius:999px;background:#9fb5a7;box-shadow:none;cursor:pointer;transition:background-color .18s ease}
html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]::before{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.28);transition:transform .18s ease}
html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]:checked{background:var(--tk-primary,#2f6b4f)}
html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]:checked::before{transform:translateX(20px)}
html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(47,107,79,.28)}
html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]:disabled{opacity:.45;cursor:default}
@media (prefers-reduced-motion:reduce){html body .line-golden-rows .mcode-side,html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch],html body .line-golden-rows .mcode-switch-row>input.mcode-switch[type=checkbox][role=switch]::before{transition:none}}

/* Claude R3420 batch06-04: bottom space as tall as the fixed save bar (set by line-golden.js). */
html body.app-ui.app-ui.line-page.golden-page main{padding-bottom:calc(var(--golden-bar-height,120px) + 24px)!important}

/* Claude R3427 batch07-05: pagination labels never break (「上一／頁」「第 1 / 1／頁」 at large text); the row wraps instead.
   The page label fills the middle (centered: same look on one line); 下一頁 keeps right when it wraps to its own line. */
html body.app-ui.app-ui .golden-pagination{flex-wrap:wrap;row-gap:8px}
html body.app-ui.app-ui :is(#golden-prev,#golden-next,#golden-page){white-space:nowrap}
html body.app-ui.app-ui #golden-page{flex:1 1 auto;text-align:center}
html body.app-ui.app-ui #golden-next{margin-left:auto}

/* Claude R3427 batch07-06: no reference photo yet: the hint paragraph alone in the photo row (flex: its margins do not collapse)
   left a big gap under 「尚未設定參考對象」. Hint margin 0, no top padding for that row; an empty row takes no space. */
html body.app-ui.app-ui #golden-selected>p:only-child{margin:0}
html body.app-ui.app-ui #golden-selected:has(>p:only-child){padding-top:0}
html body.app-ui.app-ui #golden-selected:empty{display:none}
