:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  color: #231c18;
  background: #f4f0e8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f0e8; }
button, input { font: inherit; }
button { color: inherit; }

.app-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 104px; padding: calc(18px + env(safe-area-inset-top)) 20px 18px;
  color: #fff; background: #1a1410;
}
.eyebrow { margin: 0 0 6px; color: #ffe000; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.app-header h1 { margin: 0; font-size: 20px; }
.photo-count { padding: 7px 11px; border: 1px solid #52483f; border-radius: 999px; color: #d9d0c8; font-size: 13px; }

main { max-width: 520px; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
.panel { display: none; }
.panel.active { display: block; }

.hero-card { position: relative; overflow: hidden; padding: 26px 22px 22px; border-radius: 24px; background: #ffe000; box-shadow: 0 10px 30px rgba(81, 62, 0, .12); }
.hero-card::after { content: ""; position: absolute; right: -52px; top: -55px; width: 170px; height: 170px; border: 26px solid rgba(255,255,255,.28); border-radius: 50%; }
.hero-kicker { margin: 18px 0 5px; font-size: 13px; font-weight: 800; }
.hero-card h2 { margin: 0; font-size: 31px; line-height: 1.2; letter-spacing: -.03em; }
.hero-copy { max-width: 280px; margin: 13px 0 22px; color: #5f5010; font-size: 14px; line-height: 1.6; }
.primary-button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 16px; color: #fff; background: #1a1410; font-weight: 800; cursor: pointer; }
.primary-button span { font-size: 22px; font-weight: 400; }

.steps-card { margin-top: 14px; padding: 20px; border: 1px solid #e7dfd2; border-radius: 22px; background: #fff; }
.steps-card h3 { margin: 0 0 18px; font-size: 16px; }
.steps-card ol { margin: 0; padding: 0; list-style: none; }
.steps-card li { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid #eee8df; }
.steps-card li:first-child { border-top: 0; padding-top: 0; }
.steps-card li > span { display: grid; flex: 0 0 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: #c8401a; font-size: 13px; font-weight: 800; }
.steps-card strong, .steps-card small { display: block; }
.steps-card strong { margin-bottom: 3px; font-size: 14px; }
.steps-card small { color: #81756c; font-size: 12px; }

.photo-library { margin-top: 18px; }

/* 游学日程设置 */
.trip-schedule { margin-bottom: 16px; padding: 16px 16px 14px; border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(81,62,0,.06); }
.trip-setup { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.trip-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 120px; font-size: 12px; font-weight: 700; color: var(--ink-soft, #5f554e); }
.trip-field input { height: 44px; padding: 0 12px; border: 1px solid #ddd4ca; border-radius: 12px; background: #faf8f4; font: inherit; color: var(--ink, #211b17); }
.trip-field input:focus { outline: none; border-color: var(--accent, #d6532f); }
.trip-setup .secondary-button { height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 800; flex: 0 0 auto; }
.trip-day-tabs { display: flex; gap: 8px; margin-top: 14px; padding-bottom: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.trip-day { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border: 1px solid #e5ddd2; border-radius: 14px; background: #faf8f4; color: var(--ink, #211b17); font-size: 13px; font-weight: 800; }
.trip-day small { font-size: 11px; font-weight: 600; opacity: .7; }
.trip-day.on { border-color: var(--accent, #d6532f); background: var(--accent, #d6532f); color: #fff; }
.trip-day.on small { opacity: .9; }
.trip-hint { margin: 10px 2px 0; color: var(--ink-soft, #5f554e); font-size: 12px; line-height: 1.5; }
.cloud-tidy hr { margin: 14px 0 12px; border: 0; border-top: 1px dashed #e0d8cc; }
.cloud-tidy-title { margin: 0 2px 4px; font-size: 14px; font-weight: 800; color: var(--ink, #211b17); }
.cloud-tidy .secondary-button { margin-top: 8px; height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 800; }
.cloud-map { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cloud-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #e5ddd2; border-radius: 12px; background: #faf8f4; font-size: 13px; }
.cloud-date { flex: 1 1 100%; font-weight: 700; }
.cloud-loc { flex: 1 1 120px; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #ddd4ca; border-radius: 10px; background: #fff; font: inherit; }
.cloud-row select { flex: 0 0 auto; height: 36px; padding: 0 8px; border: 1px solid #ddd4ca; border-radius: 10px; background: #fff; font: inherit; }
.cloud-tidy .primary-action { margin-top: 12px; width: 100%; }
.cloud-status { margin: 10px 2px 0; color: var(--ink-soft, #5f554e); font-size: 12px; line-height: 1.5; }
.cloud-status:empty { display: none; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 2px 12px; }
.section-heading p { margin: 0 0 3px; color: #c8401a; font-size: 11px; font-weight: 800; }
.section-heading h2 { margin: 0; font-size: 22px; }
.section-heading label { padding: 9px 12px; border-radius: 11px; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.date-group { overflow: hidden; margin-bottom: 12px; border: 1px solid #e6ded2; border-radius: 18px; background: #fff; }
.date-toggle { display: flex; align-items: center; width: 100%; min-height: 55px; padding: 0 14px; border: 0; background: #fff; text-align: left; font-weight: 800; }
.date-toggle .calendar { margin-right: 9px; }
.date-toggle .count { margin-left: 6px; color: #8d8178; font-size: 12px; font-weight: 500; }
.date-toggle .chevron { margin-left: auto; transition: transform .2s; }
.date-group.collapsed .chevron { transform: rotate(-90deg); }
.date-content { padding: 0 10px 12px; }
.date-group.collapsed .date-content { display: none; }
.date-note { width: 100%; height: 38px; margin-bottom: 9px; padding: 0 11px; border: 1px solid #e7dfd6; border-radius: 10px; outline: none; background: #faf8f4; font-size: 12px; }
.date-note:focus { border-color: #c8401a; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.photo-thumb { position: relative; overflow: hidden; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; background: #e9e3da; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb small { position: absolute; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 5px; color: #fff; background: rgba(0,0,0,.55); font-size: 9px; }
.photo-del { position: absolute; top: 3px; right: 3px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: rgba(0,0,0,.5); font-size: 18px; line-height: 1; }
.photo-del:active { background: #d6532f; }

.viewer { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 60px 0 76px; background: rgba(10,8,7,.96); }
.viewer[hidden] { display: none; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close, .viewer-arrow { position: absolute; z-index: 1; border: 0; color: #fff; background: rgba(255,255,255,.12); }
.viewer-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 38px; height: 38px; border-radius: 50%; font-size: 27px; }
.viewer-arrow { top: 48%; width: 38px; height: 54px; border-radius: 12px; font-size: 36px; }
.viewer-arrow.previous { left: 8px; }
.viewer-arrow.next { right: 8px; }
.viewer p { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 20px; right: 20px; margin: 0; color: #ddd5cf; text-align: center; font-size: 13px; }
.viewer-delete { position: absolute; z-index: 1; top: calc(14px + env(safe-area-inset-top)); left: 14px; padding: 9px 16px; border: 0; border-radius: 999px; color: #fff; background: rgba(214,83,47,.92); font-size: 14px; font-weight: 600; }
.viewer-delete:active { transform: scale(.96); }

.watermark-preview { position: relative; overflow: hidden; display: grid; min-height: 210px; place-items: center; border-radius: 20px; background: #28221e; }
.watermark-preview canvas { display: block; width: 100%; max-height: 330px; object-fit: contain; }
.wm-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 40px; height: 56px; border: 0; border-radius: 12px; color: #fff; background: rgba(0,0,0,.34); font-size: 32px; line-height: 1; }
.wm-nav:active { background: rgba(0,0,0,.55); }
.wm-prev { left: 8px; }
.wm-next { right: 8px; }
.wm-counter { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 2; padding: 3px 12px; border-radius: 999px; color: #fff; background: rgba(0,0,0,.45); font-size: 12px; font-variant-numeric: tabular-nums; }
.wm-counter:empty { display: none; }
.settings-card { margin-top: 14px; padding: 18px; border: 1px solid #e6ded2; border-radius: 20px; background: #fff; }
.field-label, .range-heading { color: #5f554e; font-size: 12px; font-weight: 800; }
.field-label { display: block; margin: 0 0 8px; }
.text-field { width: 100%; height: 46px; margin-bottom: 18px; padding: 0 13px; border: 1px solid #ddd4ca; border-radius: 12px; outline: none; background: #faf8f4; }
.text-field:focus { border-color: #c8401a; }
.position-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 19px; }
.position-options input { position: absolute; opacity: 0; pointer-events: none; }
.position-options span { display: grid; min-height: 38px; place-items: center; border: 1px solid #e3dbd1; border-radius: 10px; color: #81766e; font-size: 11px; font-weight: 700; }
.position-options input:checked + span { border-color: #1a1410; color: #fff; background: #1a1410; }
.range-heading { display: flex; justify-content: space-between; margin: 12px 0 4px; }
.range-heading output { color: #c8401a; }
.settings-card input[type="range"] { width: 100%; accent-color: #c8401a; }
.inline-settings { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee8e0; }
.color-setting, .toggle-setting { display: flex; align-items: center; gap: 9px; color: #5f554e; font-size: 12px; font-weight: 800; }
.color-setting input { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; }
.toggle-setting input { position: absolute; opacity: 0; }
.toggle-setting span { position: relative; width: 43px; height: 25px; border-radius: 99px; background: #cfc7bf; transition: background .2s; }
.toggle-setting span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle-setting input:checked + span { background: #c8401a; }
.toggle-setting input:checked + span::after { transform: translateX(18px); }
.logo-picker { display: block; margin-top: 17px; padding: 12px; border: 1px dashed #cfc4b9; border-radius: 11px; color: #6e6259; text-align: center; font-size: 12px; font-weight: 800; }
.remove-logo { display: block; width: 100%; margin-top: 6px; border: 0; color: #c8401a; background: none; font-size: 12px; }
.watermark-actions { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; padding: 8px; border-radius: 18px; background: rgba(244,240,232,.94); backdrop-filter: blur(12px); }
.watermark-actions button { min-height: 50px; border-radius: 13px; font-weight: 800; }
.secondary-button { border: 1px solid #1a1410; background: #fff; }
.primary-action { border: 1px solid #1a1410; color: #fff; background: #1a1410; }
.watermark-actions button:disabled { opacity: .5; }
.processing-status { min-height: 20px; margin: 8px 0 0; color: #6e6259; text-align: center; font-size: 12px; }

.publish-card { margin-bottom: 14px; padding: 18px; border: 1px solid #e6ded2; border-radius: 20px; background: #fff; }
.publish-card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.publish-card-heading > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #fff4ad; font-size: 20px; }
.publish-card-heading strong, .publish-card-heading small { display: block; }
.publish-card-heading strong { margin-bottom: 3px; font-size: 15px; }
.publish-card-heading small { color: #847870; font-size: 11px; }
.publish-card .text-field { margin-bottom: 14px; }
.publish-card select { appearance: none; background: #faf8f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23766b63' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.save-settings { width: 100%; min-height: 46px; border: 0; border-radius: 12px; color: #fff; background: #1a1410; font-weight: 800; }
.cors-tip { margin: 13px 0 0; padding: 11px; border-radius: 10px; color: #765e08; background: #fff8d2; font-size: 11px; line-height: 1.6; }
.upload-progress { overflow: hidden; height: 7px; border-radius: 99px; background: #ece6df; }
.upload-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: #c8401a; transition: width .2s; }
.upload-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; margin-top: 12px; }
.upload-actions button { min-height: 47px; border-radius: 12px; font-size: 12px; font-weight: 800; }
.upload-actions button:disabled { opacity: .5; }
.published-list { margin-top: 22px; }
.published-date { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; padding: 14px; border: 1px solid #e6ded2; border-radius: 14px; background: #fff; }
.published-date strong, .published-date small { display: block; }
.published-date strong { margin-bottom: 4px; font-size: 13px; }
.published-date small { color: #7f746c; font-size: 11px; }
.uploaded-badge { padding: 6px 9px; border-radius: 99px; color: #267043; background: #e3f6e9; font-size: 10px; font-weight: 800; }
.album-button { min-height: 34px; padding: 0 11px; border: 0; border-radius: 9px; color: #fff; background: #c8401a; font-size: 11px; font-weight: 800; }
.album-link-row { grid-column: 1 / -1; display: flex; gap: 7px; padding-top: 10px; border-top: 1px solid #eee8e0; }
.album-link-row input { min-width: 0; flex: 1; height: 35px; padding: 0 9px; border: 1px solid #ded5cc; border-radius: 8px; color: #756961; background: #faf8f4; font-size: 10px; }
.album-link-row button { padding: 0 12px; border: 0; border-radius: 8px; color: #1a1410; background: #ffe000; font-size: 11px; font-weight: 800; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); min-width: 160px; padding: 11px 16px; border-radius: 99px; color: #fff; background: rgba(26,20,16,.92); text-align: center; font-size: 12px; }

.archive-card { padding: 28px 20px 20px; border: 1px solid #e5ddd2; border-radius: 22px; background: #fff; text-align: center; }
.archive-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 15px; place-items: center; border-radius: 17px; background: #fff2a3; font-size: 26px; }
.archive-card h3 { margin: 0 0 8px; font-size: 20px; }
.archive-card > p { max-width: 300px; margin: 0 auto 18px; color: #796e66; font-size: 13px; line-height: 1.7; }
.archive-card > button { width: 100%; min-height: 50px; border: 0; border-radius: 13px; color: #fff; background: #1a1410; font-weight: 800; }
.archive-card > button:disabled { opacity: .5; }
.archive-card .upload-progress { margin-top: 16px; }
.archive-ready { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 15px; border-radius: 16px; background: #e7f6eb; }
.archive-ready strong, .archive-ready small { display: block; }
.archive-ready strong { margin-bottom: 3px; color: #28613c; font-size: 17px; }
.archive-ready small { color: #67806f; font-size: 10px; }
.archive-ready button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; color: #7d746c; background: #fff; font-size: 11px; font-weight: 800; }
.archive-ready button:disabled { opacity: .5; }
.recognition-progress { margin-top: 13px; padding: 17px; border: 1px solid #e3dbd1; border-radius: 18px; background: #fff; }
.recognition-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.recognition-heading > span { font-size: 28px; }
.recognition-heading strong, .recognition-heading small { display: block; }
.recognition-heading strong { margin-bottom: 3px; font-size: 14px; }
.recognition-heading small { color: #7c7169; font-size: 11px; }
.recognition-progress > p { margin: 11px 0 0; color: #8b8078; text-align: center; font-size: 10px; }
.student-results { margin-top: 24px; }
.student-results .section-heading > span { color: #c8401a; font-size: 12px; font-weight: 800; }
.student-card { overflow: hidden; margin-bottom: 12px; border: 1px solid #e2dad0; border-radius: 18px; background: #fff; }
.student-card-header { display: flex; align-items: center; gap: 12px; padding: 13px; }
.student-avatar { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 15px; object-fit: cover; background: #eee7de; }
.student-name { min-width: 0; flex: 1; height: 40px; padding: 0 10px; border: 1px solid #ded5cb; border-radius: 10px; outline: none; font-size: 15px; font-weight: 800; }
.student-name:focus { border-color: #c8401a; }
.student-card-header small { color: #887c73; font-size: 10px; white-space: nowrap; }
.student-photo-strip { display: flex; gap: 5px; overflow-x: auto; padding: 0 13px 13px; scrollbar-width: none; }
.student-photo-strip::-webkit-scrollbar { display: none; }
.student-photo-item { width: 92px; flex: 0 0 92px; }
.student-photo-item img { display: block; width: 92px; height: 82px; border-radius: 9px 9px 0 0; object-fit: cover; background: #eae4dc; }
.student-photo-item select { width: 100%; height: 28px; padding: 0 3px; border: 1px solid #e2d9cf; border-top: 0; border-radius: 0 0 8px 8px; color: #6f635b; background: #fff; font-size: 9px; }
.student-publish { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 0 13px 13px; }
.student-publish button { min-height: 38px; border: 0; border-radius: 10px; color: #fff; background: #c8401a; font-size: 11px; font-weight: 800; }
.student-publish button:disabled { opacity: .5; }
.student-publish small { color: #8a7e75; font-size: 9px; }
.student-share-link { grid-column: 1 / -1; display: flex; gap: 6px; }
.student-share-link input { min-width: 0; flex: 1; height: 34px; padding: 0 8px; border: 1px solid #ded5cc; border-radius: 8px; color: #74685f; background: #faf8f4; font-size: 9px; }
.student-share-link button { min-height: 34px; padding: 0 10px; color: #1a1410; background: #ffe000; }
.unrecognized-card { margin-top: 14px; padding: 15px 2px 2px; border: 1px dashed #cbbfb4; border-radius: 18px; background: #f8f5ef; }
.unrecognized-card > div:first-child { padding: 0 13px 12px; }
.unrecognized-card strong, .unrecognized-card small { display: block; }
.unrecognized-card strong { margin-bottom: 4px; font-size: 14px; }
.unrecognized-card small { color: #847970; font-size: 10px; }

.empty-state { margin-top: 70px; padding: 36px 24px; text-align: center; }
.empty-state > span:first-child { font-size: 48px; }
.empty-state h2 { margin: 18px 0 8px; font-size: 24px; }
.empty-state p { margin: 0; color: #786d65; line-height: 1.7; }
.phase-badge { display: inline-block; margin-top: 18px; padding: 7px 12px; border-radius: 99px; color: #7b6410; background: #fff2a0; font-size: 12px !important; font-weight: 800; }

.bottom-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 6px env(safe-area-inset-bottom); border-top: 1px solid #e4ddd4; background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 0; border: 0; border-radius: 12px; background: transparent; color: #8b8179; font-size: 11px; font-weight: 700; }
.nav-item span { font-size: 21px; filter: grayscale(1); opacity: .65; }
.nav-item.active { color: #1a1410; background: #fff7bf; }
.nav-item.active span { filter: none; opacity: 1; }

.install-tip { position: fixed; z-index: 30; left: 14px; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; max-width: 480px; margin: auto; padding: 15px 42px 15px 16px; border-radius: 18px; color: #fff; background: #1a1410; box-shadow: 0 12px 38px rgba(0,0,0,.28); }
.install-tip[hidden] { display: none; }
.install-tip > span { font-size: 25px; }
.install-tip p { margin: 0; font-size: 12px; line-height: 1.5; }
.install-tip button { position: absolute; top: 6px; right: 8px; border: 0; color: #bdb4ad; background: none; font-size: 24px; }

@media (min-width: 700px) {
  .bottom-nav { left: 50%; width: 520px; transform: translateX(-50%); border: 1px solid #e4ddd4; border-bottom: 0; border-radius: 22px 22px 0 0; }
}

/* 公共档（学员分档页） */
.public-album-card { margin-top: 14px; padding: 15px 2px 8px; border: 1px dashed #d2a83f; border-radius: 18px; background: #fffaef; }
.public-album-head { padding: 0 13px 4px; }
.public-album-head strong, .public-album-head small { display: block; }
.public-album-head strong { margin-bottom: 4px; font-size: 14px; }
.public-album-head small { color: #8d7c52; font-size: 10px; }
.public-album-hint { margin: 8px 13px 2px; padding: 9px 11px; border-radius: 9px; color: #94823f; background: #fff4cf; font-size: 11px; line-height: 1.6; }
.public-cat { margin-top: 8px; }
.public-cat > p { margin: 0 13px 4px; color: #b07a18; font-size: 11px; font-weight: 800; }

/* 口令框的"眼睛"显隐按钮 */
.password-wrap { position: relative; }
.password-wrap .text-field { padding-right: 46px; }
.password-toggle { position: absolute; top: 0; right: 0; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border: 0; background: none; font-size: 18px; cursor: pointer; }

/* 2026 visual refresh: warm editorial workspace */
:root {
  --ink: #211b17;
  --ink-soft: #5f554e;
  --muted: #81756c;
  --paper: #f6f2ea;
  --surface: #fffdf9;
  --line: #e5ddd2;
  --accent: #d6532f;
  --accent-dark: #b83f20;
  --accent-soft: #f9e2d7;
  --sun: #f3c94f;
  --success: #397653;
  --shadow-sm: 0 1px 2px rgba(48, 35, 25, .05), 0 6px 18px rgba(48, 35, 25, .04);
  --shadow-md: 0 16px 40px rgba(48, 35, 25, .10);
  color: var(--ink);
  background: var(--paper);
}

html { background: var(--ink); }
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(243, 201, 79, .10), transparent 32rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}
button, label, select { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, label:focus-within, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(214, 83, 47, .24);
  outline-offset: 2px;
}

.app-header {
  min-height: 110px;
  padding: calc(20px + env(safe-area-inset-top)) 22px 20px;
  background: rgba(33, 27, 23, .97);
  box-shadow: 0 8px 28px rgba(27, 20, 16, .16);
  backdrop-filter: blur(18px);
}
.app-header > div { min-width: 0; }
.eyebrow { margin-bottom: 7px; color: var(--sun); letter-spacing: .16em; }
.app-header h1 { overflow: hidden; font-size: 21px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.photo-count { border-color: rgba(255,255,255,.16); color: #eee7df; background: rgba(255,255,255,.07); }

main { padding: 22px 16px calc(104px + env(safe-area-inset-bottom)); }
.hero-card {
  padding: 30px 24px 24px;
  border: 1px solid rgba(90, 67, 18, .08);
  border-radius: 28px;
  background: linear-gradient(145deg, #f8d66c, var(--sun));
  box-shadow: var(--shadow-md);
}
.hero-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.22), transparent 42%); pointer-events: none; }
.hero-card::after { right: -64px; top: -68px; width: 190px; height: 190px; border-width: 30px; }
.hero-kicker { margin-top: 22px; color: #614912; letter-spacing: .04em; }
.hero-card h2 { max-width: 380px; font-size: clamp(30px, 8.5vw, 38px); line-height: 1.16; }
.hero-copy { margin: 15px 0 24px; color: #675118; font-size: 14px; }
.primary-button { min-height: 56px; border-radius: 17px; background: var(--ink); box-shadow: 0 8px 20px rgba(33,27,23,.18); transition: transform .18s ease, box-shadow .18s ease; }
.primary-button:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(33,27,23,.16); }

.steps-card, .date-group, .settings-card, .publish-card, .archive-card, .recognition-progress, .student-card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.steps-card { margin-top: 18px; padding: 22px; border-radius: 24px; }
.steps-card h3 { font-size: 17px; letter-spacing: -.01em; }
.steps-card li { padding: 14px 0; border-color: #eee8df; }
.steps-card li > span { background: var(--accent); box-shadow: 0 5px 12px rgba(214,83,47,.18); }
.steps-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }

.section-heading { margin: 0 2px 14px; }
.section-heading p { color: var(--accent); letter-spacing: .08em; }
.section-heading h2 { font-size: 24px; letter-spacing: -.025em; }
.section-heading label { min-height: 42px; display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.date-group { margin-bottom: 14px; border-radius: 20px; }
.date-toggle { min-height: 60px; background: var(--surface); }
.photo-grid { gap: 7px; }
.photo-thumb { border-radius: 11px; cursor: zoom-in; }
.photo-thumb img { transition: transform .2s ease; }
.photo-thumb:active img { transform: scale(.97); }

.watermark-preview { min-height: 230px; border: 1px solid rgba(255,255,255,.08); border-radius: 24px; background: #29231f; box-shadow: inset 0 0 40px rgba(0,0,0,.18); }
.settings-card, .publish-card { padding: 20px; border-radius: 22px; }
.text-field { height: 48px; border-color: #dcd3c8; background: #fbf9f5; transition: border-color .18s, box-shadow .18s, background .18s; }
.text-field:focus, .student-name:focus, .date-note:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(214,83,47,.10); }
.position-options { gap: 6px; }
.position-options span { min-height: 42px; }
.position-options input:checked + span { border-color: var(--ink); background: var(--ink); }
.settings-card input[type="range"] { min-height: 32px; accent-color: var(--accent); }
.toggle-setting span { background: #cbc2b8; }
.toggle-setting input:checked + span { background: var(--accent); }
.logo-picker { min-height: 46px; display: grid; place-items: center; border-color: #c8bbb0; cursor: pointer; }
.watermark-actions { bottom: calc(80px + env(safe-area-inset-bottom)); padding: 9px; border: 1px solid rgba(229,221,210,.8); border-radius: 20px; background: rgba(246,242,234,.90); box-shadow: 0 10px 30px rgba(48,35,25,.10); }
.watermark-actions button, .upload-actions button { min-height: 48px; }
.secondary-button { border-color: var(--ink); background: var(--surface); }
.primary-action, .save-settings, .archive-card > button { border-color: var(--ink); background: var(--ink); transition: transform .18s ease, background .18s ease; }
.primary-action:active, .save-settings:active, .archive-card > button:active { transform: scale(.985); background: #080706; }
.course-album-button { width: 100%; min-height: 48px; border-radius: 13px; font-weight: 800; }

.publish-card-heading { align-items: flex-start; }
.publish-card-heading > span { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #efe1b4; background: #fff5cf; }
.publish-card-heading small { max-width: 350px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.cors-tip { border: 1px solid #efe2ad; color: #705b15; background: #fff9dc; }
.upload-progress { height: 8px; background: #ece5dc; }
.upload-progress span { background: linear-gradient(90deg, var(--accent), #e77a53); }
.album-button, .student-publish button { background: var(--accent); }
.album-link-row button, .student-share-link button { background: var(--sun); }
.published-date { border-color: var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }

.archive-card { padding: 30px 22px 22px; border-radius: 24px; }
.archive-icon { background: #fff0bb; }
.archive-ready { border: 1px solid #cfe4d6; background: #eaf5ed; }
.student-avatar { border-radius: 16px; }
.public-album-card { border-style: solid; border-color: #ead8a4; background: #fffbef; box-shadow: var(--shadow-sm); }
.unrecognized-card { background: rgba(255,253,249,.55); }
.empty-state { margin-top: 42px; padding: 48px 24px; border: 1px dashed #d8cec2; border-radius: 24px; background: rgba(255,253,249,.48); }

.bottom-nav {
  min-height: calc(74px + env(safe-area-inset-bottom));
  padding: 8px 8px env(safe-area-inset-bottom);
  border-color: rgba(218,209,198,.9);
  background: rgba(255,253,249,.94);
  box-shadow: 0 -10px 30px rgba(48,35,25,.06);
}
.nav-item { min-height: 56px; border-radius: 15px; color: #82776f; transition: color .18s, background .18s; }
.nav-item span { font-size: 20px; }
.nav-item.active { color: var(--ink); background: #f9e9b1; }
.viewer-close, .viewer-arrow { min-width: 44px; min-height: 44px; backdrop-filter: blur(10px); }
.toast { padding: 12px 18px; background: rgba(33,27,23,.94); box-shadow: 0 10px 30px rgba(0,0,0,.22); }

@media (hover: hover) {
  .primary-button:hover { box-shadow: 0 11px 24px rgba(33,27,23,.23); transform: translateY(-1px); }
  .date-toggle:hover, .section-heading label:hover { background: #fffaf2; }
  .photo-thumb:hover img { transform: scale(1.035); }
}
@media (min-width: 700px) {
  main { padding-top: 30px; }
  .app-header > div, .app-header > .photo-count { position: relative; }
  .app-header { padding-left: max(22px, calc((100vw - 520px) / 2)); padding-right: max(22px, calc((100vw - 520px) / 2)); }
  .bottom-nav { border-radius: 24px 24px 0 0; }
}
@media (max-width: 380px) {
  main { padding-left: 12px; padding-right: 12px; }
  .hero-card { padding: 26px 20px 21px; }
  .position-options { grid-template-columns: repeat(3, 1fr); }
  .nav-item { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Reference direction: bold yellow, pastel layers, black capsule navigation */
:root {
  --brand-blue: #0366db;
  --brand-yellow: #fee402;
  --ink: #082848;
  --paper: #fee402;
  --surface: #fff9e9;
  --accent: #0366db;
  --accent-dark: #0253b2;
  --accent-soft: #f3a9cc;
  --sun: #fee402;
  --line: rgba(3, 102, 219, .17);
  --pastel-pink: #f3a9cc;
  --pastel-blue: #a9ccec;
  --pastel-green: #fff7df;
}
html, body { background: var(--paper); }
body { background: var(--paper); }
.app-header {
  position: relative;
  min-height: 174px;
  padding-bottom: 24px;
  align-items: flex-start;
  color: var(--ink);
  background: var(--paper);
  box-shadow: none;
}
.header-lockup { display: block; width: min(100%, 350px); height: auto; pointer-events: none; }
.photo-count { position: absolute; z-index: 2; top: calc(20px + env(safe-area-inset-top)); right: 20px; border-color: rgba(3,102,219,.25); color: var(--ink); background: rgba(255,255,255,.58); }
main { padding-top: 6px; padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.hero-card {
  overflow: visible;
  padding: 16px 4px 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.hero-card::before, .hero-card::after { display: none; }
.hero-kicker { margin-top: 28px; color: var(--ink); opacity: .65; }
.hero-card h2 { max-width: 430px; font-size: clamp(38px, 11vw, 54px); font-weight: 800; line-height: .98; letter-spacing: -.06em; }
.hero-copy { max-width: 390px; color: var(--ink); opacity: .68; }
.primary-button { max-width: 340px; border-radius: 999px; background: var(--brand-blue); box-shadow: 0 8px 20px rgba(3,102,219,.22); }
.hero-card .primary-button { margin-top: 0; }
.steps-stack {
  position: relative;
  margin-top: 50px;
  isolation: isolate;
}
.steps-stack::before, .steps-stack::after {
  content: "";
  position: absolute;
  left: 0;
  height: 72px;
  border-radius: 24px 24px 0 0;
}
.steps-stack::before { z-index: -2; top: -44px; right: 46%; background: var(--pastel-pink); transform: rotate(-5deg); transform-origin: left bottom; }
.steps-stack::after { z-index: -1; top: -24px; right: 20%; background: var(--pastel-blue); transform: rotate(2deg); }
.steps-card {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 24px 20px 22px;
  border: 0;
  border-radius: 26px;
  background: var(--pastel-green);
  box-shadow: none;
}
.steps-card li { border-color: rgba(23,23,20,.10); }
.steps-card li > span { color: var(--ink); background: rgba(255,255,255,.62); box-shadow: none; }
.steps-card small { color: rgba(23,23,20,.62); }
.section-heading p { color: var(--ink); opacity: .56; }
.section-heading label { border: 0; border-radius: 999px; background: rgba(255,255,255,.62); box-shadow: none; }
.date-group, .settings-card, .publish-card, .archive-card, .recognition-progress, .student-card {
  border-color: rgba(23,23,20,.12);
  background: rgba(248,246,235,.92);
  box-shadow: none;
}
.date-group, .settings-card, .publish-card, .archive-card, .recognition-progress, .student-card, .published-date { border-radius: 24px; }
.date-toggle { background: transparent; }
.watermark-preview { border: 8px solid var(--ink); border-radius: 28px; background: var(--ink); }
.text-field { border-color: rgba(23,23,20,.15); border-radius: 999px; background: rgba(255,255,255,.72); }
.position-options span { border-color: rgba(23,23,20,.14); border-radius: 999px; background: rgba(255,255,255,.45); }
.position-options input:checked + span { border-color: var(--brand-blue); background: var(--brand-blue); }
.publish-card:nth-of-type(2) { background: var(--pastel-blue); }
.publish-card:nth-of-type(3) { background: var(--surface); }
.primary-action, .save-settings, .archive-card > button { border-color: var(--brand-blue); border-radius: 999px; background: var(--brand-blue); }
.secondary-button { border-radius: 999px; background: rgba(255,255,255,.68); }
.course-album-button { border-radius: 999px; }
.album-cover-picker { margin: 0 0 14px; }
.album-cover-picker label { display: block; overflow: hidden; min-height: 112px; border: 2px dashed rgba(3,102,219,.28); border-radius: 20px; color: var(--ink); background: rgba(255,255,255,.48); cursor: pointer; }
.album-cover-picker label > span { display: grid; min-height: 112px; padding: 20px; place-content: center; text-align: center; }
.album-cover-picker strong, .album-cover-picker small { display: block; }
.album-cover-picker strong { margin-bottom: 5px; font-size: 14px; }
.album-cover-picker small { color: rgba(8,40,72,.62); font-size: 11px; line-height: 1.5; }
.album-cover-picker img { display: block; width: 100%; height: auto; }
.album-cover-picker img:not([hidden]) + span { min-height: auto; padding: 10px; background: rgba(255,255,255,.72); }
.bottom-nav {
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  min-height: 72px;
  padding: 7px;
  border: 0;
  border-radius: 25px;
  background: var(--brand-blue);
  box-shadow: 0 14px 35px rgba(3,102,219,.28);
}
.bottom-brand { display: none; }
.page-end-brand { width: 100px; aspect-ratio: 1200 / 546; margin: 42px auto 4px; background: url("assets/footer-logo.png") center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(3,102,219,.65)); }
.nav-item { min-height: 58px; color: rgba(255,255,255,.62); }
.nav-item.active { color: #062747; background: var(--brand-yellow); }
.nav-item span { filter: grayscale(1) brightness(2); opacity: .72; }
.nav-item.active span { filter: grayscale(1); opacity: 1; }
.watermark-actions { bottom: calc(96px + env(safe-area-inset-bottom)); background: rgba(254,228,2,.90); }
.install-tip { bottom: calc(96px + env(safe-area-inset-bottom)); border: 2px solid rgba(255,255,255,.16); background: var(--brand-blue); }
@media (min-width: 700px) {
  .bottom-nav { left: 50%; right: auto; bottom: 10px; width: 500px; border-radius: 25px; }
  .photo-count { right: max(20px, calc((100vw - 520px) / 2)); }
}
.logo-fixed main { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }
.logo-fixed .page-end-brand { position: fixed; z-index: 19; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); margin: 0; transform: translateX(-50%); }
.logo-fixed .watermark-actions { bottom: calc(150px + env(safe-area-inset-bottom)); }
.logo-fixed .install-tip { bottom: calc(150px + env(safe-area-inset-bottom)); }

/* ---------- 游学项目切换卡片 ---------- */
.project-bar { margin-bottom: 16px; padding: 15px 16px 13px; border-radius: 20px; background: linear-gradient(180deg, #eaf3ff, #fbfdff); border: 1px solid #cfe2ff; box-shadow: 0 8px 24px rgba(3,102,219,.07); }
.project-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-bar-info { min-width: 0; }
.project-bar-label { margin: 0 0 2px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #5b86c4; }
#project-current { display: block; font-size: 17px; font-weight: 900; color: #0b3e83; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-new-btn { flex: 0 0 auto; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #0366db; color: #fff; font-size: 13px; font-weight: 800; }
.project-new-btn:active { transform: scale(.96); }
.project-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.project-chip { max-width: 100%; padding: 8px 14px; border: 1px solid #bcd6f6; border-radius: 999px; background: #fff; color: #1c2b3f; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-chip.on { border-color: #0366db; background: #0366db; color: #fff; }
.project-chip:active { transform: scale(.97); }
.project-new-form { margin-top: 12px; }
.project-new-form .text-field { margin-bottom: 10px; }
.project-new-actions { display: flex; gap: 8px; }
.project-new-actions .primary-action { flex: 1 1 auto; min-height: 44px; }
.project-new-cancel { flex: 0 0 auto; padding: 0 18px; min-height: 44px; border: 1px solid #cfd8e3; border-radius: 999px; background: #fff; color: #4a5666; font-weight: 800; }
.project-bar-hint { margin: 11px 2px 0; font-size: 11px; line-height: 1.5; color: #6b7f9c; }
