/* 一隅 · 随手分享台. Visual-only system; behavior remains in app.js. */
:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #fff;
  --ink: #243750;
  --muted: #536477;
  --line: #d5dee7;
  --accent: #c44419;
  --accent-soft: #fff3ed;
  --field-line: #7f90a3;
  --warning: #9a3412;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; min-height: 44px; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
main { width: 100%; max-width: 560px; margin: auto; padding: 0 20px; }
header { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; }
.brand { flex-shrink: 0; font-size: 24px; font-weight: 650; letter-spacing: 0; }
.brand-dot { color: var(--accent); font-size: 8px; vertical-align: super; margin-left: 4px; }
.tag { color: var(--muted); font-size: 13px; }
header button { margin-left: auto; font-size: 13px; }
.quiet, .text-button { background: transparent; padding: 8px 10px; white-space: nowrap; border-radius: 8px; }
.text-button { color: var(--accent); font-size: 14px; font-weight: 550; }
.store {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13px;
}
.store > span:first-child { min-width: 0; }
.store > span:last-child { flex-shrink: 0; color: var(--muted); }
.store strong { font-size: 15px; font-weight: 600; }
.store small { display: block; color: var(--muted); margin: 4px 0 0 15px; font-size: 13px; overflow-wrap: anywhere; }
p { margin: 8px 0; color: var(--muted); }
h1 { margin: 6px 0 8px; font-size: 28px; line-height: 1.35; font-weight: 600; letter-spacing: -.5px; }
h2 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
h2 span { margin-right: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.intro { padding: 22px 0 4px; }
.intro h1 br { display: none; }
.intro p { font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .3px; }
.card { margin: 0; padding: 20px 0; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.section-title h2 { min-width: 0; }
.section-title small { flex-shrink: 0; font-size: 13px; color: var(--muted); }
.muted { font-size: 13px; line-height: 1.75; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 14px; }
.upload {
  display: flex; align-items: center; justify-content: center;
  min-height: 80px; margin: 12px 0; padding: 14px;
  border: 1px dashed var(--field-line); border-radius: 12px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.photos { display: flex; gap: 10px; }
.photo { position: relative; width: calc((100% - 20px) / 3); aspect-ratio: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.photo button {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px;
  border-radius: 0 12px 0 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: 22px; line-height: 1;
}
textarea {
  display: block; width: 100%; min-height: 150px; resize: vertical;
  padding: 14px; border: 1px solid var(--field-line); border-radius: 14px;
  background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.8;
}
textarea::placeholder { color: var(--muted); opacity: 1; }
.counter { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 10px; font-size: 13px; color: var(--muted); }
.counter > span:last-child { flex-shrink: 0; }
.platform-section { padding: 20px 0 6px; }
.platform-section h2 { margin-bottom: 12px; }
.platforms { display: flex; gap: 8px; }
.platforms button {
  flex: 1; min-width: 0; padding: 10px 2px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); font-size: 14px;
}
.platforms button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.primary { padding: 12px 20px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }
.primary span { float: right; }
.secondary { padding: 12px 17px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); }
.bottom-action { padding-top: 18px; }
.bottom-action .primary { width: 100%; min-height: 50px; font-size: 16px; }
.bottom-action p { margin-top: 10px; text-align: center; font-size: 13px; }
footer { padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 12px; text-align: center; }
.sheet, .picker { color: var(--ink); background: var(--surface); }
.sheet {
  width: 100%; max-width: 560px; max-height: 85dvh; overflow-y: auto;
  margin: auto auto 0; padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 32px #24375014;
}
.sheet::backdrop, .picker::backdrop { background: #24375080; }
.sheet-handle { width: 36px; height: 4px; margin: -10px auto 24px; border-radius: 4px; background: var(--line); }
.login-logo { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 600; }
.sheet h2 { font-size: 20px; }
.sheet p { font-size: 14px; }
.sheet > .primary { width: 100%; }
.phone { margin: 20px 0; padding: 18px; background: var(--bg); border-radius: 12px; }
.phone strong { font-size: 24px; font-weight: 600; }
.phone small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.store-option { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.store-option > span:first-child { min-width: 0; font-weight: 550; }
.store-option > span:last-child { flex-shrink: 0; font-size: 14px; }
.store-option small { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.picker {
  position: fixed; inset: 0; width: 100%; max-width: 560px; height: 100dvh; max-height: 100dvh;
  margin: 0 auto; padding: 12px 20px 0; border: 0; overflow: hidden;
}
.picker[open] { display: flex; flex-direction: column; }
.picker > .section-title { flex-shrink: 0; }
#catalogCount { font-size: 13px; color: var(--muted); white-space: nowrap; }
.picker input { flex-shrink: 0; width: 100%; min-height: 46px; border: 1px solid var(--field-line); border-radius: 10px; padding: 10px 12px; background: var(--bg); font-size: 16px; color: var(--ink); }
.picker input::placeholder { color: var(--muted); opacity: 1; }
.categories { display: flex; flex-shrink: 0; gap: 8px; margin: 12px 0; padding: 3px 2px 6px; overflow-x: auto; }
.categories button { flex-shrink: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 14px; }
.categories button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#productList { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 3px 3px 16px; }
.product { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 2px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.product > span:nth-child(2) { min-width: 0; }
.product-icon { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 10px; background: var(--bg); font-size: 26px; }
.product small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.check { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; margin-left: auto; border: 1px solid var(--field-line); border-radius: 50%; }
.product.selected .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.picker-bottom { display: flex; flex-shrink: 0; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.picker-bottom .primary { min-width: 120px; }
.loading { display: flex; flex-direction: column; align-items: center; padding: 32px 0 20px; text-align: center; }
.loading-art { order: 0; display: grid; place-items: center; width: 96px; height: 96px; margin: 20px auto; border-radius: 24px; background: var(--surface); font-size: 48px; }
.loading-art i { display: none; }
.progress-list { order: 1; width: 100%; margin: 8px 0 24px; padding: 20px; border-radius: 14px; background: var(--surface); text-align: left; color: var(--ink); font-size: 16px; line-height: 2.2; }
.loading > .eyebrow { order: 2; }
.loading h1 { order: 3; margin: 10px 0 0; font-size: 18px; font-weight: 500; }
.loading > p { order: 4; font-size: 14px; }
.loading > .secondary { order: 5; width: 100%; margin-top: 32px; }
.loading > .muted { order: 6; font-size: 13px; }
.result-heading { padding: 22px 0 14px; }
.result-heading h1 { font-size: 28px; }
.result-heading p { font-size: 14px; }
#resultPage .card { padding: 20px 0; }
#resultPage .text-button { border: 1px solid var(--field-line); padding: 8px 12px; color: var(--ink); background: var(--surface); }
#title { min-height: 86px; }
#body { min-height: 240px; }
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.image-item { flex: 0 0 86%; min-width: 0; scroll-snap-align: start; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.image-item img { display: block; width: 100%; height: 300px; object-fit: contain; background: var(--surface); }
.image-item a { position: relative; display: grid; place-items: center; min-height: 48px; margin: 0; padding: 12px; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; border-top: 1px solid var(--line); }
.image-item a::before { position: absolute; top: -2px; left: 12px; width: 26px; height: 3px; background: var(--accent); content: ""; }
.result-actions { display: flex; gap: 10px; margin-top: 20px; }
.result-actions button { flex: 1; padding: 12px 8px; }
.result-actions .primary { background: var(--surface); color: var(--accent); font-weight: 500; }
.notice { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; }
.warning { padding: 10px 12px; border-left: 3px solid var(--warning); background: var(--accent-soft); color: var(--warning); font-size: 13px; }
#toast { position: fixed; z-index: 20; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 4px 20px #24375026; overflow-wrap: anywhere; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
@media (hover: hover) {
  .quiet:hover, .text-button:hover, .store-option:hover, .product:hover { background: var(--bg); }
  .primary:hover { filter: brightness(.94); }
  .image-item a:hover { background: var(--accent-soft); }
}
@media (max-width: 359px) {
  main { padding: 0 16px; }
  header { gap: 8px; }
  .tag { font-size: 11px; }
  header button { padding-right: 0; }
  h1, .result-heading h1 { font-size: 26px; }
  .sheet { padding-left: 20px; padding-right: 20px; }
  .picker { padding-left: 16px; padding-right: 16px; }
  .section-title { gap: 4px; }
  .text-button { padding-left: 6px; padding-right: 6px; }
  h2 { font-size: 16px; }
}
@media (min-width: 600px) {
  main { margin: 20px auto; }
  .sheet { margin-bottom: 24px; border-radius: 20px; }
  .picker { top: 20px; bottom: 20px; height: calc(100dvh - 40px); max-height: calc(100dvh - 40px); border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
