/* PnR TOUR 2026 시즌 카드 발급 — 사이트 공통(site.css · tour-editorial.css · rankings/style.css) 위에 얹는 규칙.
   전광판 플랫 × 스포츠 에디토리얼: 직각, 잉크 1px, 벽돌색 주 버튼, Barlow Condensed 숫자·라벨. */
.card-page .hero-events { color: var(--muted); }
.card-main { padding-block: 0 clamp(48px, 7vw, 88px); }
.step-label, .ctl-label, .issue-board small { font: 700 14px/1 var(--tour-heading); letter-spacing: .08em; text-transform: uppercase; }

/* STEP 1 찾기 */
.issue-find { margin-top: 26px; max-width: 640px; }
.issue-find .step-label { color: var(--red); }
.issue-find h2 { margin-top: 8px; font-size: clamp(26px, 3.2vw, 36px); font-weight: 820; letter-spacing: -.045em; line-height: 1.15; }
.find-copy, .find-hint { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.find-hint { font-size: 13px; }
.card-search { margin-top: 18px; }
.card-search .input-wrap { position: relative; }
.card-search .input-wrap input { width: 100%; min-height: 54px; padding: 0 16px 0 44px; border: 1px solid var(--ink); background: #fff; font-size: 17px; }
.card-search .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.card-results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ink); border-top: 0; background: #fff; }
.card-results:empty { display: none; }
.card-results li + li { border-top: 1px solid var(--line); }
.card-results button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 13px 16px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.card-results button:hover, .card-results button:focus-visible { background: #f4f0e9; outline: none; }
.card-results .r-name { display: grid; gap: 2px; min-width: 0; }
.card-results strong { font-size: 17px; font-weight: 760; }
.card-results small { color: var(--muted); font-size: 12px; }
.card-results .r-rec { font: 700 20px/1 var(--tour-heading); font-variant-numeric: tabular-nums; }
.card-results .r-go { color: var(--red); font-size: 13px; font-weight: 750; white-space: nowrap; }
.card-results .empty { padding: 14px 16px; color: var(--muted); font-size: 14px; }
.has-player .issue-find { display: none; }
.no-player .issue, .no-player .issue-dock { display: none; }

/* 발급 보드: 홈 feature-board와 같은 전광판 */
.issue { margin-top: 26px; }
.issue-board { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 15px 22px 17px; border-inline-start: 3px solid var(--tour-red); background: #222220; color: #f5f2eb; }
.issue-board small { display: block; margin-bottom: 4px; color: #d0cbc2; font-size: 12px; }
.issue-no b { color: var(--tour-red); font: 700 clamp(24px, 3vw, 34px)/1 var(--tour-heading); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.issue-id { display: grid; gap: 4px; min-width: 0; }
.issue-state { justify-self: start; padding: 3px 7px 2px; border: 1px solid var(--tour-red); color: var(--tour-red); font: 700 12px/1 var(--tour-heading); letter-spacing: .08em; }
.issue-id strong { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.035em; }
.issue-date { text-align: right; }
.issue-date b { font: 700 22px/1 var(--tour-heading); font-variant-numeric: tabular-nums; }

.maker { display: grid; gap: 24px 40px; margin-top: 24px; }
figure { margin: 0; }
.sticker-stage { width: min(100%, 320px); aspect-ratio: 9/16; margin-inline: auto; overflow: hidden; border: 1px solid var(--ink); background: var(--dark); }
.sticker-stage canvas { display: block; width: 100%; height: auto; }
.sticker-stage[data-editable=true] canvas { touch-action: none; cursor: grab; }
figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; text-align: center; }

.controls { display: grid; align-content: start; background: #fff; border: 1px solid var(--ink); min-width: 0; }
.ctl-block { display: grid; gap: 12px; padding: 18px 20px; }
.ctl-block + .ctl-block { border-top: 1px solid var(--line); }
.ctl-label { color: var(--muted); }
.ctl-label span { margin-left: 6px; color: var(--line); }
.issue-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.issue-table th, .issue-table td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: right; font-size: 15px; }
.issue-table th:first-child { text-align: left; font-weight: 650; }
.issue-table thead th { padding-top: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.issue-table tfoot th, .issue-table tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); font: 700 22px/1 var(--tour-heading); padding-top: 12px; }
.issue-table tfoot td:nth-child(3) { color: var(--red); }
.fix-link { justify-self: start; font-size: 13px; }

.photo-picker { position: relative; }
.photo-picker input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; clip-path: inset(50%); }
.photo-picker label.outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; cursor: pointer; justify-self: start; }
.photo-picker:has(input:focus-visible) label { outline: 2px solid var(--red); outline-offset: 3px; }
.photo-row, .save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-row .outline, .save-row .outline, .save-row .primary { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.save-row .primary { flex: 1 1 140px; font-size: 15px; }
.save-row .outline { flex: 0 1 auto; }
.image-open { justify-self: start; font-size: 13px; }
.save-row :disabled, .save-row [aria-disabled=true], .image-open[aria-disabled=true] { opacity: .45; cursor: default; pointer-events: none; }
.zoom-controls { display: grid; gap: 4px; }
.zoom-controls label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.zoom-controls input { width: 100%; accent-color: var(--red); }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); background: var(--dark); cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch span { width: 22px; height: 22px; background: var(--accent); pointer-events: none; }
.swatch:has(input:checked) { box-shadow: inset 0 0 0 2px var(--tour-red); border-color: var(--tour-red); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch-yellow { --accent: #FFE34E; } .swatch-white { --accent: #FFF1D8; } .swatch-mint { --accent: #98F4CF; } .swatch-coral { --accent: #FFA090; }
.custom-swatch { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; cursor: pointer; }
.custom-swatch[aria-expanded=true] { border-color: var(--ink); }
.custom-swatch-dot { width: 16px; height: 16px; background: var(--custom-accent, #ffe34e); border: 1px solid var(--ink); }
.color-custom-body { display: grid; grid-template-columns: max-content 46px max-content minmax(70px, 130px); align-items: center; gap: 8px 10px; font-size: 13px; font-weight: 700; }
.color-custom-body input { min-height: 44px; border: 1px solid var(--line); border-radius: 0; background: #fff; }
.color-custom-body input[type=text] { padding: 0 8px; font: 15px ui-monospace, monospace; }
.color-custom-body .help { grid-column: 1 / -1; }
.help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
p.help:empty { display: none; }
ol.help { padding-left: 18px; }
.not-me { padding: 14px 20px 18px; border-top: 1px solid var(--line); font-size: 13px; }

/* 발급 기준 */
.issue-rules { margin-top: clamp(40px, 6vw, 64px); padding-top: 20px; border-top: 1px solid var(--ink); }
.issue-rules h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.issue-rules dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; margin-top: 10px; }
.issue-rules dl > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.issue-rules dt { font-size: 14px; font-weight: 750; }
.issue-rules dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* 휴대폰 하단 고정 저장 바 */
.issue-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none; gap: 8px; padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--ink); }
.issue-dock button { min-height: 48px; flex: 1; }
.issue-dock .primary { flex: 1.4; }

@media (min-width: 760px) {
  .maker { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; }
  .stage-group { position: sticky; top: 20px; }
}
@media (max-width: 759px) {
  .issue-board { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; padding: 13px 14px 14px; }
  .issue-id { grid-column: 1 / -1; grid-row: 1; }
  .issue-date b { font-size: 18px; }
  .sticker-stage { width: min(100%, 280px); }
  .ctl-block { padding: 16px; }
  .not-me { padding-inline: 16px; }
  .issue-dock.show { display: flex; }
  .has-player .site-footer { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: no-preference) { .card-results button { transition: background .12s; } }
@media (max-width: 759px) {
  .card-page .hero-inner { padding: 20px 0 16px; }
  .card-page .hero h1 { font-size: 34px; }
  .has-player .card-page .hero-events, .has-player .hero-events { display: none; }
  .has-player .rank-season-links { margin-top: 0; }
  .issue { margin-top: 14px; }
}

/* 발급 예시 */
.issue-find { max-width: none; display: grid; gap: 28px 56px; }
.find-main { max-width: 600px; min-width: 0; }
.find-example { margin: 0; justify-self: center; }
.example-stack { position: relative; width: 220px; aspect-ratio: 9/16; }
.example-stack img { position: absolute; top: 0; width: 100%; height: auto; border: 1px solid var(--ink); background: var(--dark); }
.example-stack img:first-child { left: 34px; transform: rotate(5deg); transform-origin: bottom left; opacity: .9; }
.example-stack img:last-child { left: 0; transform: rotate(-2deg); }
.find-example figcaption { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.find-example figcaption b { margin-right: 6px; color: var(--red); font: 700 13px/1 var(--tour-heading); letter-spacing: .08em; }
@media (min-width: 860px) { .issue-find { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .find-example { padding-top: 8px; } }
@media (max-width: 859px) { .find-example { justify-self: stretch; } .example-stack { width: 150px; margin-inline: auto; transform: translateX(-22px); } .example-stack img:first-child { left: 26px; } }

/* 02 색상: 승패 / 글자 */
.sub-label { margin: 2px 0 -4px; font-size: 13px; font-weight: 750; }
.sub-label small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 550; }
.swatch[class*="tone-"] span { width: auto; height: auto; background: none; color: var(--tone); font: 800 20px/1 var(--copy); }
.tone-white { --tone: #FFF7ED; } .tone-cream { --tone: #F3E2C3; } .tone-mint { --tone: #C9F5E4; }
.tone-ink { --tone: #201F1C; background: #e9e4da; }
.tone-custom { position: relative; }
.tone-custom input[type=color] { width: 22px; height: 22px; padding: 0; border: 1px solid var(--ink); background: none; cursor: pointer; }
.save-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }
