/* 拾光 — a quiet workspace for photographs. No remote font dependency. */
:root {
  color-scheme: light;
  --paper: #faf7f2;
  --surface: #fffdfa;
  --surface-warm: #f4ece2;
  --ink: #332a26;
  --muted: #8b7d73;
  --soft: #b2a49a;
  --accent: #b77654;
  --accent-dark: #9b5f3f;
  --accent-pale: #f0e1d5;
  --line: #e9e0d6;
  --line-strong: #d9cabe;
  --success: #63836b;
  --danger: #af5347;
  --radius: 18px;
  --sans: 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', system-ui, sans-serif;
  --serif: 'Songti SC', 'Noto Serif CJK SC', 'SimSun', Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; }
button:disabled, .busy { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #bc856a; outline-offset: 4px; }
::selection { background: #ecd5c5; color: var(--ink); }
.hidden { display: none !important; }
.icon { width: 20px; height: 20px; stroke-width: 1.65; }
.mobile-brand { display: none; }
.desktop-upload-hint { margin-top: 4px; color: var(--muted); font-size: 11px; }
.home-footer > span, .demo-note { display: flex; align-items: center; gap: 8px; }

.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 228px; padding: 40px 22px 26px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 14px 44px; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; color: var(--accent); border: 1px solid #dcc6b5; border-radius: 11px; transform: rotate(-4deg); }
.brand-mark .icon { width: 23px; height: 23px; transform: rotate(4deg); }
.brand-name { font-family: var(--serif); font-size: 23px; line-height: 1.25; letter-spacing: 4px; font-weight: 600; }
.brand-sub { display: block; margin-top: 2px; font-size: 9px; letter-spacing: 2px; color: var(--muted); }
.side-nav { display: grid; gap: 9px; }
.nav-item { display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 12px 17px; border-radius: 11px; background: transparent; color: var(--muted); text-align: left; transition: color .18s, background .18s; }
.nav-item.active { background: var(--accent-pale); color: var(--accent-dark); font-weight: 600; }
.nav-item:hover { background: #f5eee6; color: var(--ink); }
.nav-item.active:hover { background: var(--accent-pale); color: var(--accent-dark); }
.sidebar-note { margin-top: auto; padding: 18px 14px 0; color: #a5968a; font-size: 11px; line-height: 1.9; }
.sidebar-note::before { display: block; width: 25px; height: 1px; margin-bottom: 16px; background: var(--line-strong); content: ''; }
.workspace { margin-left: 228px; min-width: 0; }
.topbar { height: 83px; display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1284px; margin: auto; padding: 0 54px; }
.breadcrumb { font-size: 12px; letter-spacing: .8px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions .quiet-button { font-size: 11px; min-height: 34px; padding: 6px 11px; color: #8d7c6e; }
main { max-width: 1284px; margin: 0 auto; padding: 13px 54px 54px; }
.page { animation: page-enter .23s ease-out; }
.page-heading { margin-bottom: 30px; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--accent); font-size: 10px; line-height: 1.4; letter-spacing: 2.5px; font-weight: 600; }
h1 { font-family: var(--serif); font-size: clamp(30px, 3vw, 38px); font-weight: 600; letter-spacing: 1px; }
.subheading { margin-top: 12px; color: var(--muted); font-size: 12px; letter-spacing: .3px; }

.btn, .primary-button, .secondary-button, .quiet-button, .change-photo-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; min-height: 44px; padding: 11px 22px; line-height: 1.5; font-size: 13px; font-weight: 500; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.primary-button { background: var(--accent); color: #fffaf4; border: 1px solid var(--accent); box-shadow: 0 3px 7px #a4663710; }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.secondary-button { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); }
.secondary-button:hover:not(:disabled) { border-color: var(--accent); background: #f8f0e8; }
.quiet-button { color: var(--muted); background: transparent; border: 1px solid transparent; }
.quiet-button:hover:not(:disabled) { color: var(--ink); background: #f0e8dd; }
.danger-button { color: #fffaf7; background: #a66357; border: 1px solid #a66357; }
.danger-button:hover:not(:disabled) { background: #8d4d43; border-color: #8d4d43; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button-stack { display: grid; gap: 11px; }
.button-stack > * { width: 100%; }

.home-intro { display: grid; grid-template-columns: 1.04fr .96fr; gap: 22px; margin-bottom: 38px; }
.upload-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 276px; padding: 28px 33px; background: #f4ede4; border: 1px solid #e9dccc; border-radius: var(--radius); }
.upload-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 17px; color: var(--accent); border: 1px solid #d7bea9; border-radius: 10px; background: #faf5ee; }
.upload-icon .icon { width: 22px; height: 22px; }
.upload-card h2 { font-size: 21px; font-weight: 600; letter-spacing: .6px; }
.upload-card > p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.upload-card .primary-button { margin-top: 23px; min-width: 149px; }
.upload-meta { margin-top: 13px; color: #a18f7f; font-size: 10px; letter-spacing: .25px; }
.upload-optimization-note { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.upload-feedback { width: 100%; margin-top: 12px; }
.upload-feedback .field-help { margin-top: 0; overflow-wrap: anywhere; }
.upload-progress { display: block; width: 100%; height: 7px; margin-top: 7px; border: 0; border-radius: 8px; accent-color: var(--accent); }
.upload-progress::-webkit-progress-bar { border-radius: 8px; background: #e7d9ca; }
.upload-progress::-webkit-progress-value { border-radius: 8px; background: var(--accent); }
.upload-card .resume-draft-button { margin-top: 16px; min-height: 46px; min-width: 149px; padding: 12px 20px; color: #805036; background: #fff8ee; border-color: #be825e; font-weight: 600; box-shadow: 0 2px 6px #8050360d; }
.upload-card .resume-draft-button:hover:not(:disabled) { color: #69402c; background: #f6e7d6; border-color: #996947; }
.resume-draft-button .icon { width: 19px; height: 19px; }
.feature-preview { position: relative; min-height: 276px; overflow: hidden; border-radius: var(--radius); isolation: isolate; background: #c3b5a2; }
.preview-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background-size: 300% auto; background-repeat: no-repeat; transition: transform .6s; }
.feature-preview:hover .preview-photo { transform: scale(1.03); }
.feature-preview::after { content: ''; position: absolute; inset: 36% 0 0; z-index: -0; background: linear-gradient(transparent, #261c1780); pointer-events: none; }
.preview-caption { position: absolute; z-index: 1; left: 27px; bottom: 24px; right: 22px; color: #fffaf4; }
.preview-tag { display: block; margin-bottom: 9px; font-size: 9px; font-weight: 500; letter-spacing: 2px; }
.preview-title { display: block; font-family: var(--serif); font-size: 27px; letter-spacing: 2px; }
.preview-caption p { margin-top: 5px; font-size: 11px; opacity: .8; letter-spacing: .5px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.section-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: .8px; }
.section-kicker { display: inline-block; margin-left: 11px; color: var(--soft); font-size: 9px; letter-spacing: 2px; font-weight: 400; }
.section-note { color: var(--muted); font-size: 10px; line-height: 1.7; }
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 21px; }
.category-tab { display: inline-flex; align-items: center; justify-content: center; min-width: 74px; min-height: 46px; padding: 10px 20px; border: 1px solid #d9c5b4; border-radius: 11px; background: #fff9f1; color: #725642; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; transition: color .18s, background .18s, border-color .18s; }
.category-tab.active { background: var(--accent); border-color: var(--accent); color: #fffaf4; box-shadow: 0 3px 8px #a4663720; }
.category-tab:hover:not(.active) { color: #69432d; border-color: #b88762; background: #f7e9da; }
.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.style-card { position: relative; min-width: 0; overflow: hidden; text-align: left; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.style-card:hover { transform: translateY(-3px); border-color: #d9bba4; box-shadow: 0 8px 18px #4936220a; }
.style-cover { position: relative; aspect-ratio: 1.07; background-color: #e3d7c9; background-size: 300% auto; background-repeat: no-repeat; overflow: hidden; }
.cover-left { background-position: left 24%; }
.cover-center { background-position: center 22%; }
.cover-right { background-position: right 30%; }
.style-cover.cover-single, .choice-cover.cover-single { background-size: cover; background-position: center 20%; }
.style-tag { position: absolute; top: 13px; left: 13px; padding: 4px 9px; border: 1px solid #ffffff77; border-radius: 5px; background: #fffaf0de; color: #746257; font-size: 9px; line-height: 1.4; backdrop-filter: blur(8px); }
.style-info { position: relative; min-height: 79px; padding: 15px 18px 16px; }
.style-name { display: block; font-size: 14px; font-weight: 600; letter-spacing: .3px; }
.style-description { display: block; margin-top: 4px; padding-right: 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.style-arrow { position: absolute; right: 17px; top: 18px; width: 16px; height: 16px; color: var(--accent); }
.style-arrow .icon { width: 16px; height: 16px; }
.demo-note { margin-top: 21px; padding: 12px 15px; color: #9b8b7c; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; line-height: 1.9; background: #f7f2eb; }
.demo-note strong { font-weight: 500; color: #807163; }
.home-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--soft); font-size: 10px; }
.micro-label { font-size: 9px; letter-spacing: 2px; }

.editor-layout, .result-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .93fr); align-items: start; gap: 34px; }
.photo-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo-stage { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; min-width: 0; max-height: 590px; background: #efe9e1; overflow: hidden; }
.photo-stage img { width: 100%; height: 100%; object-fit: contain; }
.photo-label { position: absolute; left: 17px; top: 17px; padding: 4px 10px; background: #fffaf2e8; border: 1px solid #ffffffa6; border-radius: 5px; font-size: 10px; color: #746458; }
.photo-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 60px; padding: 12px 18px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.change-photo-button { flex: 0 0 auto; padding: 5px 8px; min-height: 30px; font-size: 11px; color: var(--accent); background: transparent; }
.change-photo-button:hover { background: #f4e7db; }
.editor-controls { min-width: 0; padding-top: 4px; }
.control-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; font-size: 15px; font-weight: 600; }
.step-number { width: 23px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d6c0ad; border-radius: 50%; color: var(--accent); font-family: Georgia, serif; font-size: 12px; font-weight: 400; }
.editor-controls .category-tabs { gap: 6px; margin-bottom: 14px; }
.editor-controls .category-tab { padding: 10px 14px; font-size: 12px; }
.editor-style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 29px; }
.style-choice { position: relative; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; text-align: left; transition: border-color .18s, box-shadow .18s; }
.style-choice:hover { border-color: #cba78d; }
.style-choice.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.choice-cover { height: auto; aspect-ratio: .98; background-color: #e3d7c9; background-size: 300% auto; background-repeat: no-repeat; }
.choice-title { display: block; padding: 9px 8px; font-size: 10px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choice-check { position: absolute; display: grid; place-items: center; top: 7px; right: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: white; box-shadow: 0 1px 5px #332a2620; }
.choice-check .icon { width: 12px; height: 12px; stroke-width: 2; }
.field-label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
textarea { display: block; width: 100%; min-height: 115px; resize: vertical; padding: 14px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.9; transition: border-color .18s; }
textarea::placeholder { color: #b1a295; }
textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px #b7765414; }
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-help { margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.char-count { display: block; margin-top: 6px; text-align: right; color: var(--soft); font-size: 10px; }
.submit-panel { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.submit-panel > .primary-button { width: 100%; }
.submit-panel p { margin-top: 10px; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.8; }

.processing-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: center; gap: 64px; padding: 18px 12px; }
.processing-photo { position: relative; aspect-ratio: 3 / 4; max-height: 560px; background: #eee6dc; border-radius: var(--radius); overflow: hidden; }
.processing-photo img { width: 100%; height: 100%; object-fit: contain; filter: saturate(.75); opacity: .8; }
.scan-line { position: absolute; left: 0; right: 0; height: 1px; background: #fff9df; box-shadow: 0 -12px 25px 10px #fff0d533; animation: photo-scan 3.2s ease-in-out infinite; }
.processing-content { padding: 14px 0; }
.status-orbit { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 24px; color: var(--accent); border: 1px solid #dcc5b2; border-radius: 50%; }
.status-orbit .icon { width: 26px; height: 26px; animation: orbit-breathe 2.4s ease-in-out infinite; }
.status-label { margin-bottom: 12px; font-size: 10px; color: var(--accent); letter-spacing: 2px; }
.processing-content h1 { font-size: 31px; }
.processing-detail { margin-top: 17px; color: var(--muted); font-size: 12px; line-height: 2; }
.progress-track { width: 100%; height: 3px; margin-top: 29px; background: #e8ddd0; overflow: hidden; border-radius: 8px; }
.progress-fill { width: 8%; min-width: 10px; height: 100%; background: var(--accent); border-radius: inherit; transition: width .5s ease; }
.process-steps { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.process-step { display: flex; align-items: center; gap: 5px; color: var(--soft); font-size: 10px; }
.process-step::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.process-step.active { color: var(--accent); }
.process-step.done { color: var(--success); }
.processing-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 31px; }
.processing-actions .quiet-button { padding-left: 0; }

.result-layout { grid-template-columns: minmax(0, 2fr) minmax(230px, .78fr); gap: 28px; }
.result-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 18px; min-width: 0; }
.comparison-toolbar, .comparison-panel { grid-column: 1 / -1; min-width: 0; }
.comparison-toolbar { display: flex; justify-content: flex-end; }
.comparison-toolbar .btn { min-height: 44px; }
.comparison-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.comparison-panel[hidden] { display: none; }
.result-comparison.is-slider > .result-photo { display: none; }
.comparison-help { margin-bottom: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.comparison-stage { --comparison-split: 50%; --comparison-ratio: .75; position: relative; width: 100%; max-width: calc(var(--comparison-ratio) * min(560px, 70svh)); aspect-ratio: 3 / 4; margin: 0 auto; background: #efe9e1; overflow: hidden; border-radius: 10px; touch-action: pan-y; }
.comparison-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.comparison-original-layer { position: absolute; inset: 0; background: #efe9e1; clip-path: inset(0 calc(100% - var(--comparison-split)) 0 0); pointer-events: none; }
.comparison-divider { position: absolute; inset: 0 auto 0 var(--comparison-split); width: 2px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 6px #332a264d; pointer-events: none; }
.comparison-handle { position: absolute; top: 50%; left: clamp(25px, var(--comparison-split), calc(100% - 25px)); transform: translate(-50%, -50%); display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #ffffffbd; border-radius: 50%; background: #fffdfa; box-shadow: 0 2px 12px #332a263d; color: var(--accent-dark); font-size: 28px; letter-spacing: 2px; line-height: 1; cursor: ew-resize; touch-action: pan-y; user-select: none; }
.comparison-handle[aria-disabled="true"] { opacity: .5; cursor: wait; }
.comparison-stage[data-ready="false"] .comparison-divider { visibility: hidden; }
.comparison-label { position: absolute; bottom: 12px; max-width: calc(50% - 15px); padding: 3px 9px; border-radius: 5px; background: #332a268c; color: #fff; font-size: 11px; pointer-events: none; }
.comparison-label[hidden] { display: none; }
.comparison-before-label { left: 12px; }.comparison-after-label { right: 12px; }
.comparison-load-status, .comparison-size-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.comparison-load-status[role="alert"] { color: var(--danger); }
.comparison-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.comparison-actions .btn { min-height: 46px; padding: 10px 8px; white-space: normal; }
.result-photo { display: flex; flex-direction: column; }
.result-photo.output-photo { border-color: #d2ad91; box-shadow: 0 3px 16px #a4663708; }
.result-photo-header { min-height: 79px; padding: 16px 18px; background: #f6f2ec; border-bottom: 1px solid var(--line); }
.result-photo-kicker { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; letter-spacing: 1px; line-height: 1.5; }
.result-photo-header h2 { font-size: 19px; font-weight: 600; letter-spacing: .5px; }
.output-photo .result-photo-header { background: var(--accent-pale); border-bottom-color: #d9bda6; }
.output-photo .result-photo-kicker, .output-photo .result-photo-header h2 { color: var(--accent-dark); }
.result-photo .result-stage { flex: 0 0 auto; width: 100%; aspect-ratio: 3 / 4; max-height: 520px; }
.result-photo .original-stage { background: #efebe5; }
.result-photo .output-stage { background: #efe3d7; }
.photo-save-hint { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 11px 14px; color: var(--accent-dark); background: #f5e7d7; border-bottom: 1px solid #e4cfb9; font-size: 11px; font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; }
.photo-save-hint .icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; }
.result-photo .photo-meta { min-height: 48px; padding: 10px 16px; font-size: 10px; }
.result-photo-actions { display: flex; flex-direction: column; gap: 11px; margin-top: auto; padding: 15px 16px 17px; border-top: 1px solid var(--line); }
.result-photo-actions p { min-height: 36px; color: var(--muted); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.result-photo-actions .btn { width: 100%; min-height: 46px; padding: 10px 12px; white-space: normal; text-align: center; overflow-wrap: anywhere; }
.result-photo-actions .icon { width: 17px; height: 17px; }
.result-guidance { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.result-details { min-width: 0; padding-top: 12px; }
.success-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 22px; border-radius: 50%; color: var(--success); background: #e9efe4; }
.success-mark .icon { width: 21px; height: 21px; }
.result-details h1 { font-size: 31px; }
.result-style { margin-top: 14px; color: var(--muted); font-size: 12px; }
.detail-list { margin: 26px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-list > div { display: grid; grid-template-columns: 69px minmax(0, 1fr); gap: 12px; margin-bottom: 12px; font-size: 11px; line-height: 1.8; }
.detail-list > div:last-child { margin-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: #635249; overflow-wrap: anywhere; }
.result-details .demo-note { margin-top: 20px; }

.history-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 21px; font-size: 12px; color: var(--muted); }
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work-card { min-width: 0; padding: 0; overflow: hidden; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, border-color .2s; }
.work-card:hover { transform: translateY(-3px); border-color: #d9bba4; }
.work-open { display: block; width: 100%; min-width: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.work-open:focus-visible { outline-offset: -5px; border-radius: 12px; }
.work-image { position: relative; aspect-ratio: 3 / 4; background: #eae1d7; overflow: hidden; }
.work-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.work-card:hover img { transform: scale(1.025); }
.work-version { position: absolute; top: 12px; left: 12px; padding: 4px 8px; font-size: 9px; line-height: 1.4; background: #fffaf0e8; border-radius: 5px; color: #776456; }
.work-info { padding: 15px 17px; }
.work-info h3 { font-size: 13px; font-weight: 600; }
.work-info p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.work-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 5px 9px; border-top: 1px solid var(--line); }
.save-work-button, .delete-work-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 10px 12px; background: transparent; color: #a36b5b; border: 1px solid transparent; border-radius: 8px; font-size: 11px; line-height: 1.5; transition: background .18s, color .18s; }
.save-work-button { color: #987153; }
.save-work-button .icon, .delete-work-button .icon { width: 16px; height: 16px; flex-shrink: 0; }
.save-work-button:hover:not(:disabled) { background: #f3e8db; color: #725039; }
.delete-work-button:hover:not(:disabled) { background: #f8ece5; color: #8d4d43; }
.work-save-error { padding: 4px 15px 13px; color: var(--danger); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.delete-dialog { width: min(calc(100% - 40px), 400px); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 18px 60px #332a2629; overflow: auto; }
.delete-dialog::backdrop { background: #332a2647; backdrop-filter: blur(5px); }
.delete-dialog-content { padding: 27px 25px 25px; }
.delete-dialog-content h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .4px; }
.delete-dialog-content > p { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.delete-dialog-content .delete-dialog-style { margin-top: 18px; padding: 11px 13px; background: #f6f0e8; border: 1px solid var(--line); border-radius: 9px; color: #7b6658; font-size: 12px; overflow-wrap: anywhere; }
.delete-dialog-content .delete-dialog-error { color: var(--danger); }
.delete-dialog-actions { display: flex; gap: 11px; margin-top: 24px; }
.delete-dialog-actions > button { flex: 1; min-width: 0; min-height: 46px; padding: 11px 12px; white-space: normal; overflow-wrap: anywhere; }
.empty-state, .error-state, .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 340px; padding: 35px 20px; text-align: center; }
.empty-icon { width: 65px; height: 65px; display: grid; place-items: center; margin-bottom: 21px; color: #bba58f; border: 1px solid #dfd1c2; border-radius: 20px; background: #f5eee5; }
.empty-icon .icon { width: 27px; height: 27px; }
.empty-state h2, .error-state h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.empty-state p, .error-state p { max-width: 370px; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.empty-state .primary-button, .error-state .button-row, .error-state .primary-button { margin-top: 24px; }
.loading-state { gap: 15px; color: var(--muted); font-size: 12px; }
.spinner { width: 26px; height: 26px; border: 2px solid #e9d8c9; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.offline-banner { padding: 10px 18px; background: #eee2d4; color: #886448; font-size: 11px; text-align: center; }
.toast-stack { position: fixed; z-index: 100; right: 27px; bottom: 25px; display: grid; gap: 9px; width: min(360px, calc(100vw - 40px)); pointer-events: none; }
.toast { padding: 13px 17px; border: 1px solid #d9c8b8; border-radius: 10px; box-shadow: 0 5px 20px #332a2614; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.7; animation: page-enter .2s ease-out; overflow-wrap: anywhere; }
.toast.error { background: #fff7f3; border-color: #e6c7ba; color: var(--danger); }
.toast.success { background: #f7faf3; border-color: #ccd9c2; color: #5c775b; }
.bottom-nav { display: none; }

@keyframes page-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes photo-scan { 0%, 100% { top: 8%; opacity: .2; } 50% { top: 92%; opacity: .8; } }
@keyframes orbit-breathe { 0%, 100% { opacity: .65; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }

@media (min-width: 1500px) {
  .sidebar { width: 250px; padding-left: 28px; padding-right: 28px; }
  .workspace { margin-left: 250px; }
  .topbar { padding-left: 64px; padding-right: 64px; }
  main { padding-left: 64px; padding-right: 64px; }
  .home-intro { gap: 25px; }
  .upload-card, .feature-preview { min-height: 305px; }
}

@media (max-width: 1200px) {
  .result-layout { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .result-details { padding-top: 0; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .sidebar { width: 194px; padding-left: 15px; padding-right: 15px; }
  .workspace { margin-left: 194px; }
  .brand { margin-left: 10px; gap: 8px; }
  .brand-sub { font-size: 8px; letter-spacing: 1px; }
  .nav-item { padding-left: 14px; }
  .topbar { padding: 0 30px; }
  main { padding-left: 30px; padding-right: 30px; }
  .home-intro { gap: 17px; }
  .upload-card { padding: 25px; }
  .upload-card h2 { font-size: 19px; }
  .style-grid { gap: 13px; }
  .style-info { padding-left: 13px; padding-right: 13px; }
  .style-arrow { right: 11px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); gap: 23px; }
  .editor-style-grid { gap: 7px; }
  .editor-controls .category-tab { padding: 10px 10px; }
  .processing-layout { gap: 36px; padding-left: 0; padding-right: 0; }
  .works-grid { gap: 13px; }
}

@media (max-width: 760px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { height: 67px; padding: max(10px, env(safe-area-inset-top)) 22px 9px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .breadcrumb { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 2px; color: var(--ink); }
  .topbar-actions { gap: 4px; }
  .topbar-actions .quiet-button { padding: 5px 8px; min-height: 31px; font-size: 10px; }
  main { padding: 29px 22px calc(103px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 24px; }
  .eyebrow { margin-bottom: 9px; font-size: 9px; letter-spacing: 2px; }
  h1 { font-size: 29px; letter-spacing: .5px; }
  .subheading { margin-top: 10px; font-size: 11px; line-height: 1.9; }
  .home-intro { grid-template-columns: 1fr; gap: 15px; margin-bottom: 31px; }
  .upload-card { min-height: 252px; padding: 26px; }
  .upload-icon { width: 35px; height: 35px; margin-bottom: 14px; }
  .upload-card h2 { font-size: 20px; }
  .upload-card > p { margin-top: 8px; font-size: 11px; }
  .upload-card .primary-button { margin-top: 20px; min-width: 144px; min-height: 43px; }
  .upload-card .resume-draft-button { width: 100%; margin-top: 15px; }
  .upload-meta { margin-top: 11px; font-size: 9px; }
  .feature-preview { min-height: 183px; }
  .preview-caption { left: 22px; bottom: 21px; }
  .preview-title { font-size: 24px; }
  .preview-tag { margin-bottom: 7px; font-size: 8px; }
  .section-heading { margin-bottom: 17px; gap: 8px; }
  .section-heading h2 { font-size: 18px; }
  .section-kicker { margin-left: 7px; font-size: 8px; letter-spacing: 1.5px; }
  .section-note { max-width: 103px; text-align: right; font-size: 9px; }
  .category-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 6px; margin-bottom: 17px; }
  .category-tab { min-width: 0; min-height: 46px; padding: 10px 6px; font-size: 12px; }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; }
  .style-cover { aspect-ratio: .82; }
  .style-info { min-height: 78px; padding: 12px 12px 14px; }
  .style-name { font-size: 12px; }
  .style-description { margin-top: 5px; padding-right: 7px; font-size: 9px; line-height: 1.7; }
  .style-arrow { top: 13px; right: 10px; width: 13px; height: 13px; }
  .style-arrow .icon { width: 13px; height: 13px; }
  .style-tag { top: 10px; left: 9px; padding: 3px 7px; font-size: 8px; }
  .demo-note { padding: 11px 12px; margin-top: 19px; font-size: 9px; }
  .home-footer { margin-top: 25px; padding-top: 17px; gap: 8px; font-size: 9px; }
  .micro-label { font-size: 8px; letter-spacing: 1.5px; }
  .mobile-brand { display: inline-flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 21px; letter-spacing: 2px; }
  .mobile-brand .icon { color: var(--accent); }
  .breadcrumb, .desktop-upload-hint { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; min-height: 72px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fffdfaf5; backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom-nav .nav-item { flex-direction: column; justify-content: center; gap: 4px; padding: 5px 8px; min-height: 52px; font-size: 10px; line-height: 1.4; border-radius: 10px; }
  .bottom-nav .nav-item .icon { width: 20px; height: 20px; }
  .bottom-nav .nav-item.active { background: transparent; color: var(--accent-dark); }
  .bottom-nav .nav-item:hover { background: #f6eee4; }
  .editor-layout, .result-layout { grid-template-columns: 1fr; gap: 29px; }
  .photo-stage { aspect-ratio: 4 / 4.5; max-height: 450px; }
  .photo-label { left: 13px; top: 13px; font-size: 9px; }
  .photo-meta { min-height: 54px; padding: 10px 14px; font-size: 9px; }
  .change-photo-button { font-size: 10px; padding: 5px 7px; }
  .editor-controls { padding-top: 0; }
  .control-heading { margin-bottom: 14px; font-size: 14px; }
  .editor-controls .category-tabs { gap: 6px; margin-bottom: 15px; }
  .editor-controls .category-tab { padding: 10px 6px; }
  .editor-style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
  .choice-title { padding: 9px 7px; font-size: 10px; }
  .field-label { font-size: 12px; }
  textarea { min-height: 111px; font-size: 16px; line-height: 1.8; }
  textarea::placeholder { font-size: 12px; }
  .submit-panel { margin-top: 21px; padding-top: 20px; }
  .submit-panel .primary-button { min-height: 47px; }
  .processing-layout { grid-template-columns: 1fr; padding: 0; gap: 27px; }
  .processing-photo { width: min(100%, 270px); justify-self: center; aspect-ratio: 3 / 3.5; max-height: 340px; }
  .processing-content { padding: 0 3px; text-align: center; }
  .status-orbit { width: 44px; height: 44px; margin: 0 auto 18px; }
  .status-orbit .icon { width: 21px; height: 21px; }
  .processing-content h1 { font-size: 27px; }
  .processing-detail { margin-top: 14px; font-size: 11px; }
  .progress-track { margin-top: 22px; }
  .process-steps { font-size: 9px; }
  .processing-actions { justify-content: center; margin-top: 24px; }
  .processing-actions .quiet-button { padding: 10px 15px; }
  .result-layout { gap: 25px; }
  .result-comparison { gap: 11px; }
  .result-photo { border-radius: 13px; }
  .result-photo-header { min-height: 65px; padding: 12px 11px; }
  .result-photo-kicker { font-size: 9px; letter-spacing: .5px; margin-bottom: 3px; }
  .result-photo-header h2 { font-size: 15px; letter-spacing: 0; }
  .result-photo .result-stage { aspect-ratio: 3 / 4; max-height: 440px; }
  .result-photo .photo-meta { min-height: 41px; padding: 8px 10px; font-size: 9px; gap: 4px; }
  .result-photo-actions { gap: 9px; padding: 11px 10px 13px; }
  .result-photo-actions p { min-height: 36px; font-size: 10px; line-height: 1.8; }
  .result-photo-actions .btn { gap: 5px; padding: 10px 6px; min-height: 46px; font-size: 11px; }
  .result-photo-actions .icon { width: 15px; height: 15px; }
  .result-guidance { font-size: 11px; }
  .result-details { padding-top: 0; }
  .result-details h1 { font-size: 29px; }
  .success-mark { width: 35px; height: 35px; margin-bottom: 17px; }
  .result-style { margin-top: 11px; font-size: 11px; }
  .detail-list { margin: 22px 0; padding: 17px 0; }
  .result-details .button-stack .primary-button, .result-details .button-stack .secondary-button { min-height: 46px; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
  .work-info { padding: 13px 12px; }
  .work-info h3 { font-size: 11px; }
  .work-info p { font-size: 9px; line-height: 1.9; }
  .work-actions { gap: 2px; padding: 4px 5px; }
  .save-work-button, .delete-work-button { flex: 1; min-width: 0; min-height: 44px; gap: 4px; padding: 8px 2px; font-size: 10px; }
  .save-work-button span { min-width: 0; }
  .save-work-button .icon, .delete-work-button .icon { width: 15px; height: 15px; }
  .delete-dialog-content { padding: 24px 20px 20px; }
  .delete-dialog-content h2 { font-size: 22px; }
  .delete-dialog-content > p { font-size: 12px; }
  .delete-dialog-actions { gap: 9px; margin-top: 21px; }
  .work-version { top: 9px; left: 9px; padding: 3px 7px; font-size: 8px; }
  .history-toolbar { font-size: 11px; }
  .history-toolbar .category-tabs { margin-bottom: 0; }
  .history-toolbar .category-tab[data-category="all"] { grid-column: 1 / -1; justify-self: start; padding-inline: 18px; }
  .empty-state, .error-state { min-height: 370px; padding-left: 8px; padding-right: 8px; }
  .empty-state h2, .error-state h2 { font-size: 23px; }
  .empty-state p, .error-state p { font-size: 11px; }
  .toast-stack { left: 20px; right: 20px; width: auto; bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toast { padding: 12px 14px; font-size: 11px; }
  .offline-banner { padding: 9px 20px; font-size: 10px; }
}

@media (max-width: 360px) {
  main { padding-left: 17px; padding-right: 17px; }
  .topbar { padding-left: 17px; padding-right: 17px; }
  .upload-card { padding: 24px; }
  .category-tab { padding-left: 6px; padding-right: 6px; }
  .section-kicker { display: none; }
  .editor-controls .category-tab { padding-left: 6px; padding-right: 6px; }
  .style-info { padding-left: 10px; padding-right: 10px; }
  .style-description { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scan-line { display: none; }
}

/* Registered website record, kept outside the changing application views. */
.filing-footer { margin-left: 228px; padding: 8px 24px 24px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
.filing-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; }
.filing-footer a:hover, .filing-footer a:focus-visible { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1500px) { .filing-footer { margin-left: 250px; } }
@media (max-width: 1100px) and (min-width: 761px) { .filing-footer { margin-left: 194px; } }
@media (max-width: 760px) { .filing-footer { margin-left: 0; padding-bottom: calc(90px + env(safe-area-inset-bottom)); } }
