@charset "UTF-8";
:root {
  --paper:#F7F3EA; --card:#FFFDF7; --ink:#304638; --muted:#62715F;
  --red:#B61219; --red-dark:#8F1016; --mint:#C8D7C3; --mint-line:#C8D7C3;
  --line:#DEE4D6; --gold:#A18B60;
  --serif:Georgia,'Times New Roman',serif;
  --sans:-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Noto Sans KR','Malgun Gothic',sans-serif;
  --ornament-size:clamp(42px,13.4vw,57px);
}
* { box-sizing:border-box; }
body { margin:0; background:radial-gradient(ellipse at 10% 4%,#fcfcf4 0,transparent 48%),var(--paper); color:var(--ink); font:14px/1.6 var(--sans); word-break:keep-all; }
button,a,input,textarea,summary { -webkit-tap-highlight-color:transparent; }
button,input,textarea { font:inherit; }
button { border:0; cursor:pointer; }
button:disabled { cursor:default; opacity:.48; }
a { color:inherit; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible { outline:3px solid var(--red); outline-offset:4px; }
svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.svg-defs { position:absolute; width:0; height:0; overflow:hidden; }
[hidden] { display:none!important; }
h1,h2,h3,p { margin:0; }
h2 { font-size:20px; line-height:1.4; letter-spacing:-.6px; }
.site-header { display:flex; justify-content:space-between; align-items:center; gap:12px; max-width:980px; min-height:64px; margin:auto; padding:10px 20px; border-bottom:1px solid var(--mint-line); }
.brand { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--red); text-decoration:none; }
.brand span { font:20px/1.1 var(--serif); letter-spacing:-.55px; }
.brand svg { width:23px; height:27px; stroke-width:1.2; }
.edition { flex-shrink:0; font:10px/1.4 var(--serif); color:var(--red); letter-spacing:1.7px; text-align:right; }
.edition span { display:block; margin-top:2px; font:7px/1.3 var(--sans); letter-spacing:1px; }
main { max-width:980px; margin:auto; padding:0 16px; }
.demo-banner { padding:7px 0; color:#795e40; font-size:10px; text-align:center; border-bottom:1px solid var(--line); }
.layout { max-width:430px; margin:0 auto; padding:20px 0 0; }
.intro { text-align:center; margin-bottom:18px; }
.eyebrow { font-size:9px; font-weight:600; letter-spacing:1.7px; }
.intro .eyebrow { color:var(--red); font-size:8px; letter-spacing:1.8px; }
h1 { margin:6px 0; font:normal clamp(30px,8.7vw,38px)/1.12 var(--serif); letter-spacing:-1.4px; color:var(--red); }
.intro-copy { color:var(--muted); font-size:12px; }
.event-meta { margin-top:7px; color:var(--muted); font-size:10px; }
.paper-note,.how-it-works { display:none; }
.collection { background:var(--card); border:1px solid var(--mint-line); border-radius:100px 100px 10px 10px/30px 30px 10px 10px; padding:19px 16px 14px; box-shadow:0 9px 28px #324b3610; }
.collection-topline { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:7px; letter-spacing:1.2px; }
.board-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:13px 0 10px; }
.board-heading h2 { font-size:17px; font-weight:600; }
.count { display:flex; align-items:baseline; gap:4px; flex-shrink:0; line-height:1; color:var(--red); }
.count strong { font:normal 30px/.95 var(--serif); }
.count>span { font-size:11px; }
.count small { display:block; font:9px/1.2 var(--serif); letter-spacing:.1px; margin-top:3px; }
progress { display:block; width:100%; height:3px; border:0; appearance:none; border-radius:3px; overflow:hidden; color:var(--red); background:var(--mint); }
progress::-webkit-progress-bar { background:var(--mint); }
progress::-webkit-progress-value { background:var(--red); transition:width .3s; }
progress::-moz-progress-bar { background:var(--red); }
.progress-caption { margin:6px 0 0; text-align:center; font-size:10px; color:var(--muted); }
.tree-stage { position:relative; padding-top:27px; padding-bottom:14px; margin-top:2px; isolation:isolate; }
.tree-star { position:absolute; top:0; left:calc(50% - 12px); width:24px; height:24px; color:var(--gold); fill:#f3e8c8; stroke-width:1.1; }
.tree-backdrop { position:absolute; z-index:-1; inset:28px 0 12px; width:100%; height:calc(100% - 40px); stroke-width:.7; }
.tree-silhouette { fill:var(--mint); fill-opacity:.2; stroke:var(--mint); }
.tree-garland { stroke:var(--mint); stroke-dasharray:1 4; }
.stamp-tree { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); grid-auto-rows:calc(var(--ornament-size) + 30px); gap:0; padding:0; margin:0; list-style:none; }
.stamp-item { position:relative; text-align:center; min-width:0; padding:6px 2px 0; grid-column:span 2; }
.stamp-item:nth-child(1) { grid-column:4 / span 2; grid-row:1; }
.stamp-item:nth-child(2) { grid-column:3 / span 2; grid-row:2; }
.stamp-item:nth-child(3) { grid-column:5 / span 2; grid-row:2; }
.stamp-item:nth-child(4) { grid-column:2 / span 2; grid-row:3; }
.stamp-item:nth-child(5) { grid-column:4 / span 2; grid-row:3; }
.stamp-item:nth-child(6) { grid-column:6 / span 2; grid-row:3; }
.stamp-item:nth-child(7) { grid-column:1 / span 2; grid-row:4; }
.stamp-item:nth-child(8) { grid-column:3 / span 2; grid-row:4; }
.stamp-item:nth-child(9) { grid-column:5 / span 2; grid-row:4; }
.stamp-item:nth-child(10) { grid-column:7 / span 2; grid-row:4; }
.stamp-seal { position:relative; display:grid; place-items:center; width:var(--ornament-size); height:var(--ornament-size); margin:0 auto 4px; color:#7D8B75; background:#F3F6EF; border:1px dashed var(--mint); border-radius:50%; }
.stamp-seal:before { content:''; position:absolute; top:-5px; left:calc(50% - 6px); width:12px; height:5px; background:var(--mint); border-radius:2px 2px 0 0; }
.stamp-seal:after { content:''; position:absolute; top:-10px; left:calc(50% - 3px); width:6px; height:6px; border:1px solid var(--mint); border-radius:50%; }
/* Artwork box stays identical in both states. Future drawings cannot resize the ornament. */
.stamp-art { display:grid; place-items:center; width:calc(var(--ornament-size) * .52); height:calc(var(--ornament-size) * .52); overflow:hidden; transform:translateY(-2px); opacity:.48; }
.stamp-art>svg { display:block; width:100%; height:100%; fill:none; color:inherit; }
.stamp-number { position:absolute; bottom:2px; left:0; width:100%; color:inherit; opacity:.9; font:8px/1 var(--serif); letter-spacing:.4px; }
.stamp-name { display:block; overflow:hidden; max-height:15px; font-size:10px; line-height:1.3; white-space:nowrap; text-overflow:ellipsis; }
.stamp-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.stamp-item.collected .stamp-seal { background:var(--red); border:1px solid var(--red); color:var(--card); box-shadow:0 2px 0 #8F1016; transform:rotate(-4deg); }
.stamp-item.collected .stamp-seal:before { background:var(--red); }
.stamp-item.collected .stamp-seal:after { border-color:var(--red); }
.stamp-item.collected .stamp-art { opacity:1; }
.stamp-item.collected .stamp-number { opacity:1; font-weight:700; }
.stamp-impression { position:absolute; inset:3px; border:1px solid #FFFDF7C7; border-radius:50%; pointer-events:none; }
.stamp-item.collected .stamp-name { color:var(--red-dark); font-weight:600; }
.stamp-check { position:absolute; right:-2px; bottom:1px; display:grid; place-items:center; width:16px; height:16px; border:1px solid var(--red); border-radius:50%; background:var(--card); color:var(--red); }
.stamp-check svg { width:11px; height:11px; stroke-width:2; }
.stamp-item.just-added .stamp-seal { animation:ornament-in .35s ease-out; }
.tree-trunk { display:block; width:15px; height:13px; margin:0 auto; background:#b9b9a0; border-radius:0 0 3px 3px; }
.tree-legend { display:flex; align-items:center; justify-content:center; gap:12px; margin:0 0 10px; font-size:9px; color:var(--muted); }
.tree-legend span { display:flex; align-items:center; gap:4px; }
.tree-legend span:last-child { margin-left:auto; font-size:8px; }
.tree-legend i { width:7px; height:7px; border:1px dashed var(--mint); border-radius:50%; background:transparent; }
.tree-legend .legend-collected { background:var(--red); border-color:var(--red); }
.board-bottom { border-top:1px solid var(--line); padding-top:10px; text-align:center; font:10px/1.2 var(--serif); letter-spacing:1.3px; color:var(--red); }
.board-bottom span { display:block; font:9px/1.4 var(--sans); letter-spacing:0; color:var(--muted); margin-top:4px; }
.actions { margin-top:14px; }
.button { width:100%; min-height:52px; display:flex; align-items:center; justify-content:center; gap:12px; padding:13px 15px; border-radius:5px; font-size:14px; font-weight:600; text-align:center; text-decoration:none; line-height:1.5; }
.button svg { width:21px; height:21px; }
.primary { color:#fffaf2; background:var(--red); }
.primary:hover:not(:disabled) { background:var(--red-dark); }
.secondary { color:var(--ink); border:1px solid #a7c1b0; background:transparent; }
.secondary:hover:not(:disabled) { background:var(--mint); }
.scan-button { justify-content:flex-start; }
.scan-button svg:last-child { margin-left:auto; }
.action-caption { margin:7px 0 15px; color:var(--muted); font-size:11px; text-align:center; }
.text-button { min-height:44px; padding:9px 3px; font-size:12px; color:var(--red); text-decoration:underline; text-underline-offset:4px; background:none; }
.recovery-entry { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--mint-line); padding-top:12px; margin-bottom:9px; }
.recovery-entry strong { font-size:12px; font-weight:600; }
.recovery-entry p { font-size:10px; color:var(--muted); margin-top:3px; }
.recovery-entry .text-button { flex-shrink:0; }
.fine-print { font-size:11px; line-height:1.75; color:var(--muted); }
.help { margin-top:12px; border-top:1px solid var(--mint-line); font-size:12px; color:var(--muted); }
summary { display:list-item; min-height:44px; padding:11px 0; cursor:pointer; color:var(--ink); font-size:12px; }
.help p { margin:0 0 12px; }
.pending-panel { margin-bottom:14px; border:1px solid #bd8d86; padding:17px; border-radius:7px; background:#fff7ee; }
.pending-panel .eyebrow { color:var(--red); }
.pending-panel h2 { margin:5px 0; }
.pending-panel p:not(.eyebrow) { font-size:12px; margin:7px 0 13px; color:var(--muted); }
.pending-panel .text-button { display:block; margin:4px auto -7px; }
.reward-panel { text-align:center; background:#f9f0e7; border:1px solid #d6b5a4; border-radius:7px; padding:20px 16px; margin-bottom:14px; }
.reward-flower { width:36px; height:36px; color:var(--gold); fill:#f3e8c8; stroke-width:1.1; }
.reward-panel .eyebrow { color:var(--red); margin:6px 0; font-size:8px; letter-spacing:1.4px; }
.reward-panel h2 { font-size:21px; color:var(--red); margin-bottom:8px; }
.reward-panel>p:not(.eyebrow) { font-size:12px; }
.reward-panel #reward-date { margin-top:6px; font-size:11px; }
.reward-panel .warning-text { margin:14px 0 10px; padding:10px 12px; border-left:2px solid var(--red); background:#fff9f2; text-align:left; color:#7a3f38; font-size:12px!important; }
.error-text { margin-top:10px; color:var(--red-dark); font-size:12px; }
.notice { background:#e1ece1; border:1px solid var(--mint-line); border-radius:5px; color:var(--ink); margin:12px 0; padding:12px 14px; font-size:12px; }
.notice p { margin:6px 0 0; }
.error,.danger { background:#f8e9e3; color:var(--red-dark); border-color:#dfb9ac; }
.loading { padding:80px 0; text-align:center; color:var(--muted); }
.site-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; max-width:948px; margin:24px auto 0; padding:18px 16px max(24px,env(safe-area-inset-bottom)); border-top:1px solid var(--mint-line); color:var(--red); }
.site-footer span:first-child { font:italic 14px var(--serif); }
.site-footer span:last-child { font-size:7px; letter-spacing:1px; }
.toast { position:fixed; z-index:20; bottom:calc(18px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 28px); padding:13px 18px; color:#fffaf2; background:var(--ink); border-radius:5px; font-size:13px; box-shadow:0 6px 24px #22382a25; text-align:center; }
.toast.is-error { background:var(--red-dark); }
dialog { width:calc(100% - 24px); max-width:430px; max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); padding:20px; color:var(--ink); background:var(--card); border:1px solid var(--mint-line); border-radius:9px; overflow:auto; box-shadow:0 20px 70px #14261933; }
dialog::backdrop { background:#21352acc; backdrop-filter:blur(3px); }
dialog p { font-size:13px; margin:12px 0; }
dialog .eyebrow { color:var(--red); margin:0 0 4px; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dialog-heading h2 { font-size:19px; }
.icon-button { width:44px; height:44px; flex-shrink:0; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:transparent; font-size:29px; line-height:1; }
.dialog-copy { font-size:12px; color:var(--muted); }
.camera-view { aspect-ratio:1; position:relative; overflow:hidden; border-radius:4px; background:#24332b; }
/* V1.1 scanner coordinate contract: preserve this mapping exactly. */
.camera-view video { width:100%; height:100%; position:absolute; inset:0; display:block; object-fit:cover; object-position:50% 50%; transform:none; }
.viewfinder { position:absolute; inset:18%; border:2px solid #fffc; border-radius:0; box-shadow:0 0 0 80px #0003; pointer-events:none; }
.viewfinder:before,.viewfinder:after { content:''; position:absolute; left:50%; top:50%; background:#fff; transform:translate(-50%,-50%); opacity:.85; }
.viewfinder:before { width:17px; height:1px; }
.viewfinder:after { width:1px; height:17px; }
.camera-view>span { position:absolute; bottom:12px; left:0; width:100%; text-align:center; color:#fff; font-size:10px; }
.scanner-status { min-height:22px; font-size:12px; }
.scan-results { list-style:none; padding:0; margin:10px 0; max-height:120px; overflow:auto; font-size:12px; }
.scan-results li { display:flex; justify-content:space-between; gap:10px; border-top:1px solid var(--line); padding:7px 0; }
.scan-results span { font-size:11px; color:var(--muted); }
dialog .button+.button { margin-top:10px; }
textarea { width:100%; padding:12px; font-size:16px; color:var(--ink); background:#f0f5ee; border:1px solid var(--mint-line); resize:vertical; overflow-wrap:anywhere; }
#generated-link { margin-top:14px; }
#generated-link label { display:block; margin:10px 0; font-size:11px; }
.checkbox-label { display:flex; align-items:flex-start; gap:10px; font-size:12px; line-height:1.7; margin:18px 0; }
.checkbox-label input { flex-shrink:0; width:20px; height:20px; margin-top:3px; accent-color:var(--red); }
#restore-dialog .button { margin-top:12px; }
@keyframes ornament-in { from { transform:rotate(-8deg) scale(1.08); opacity:.4; } to { transform:rotate(-4deg) scale(1); opacity:1; } }
@media(max-width:360px) {
  main { padding:0 12px; }
  .site-header { min-height:58px; padding:7px 12px; }
  .brand span { font-size:18px; }
  .brand svg { width:19px; }
  .edition { font-size:9px; letter-spacing:1px; }
  .edition span { font-size:6px; letter-spacing:.5px; }
  .layout { padding-top:13px; }
  .intro { margin-bottom:12px; }
  .intro .eyebrow { font-size:7px; letter-spacing:1.4px; }
  .intro-copy { font-size:11px; }
  .event-meta { margin-top:4px; font-size:9px; }
  .collection { padding:16px 12px 12px; }
  .collection-topline { font-size:6px; letter-spacing:.8px; }
  .board-heading { margin:10px 0 8px; }
  .board-heading h2 { font-size:15px; }
  .count strong { font-size:27px; }
  .progress-caption { font-size:9px; }
  .stamp-name { font-size:9px; max-height:21px; }
  .tree-legend { gap:8px; font-size:8px; }
  .tree-legend span:last-child { font-size:7px; }
  .board-bottom { font-size:9px; padding-top:8px; }
  .recovery-entry { flex-wrap:wrap; gap:2px; }
  .recovery-entry .text-button { margin-left:auto; }
}
@media(max-width:820px) and (max-height:700px) {
  :root { --ornament-size:42px; }
  .layout { padding-top:12px; }
  .intro { margin-bottom:11px; }
  h1 { font-size:30px; margin:4px 0; }
  .collection { padding-top:15px; }
  .tree-stage { padding-top:23px; padding-bottom:8px; }
  .tree-star { width:20px; height:20px; left:calc(50% - 10px); }
  .board-heading { margin-top:9px; }
}
@media(min-width:821px) {
  :root { --ornament-size:57px; }
  .site-header { padding:23px 30px; }
  .brand span { font-size:27px; }
  .brand svg { width:29px; height:32px; }
  .edition { font-size:14px; letter-spacing:2px; }
  .edition span { font-size:8px; margin-top:5px; }
  main { padding:0 30px; }
  .demo-banner { text-align:left; }
  .layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,430px); gap:0 60px; max-width:none; padding-top:48px; }
  .intro { grid-column:1; grid-row:1 / span 3; align-self:start; text-align:left; padding-top:44px; }
  h1 { font-size:62px; line-height:1.06; margin:19px 0; letter-spacing:-2.3px; max-width:330px; }
  .intro .eyebrow { font-size:8px; letter-spacing:1.4px; }
  .intro-copy { max-width:260px; font-size:14px; line-height:1.9; }
  .event-meta { margin-top:21px; font-size:12px; }
  .paper-note { display:flex; align-items:center; gap:13px; margin:37px 0; color:var(--red); }
  .paper-note svg { width:36px; height:36px; stroke-width:1; }
  .paper-note p { font-size:12px; line-height:1.9; }
  .how-it-works { display:block; max-width:300px; border-top:1px solid var(--mint-line); padding-top:22px; }
  .small-heading { font-size:13px; font-weight:600; }
  .how-it-works ol { list-style:none; padding:0; margin:13px 0 18px; }
  .how-it-works li { display:flex; gap:12px; margin:8px 0; font-size:12px; }
  .how-it-works li span { color:var(--red); font:italic 13px var(--serif); padding-top:4px; }
  .pending-panel,.collection,.actions { grid-column:2; }
  .collection { padding:24px 24px 17px; }
  .board-heading h2 { font-size:19px; }
  .collection-topline { font-size:8px; }
  .progress-caption { font-size:11px; }
  .stamp-name { font-size:11px; max-height:25px; }
  .stamp-tree { grid-auto-rows:calc(var(--ornament-size) + 31px); }
  .site-footer { margin-top:45px; padding-left:0; padding-right:0; }
}
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { animation:none!important; transition:none!important; } }
