/* Wedding upload: shared homepage palette and accessible, single-column mobile flow. */
body[data-page="liff-upload"] {--upload-primary:#853f4b;--upload-muted:#706365;--upload-border:#eed9d7;--liff-action:#853f4b;background:#faf7f5;color:#3d3637;margin:0;font-weight:400}
body[data-page="liff-upload"]::before {content:none}
body[data-page="liff-upload"] *,body[data-page="liff-upload"] *::before,body[data-page="liff-upload"] *::after {box-sizing:border-box}
.upload-nav {width:min(100% - 32px,960px);margin:auto;padding:12px 0;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.upload-nav a {display:inline-flex;align-items:center;min-height:44px;color:var(--upload-primary);text-decoration:none;font-size:.875rem}
body[data-page="liff-upload"] .page-wrap {width:min(100% - 32px,960px);max-width:960px;margin:0 auto;padding:16px 0 40px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:24px;align-items:start}
.page-header {grid-column:1/-1;text-align:center;padding:12px 8px 20px}
body[data-page="liff-upload"] .page-header h1 {font:500 2.25rem/1.4 "Home Serif TC",serif;letter-spacing:.06em;color:#3d3637;margin:8px 0 12px}
.page-header > p {color:var(--upload-muted);font-size:.95rem;line-height:1.8;margin:0}
body[data-page="liff-upload"] .upload-eyebrow {font:400 2rem/1.3 "Home Script",cursive;color:#c77983}
.upload-steps {display:flex;list-style:none;justify-content:center;gap:24px;padding:0;margin:24px 0 0;color:var(--upload-muted);font-size:.875rem}
.upload-steps li {display:flex;align-items:center;gap:8px}
.upload-steps span {display:grid;place-items:center;width:28px;height:28px;flex-shrink:0;background:#f3e6e7;color:var(--upload-primary);border-radius:50%}
.upload-card {min-width:0;padding:28px;border:1px solid var(--upload-border);border-radius:24px;background:#fff;box-shadow:0 6px 24px #853f4b06}
body[data-page="liff-upload"] .upload-card h2 {font:600 1.125rem/1.6 "Home Serif TC",serif;color:#3d3637;margin:0 0 10px}
.upload-card h2 > span {color:#b2757e;font:500 .75rem/1 var(--font-sans-tc);margin-right:6px}
.section-hint,.format-hint,.publish-note {color:var(--upload-muted);font-size:.875rem;line-height:1.8;margin:0 0 16px}
body[data-page="liff-upload"] button,body[data-page="liff-upload"] .success-actions a {font:500 .875rem/1.5 var(--font-sans-tc);min-height:48px;cursor:pointer;box-shadow:none}
body[data-page="liff-upload"] .upload-area {display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;padding:28px 16px;border:2px dashed #c7979f;border-radius:20px;background:#fcf8f8;color:var(--upload-primary);text-align:center}
.upload-area strong {font-size:1rem}.upload-area span {font-size:.8rem;line-height:1.6;color:var(--upload-muted)}
body[data-page="liff-upload"] .upload-area:is(:hover,.dragover) {background:#f7e9eb;border-color:var(--upload-primary)}
.format-hint {font-size:.75rem;margin:12px 0 0}
.file-input {display:none}
.uploader-group,.location-group {margin:20px 0}
.uploader-group label,.location-group label {display:block;font-size:.95rem;font-weight:500;margin-bottom:8px}
.required-label,.optional-label {font-size:.75rem;font-weight:400;margin-left:6px;color:var(--upload-muted)}
.required-label {color:var(--upload-primary)}
body[data-page="liff-upload"] :is(.uploader-input,.location-select) {width:100%;min-height:48px;padding:12px 14px;font:400 1rem/1.5 var(--font-sans-tc);border:1px solid #dcbfc4;border-radius:12px;background:#fff;color:#3d3637}
.uploader-input-error {display:none;color:#9b303a;font-size:.875rem;margin-top:8px}
body[data-page="liff-upload"] .uploader-input.invalid {border-color:#9b303a}
.upload-submit {border-top:1px solid var(--upload-border);padding-top:24px;margin-top:24px}
body[data-page="liff-upload"] .btn-upload {display:block;width:100%;border:1px solid var(--upload-primary);background:var(--upload-primary);color:#fff;border-radius:999px;padding:12px 20px;font-size:1rem;min-height:52px}
body[data-page="liff-upload"] button:disabled {opacity:.5;cursor:not-allowed}
.publish-note {font-size:.75rem;text-align:center;margin:12px 0 0}
.thumb-section {margin:20px 0}
.thumb-bar {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.thumb-bar-title {font-size:.875rem;color:var(--upload-primary)}
body[data-page="liff-upload"] :is(.clear-btn,.audio-btn,#continue-sharing) {padding:8px 16px;border:1px solid var(--upload-primary);border-radius:999px;background:#fff;color:var(--upload-primary)}
.preview-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.preview-item {position:relative;min-width:0;border:2px solid transparent;border-radius:12px;background:#faf7f5;overflow:hidden;cursor:pointer}
.preview-item.selected {border-color:var(--upload-primary)}
.preview-item :is(img,video) {display:block;width:100%;height:110px;object-fit:contain;pointer-events:none}
body[data-page="liff-upload"] .rm-btn {position:absolute;top:2px;right:2px;display:grid;place-items:center;width:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:#fffef7ed;color:var(--upload-primary);font-size:1rem}
.vid-badge {position:absolute;bottom:4px;left:4px;background:#3d3637;color:white;font-size:.7rem;padding:2px 5px;border-radius:4px}
.frame-section {margin-top:20px}.frame-outer {padding:12px;border:1px solid var(--upload-border);border-radius:16px;background:#faf7f5}
.frame-label {font-size:.75rem;color:var(--upload-muted);margin-bottom:10px;text-align:center}
.frame-viewport {position:relative;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;background:#f2edeb;border-radius:12px;overflow:hidden}
.frame-placeholder {text-align:center;color:var(--upload-muted)}
#frame-img,#frame-video {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0}
#frame-img.active,#frame-video.active {opacity:1}
.frame-caption {font-size:.75rem;color:var(--upload-muted);overflow-wrap:anywhere;margin-top:8px;text-align:center}
.progress-bar {height:8px;background:#f2e5e6;border-radius:999px;overflow:hidden;margin-top:24px}
.progress-bar .fill {height:100%;width:0;background:var(--upload-primary);transition:width .2s}
.progress-label {font-size:.875rem;color:var(--upload-muted);line-height:1.7;margin:12px 0}
.status-msg {padding:16px;border-radius:16px;margin-top:16px;font-size:.95rem;line-height:1.7;overflow-wrap:anywhere}
.status-msg.success {background:#eef5ef;color:#285b3c}.status-msg.error {background:#fbefef;color:#923340}
.upload-results {list-style:none;padding:0;margin:16px 0;font-size:.8rem;line-height:1.7;max-height:240px;overflow:auto}
.upload-results li {padding:8px 0;border-bottom:1px solid var(--upload-border);overflow-wrap:anywhere}
.result-success {color:#285b3c}.result-error {color:#923340}
.success-actions {display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
body[data-page="liff-upload"] .success-actions a {display:inline-flex;align-items:center;justify-content:center;background:var(--upload-primary);border:1px solid var(--upload-primary);border-radius:999px;color:#fff;padding:10px 20px;text-decoration:none}
.audio-controls {grid-column:1/-1;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:12px;border:1px solid var(--upload-border);border-radius:20px;background:#fff;font-size:.8rem}
.audio-volume {display:flex;align-items:center;gap:8px}.audio-volume input {max-width:120px}.audio-status {flex-basis:100%;text-align:center}
.youtube-audio-host {position:fixed;width:1px;height:1px;opacity:0;pointer-events:none;left:-9999px;top:-9999px}
.upload-footer {text-align:center;color:var(--upload-muted);font-size:.875rem;padding:0 20px 48px;background:transparent}
body[data-page="liff-upload"] :focus-visible {outline:3px solid var(--upload-primary);outline-offset:3px}
.hidden,[hidden] {display:none!important}
@media(max-width:767px) {
 body[data-page="liff-upload"] .page-wrap {grid-template-columns:minmax(0,1fr);gap:20px;padding-top:12px}
 body[data-page="liff-upload"] .page-header h1 {font-size:1.75rem}
 .page-header {padding:8px 0 4px}.upload-steps {gap:12px;font-size:.75rem}.upload-steps li {gap:5px}.upload-steps span {width:24px;height:24px}
 .upload-card {padding:22px}.preview-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
 body[data-page="liff-upload"] .accessibility-mode-control {bottom:16px}
}
@media(max-width:360px) {.upload-card {padding:18px}.upload-steps {gap:8px}.preview-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce) {.progress-bar .fill {transition:none}}
/* Override legacy global header/card/button primitives only for this page. */
body.liff-shell[data-page="liff-upload"] .page-header {display:block;background:none;color:#3d3637;border:0;box-shadow:none}
body.liff-shell[data-page="liff-upload"] main.page-wrap .upload-card {border-radius:24px;border-color:var(--upload-border);box-shadow:0 6px 24px #853f4b06}
body[data-page="liff-upload"] #upload-area {border-radius:20px}
body[data-page="liff-upload"] .upload-card h2 {border:0;padding-bottom:0}
body[data-page="liff-upload"] .upload-nav a {color:var(--upload-primary)}
.file-meta {display:block;padding:8px;font-size:.7rem;line-height:1.5;color:var(--upload-muted);overflow-wrap:anywhere}
body[data-page="liff-upload"] .accessibility-mode-control {top:80px;bottom:auto}
