/* Tumbler wrap tool. Standalone styling. Reuses the site's dark tokens
   (see content.css) but defines its own tool chrome so app.css is untouched. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --bg: #1a1a1a;
  --panel: #222;
  --panel-2: #252525;
  --line: #2e2e2e;
  --text: #f0eee8;
  --muted: #bbb;
  --soft: #888;
  --accent: #e8a87c;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Header / footer chrome ──────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.6rem;
  border-bottom: 1px solid #2a2a2a;
}
.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}
.tool-nav { display: flex; gap: .9rem; flex-wrap: wrap; }
.tool-nav a {
  font-size: 13px;
  color: #aaa;
  text-decoration: none;
  border-bottom: 1px dotted #555;
  white-space: nowrap;
}
.tool-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.site-footer {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 1.5rem 1.6rem 3rem;
  border-top: 1px solid #2a2a2a;
  font-size: 12px;
  color: #777;
}
.site-footer p { margin-bottom: .5rem; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.legal-links { color: #555; }

/* ── Intro ───────────────────────────────────────────────── */
.intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.4rem 1.6rem 1rem;
}
.kicker {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 750;
  line-height: 1.12;
  margin-bottom: .7rem;
}
.intro .tagline { font-size: 16px; color: #d5d0c7; max-width: 680px; }
.intro .tagline a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted rgba(232,168,124,.55); }

/* ── Tool layout ─────────────────────────────────────────── */
.tool {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
  max-width: 1180px;
  margin: 1.25rem auto 0;
  padding: 0 1.6rem;
  align-items: start;
}
@media (max-width: 820px) { .tool { grid-template-columns: 1fr; } }

.controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem 1.15rem 1.3rem;
}
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #ded8cf;
  margin-bottom: .35rem;
  letter-spacing: .02em;
}
.field-row { display: flex; gap: .55rem; }
.field-row .field { flex: 1; margin-bottom: 0; }
.overlap-field { margin-top: .9rem; }

select, input[type="number"] {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .55rem .65rem;
  font-family: inherit;
  font-size: 14px;
}
select:focus, input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 1.5rem 0 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.section-label.first { border-top: 0; padding-top: 0; margin-top: 0; }

.dropzone {
  display: block;
  border: 1.5px dashed #3a3a3a;
  border-radius: 8px;
  padding: 1.1rem .9rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--accent);
  background: rgba(232,168,124,.06);
}
.dropzone .dz-title { display: block; font-size: 13px; color: #ded8cf; font-weight: 600; }
.dropzone .dz-sub { display: block; font-size: 11.5px; line-height: 1.4; color: var(--soft); margin-top: .3rem; }
.dropzone input[type="file"] { display: none; }
.file-name { display: block; font-size: 11.5px; color: var(--accent); margin-top: .5rem; word-break: break-all; }

.shape-readout {
  margin-top: .9rem;
  font-size: 12px;
  color: var(--muted);
}
.shape-readout strong { color: var(--accent); }

.btn-row { display: flex; flex-direction: column; gap: .55rem; margin-top: 1.1rem; }
.btn {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: .7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: rgba(232,168,124,.5); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { opacity: .9; }

.check-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 12px;
  color: var(--muted);
  margin-top: -.35rem;
}
.check-row input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

/* ── Preview ─────────────────────────────────────────────── */
.stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
  min-height: 360px;
}
.canvas-wrap {
  background:
    repeating-conic-gradient(#2a2a2a 0% 25%, #232323 0% 50%) 50% / 22px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 1rem;
  min-height: 320px;
}
#preview { max-width: 100%; height: auto; display: block; }
.dims {
  font-size: 12px;
  color: var(--muted);
  margin-top: .8rem;
  font-variant-numeric: tabular-nums;
}
.status { font-size: 12px; color: var(--accent); margin-top: .4rem; min-height: 1em; }
.stage-tip { font-size: 11.5px; color: var(--soft); margin-top: .6rem; }

/* ── Supplies (affiliate) ────────────────────────────────── */
.supplies {
  background: #171717;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: .9rem 1rem;
  margin-top: 1.1rem;
}
.supplies .sup-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .5rem; margin-bottom: .45rem;
}
.supplies strong { font-size: 12px; color: var(--text); }
.supplies .sup-label {
  font-size: 10.5px;
  color: #8f877d;
  white-space: nowrap;
}
.supplies .sup-disc {
  font-size: 10.5px;
  line-height: 1.35;
  color: #a79f96;
  margin: 0 0 .75rem;
  padding: .4rem .5rem;
  background: #202020;
  border: 1px solid #303030;
  border-radius: 6px;
}
.supplies-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.supplies .supply {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 48px;
  background: #202020;
  border: 1px solid #303030;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  padding: .45rem .55rem;
  transition: background .15s, border-color .15s, color .15s;
}
.supplies .supply:hover,
.supplies .supply:focus-visible {
  color: var(--text);
  background: #24211f;
  border-color: rgba(232,168,124,.5);
  outline: none;
}
.supply-thumb {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #433c34;
  background: #f6f3ee;
}
.supply-thumb::before,
.supply-thumb::after {
  content: "";
  position: absolute;
  display: block;
}
.supply-copy { min-width: 0; }
.supply-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: #f0eee8;
}
.supply-meta {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.25;
  color: #9f978f;
}
.thumb-tumbler::before {
  left: 11px;
  top: 5px;
  width: 14px;
  height: 25px;
  border-radius: 6px 6px 4px 4px;
  background: linear-gradient(90deg, #d7eee8 0 18%, #8bc7b5 18% 72%, #5f9d87 72%);
  border: 1px solid #4f8977;
}
.thumb-tumbler::after {
  left: 9px;
  top: 3px;
  width: 18px;
  height: 5px;
  border-radius: 50%;
  background: #e8a87c;
  border: 1px solid #c47a4a;
}
.thumb-transfer::before {
  inset: 6px 8px 5px;
  background: #fff;
  border: 1px solid #d5d5d5;
  box-shadow: 3px 3px 0 #e5e0d8;
}
.thumb-transfer::after {
  left: 12px;
  right: 12px;
  top: 12px;
  height: 2px;
  background: #e8a87c;
  box-shadow: 0 5px 0 #84a59d, 0 10px 0 #d8d4ce;
}
.thumb-press::before {
  left: 7px;
  top: 10px;
  width: 22px;
  height: 14px;
  border-radius: 4px;
  background: #777;
  box-shadow: inset 0 -5px 0 #555;
}
.thumb-press::after {
  left: 12px;
  top: 6px;
  width: 15px;
  height: 3px;
  border-radius: 3px;
  background: #e8a87c;
  transform: rotate(-18deg);
  box-shadow: -3px 15px 0 #d8d4ce;
}
.thumb-tape::before {
  left: 7px;
  top: 7px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 5px solid #f1d47a;
  background: #f6f3ee;
}
.thumb-tape::after {
  left: 19px;
  top: 17px;
  width: 14px;
  height: 7px;
  background: #e8a87c;
  border: 1px solid #c47a4a;
  transform: rotate(-15deg);
}
.thumb-sleeve::before {
  left: 9px;
  top: 5px;
  width: 17px;
  height: 26px;
  border-radius: 3px;
  background: rgba(132,165,157,.18);
  border: 1px solid rgba(95,157,135,.65);
  transform: skewX(-5deg);
}
.thumb-sleeve::after {
  left: 11px;
  top: 10px;
  width: 13px;
  height: 1px;
  background: rgba(95,157,135,.75);
  box-shadow: 0 6px 0 rgba(95,157,135,.55), 0 12px 0 rgba(95,157,135,.4);
  transform: skewX(-5deg);
}

/* ── Long-form content / FAQ ─────────────────────────────── */
.content {
  max-width: 780px;
  margin: 2.5rem auto 0;
  padding: 0 1.6rem;
}
.content h2 {
  font-size: 1.3rem; font-weight: 750; margin: 2.4rem 0 .8rem; line-height: 1.25;
}
.content h3 { font-size: 1rem; font-weight: 750; color: #ded8cf; margin: 1.5rem 0 .5rem; }
.content p, .content li { font-size: 14.5px; color: var(--muted); margin-bottom: 1rem; }
.content ul, .content ol { margin: 0 0 1.2rem 1.4rem; }
.content li { margin-bottom: .5rem; }
.content strong { color: #ded8cf; }
.content a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted rgba(232,168,124,.55); }
.size-table {
  width: 100%;
  border-collapse: collapse;
  margin: .4rem 0 1.4rem;
  font-size: 13px;
  color: var(--muted);
}
.size-table th,
.size-table td {
  text-align: left;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
}
.size-table th {
  color: var(--text);
  background: #202020;
  font-weight: 700;
}
.size-table td:first-child {
  color: #ded8cf;
  font-weight: 650;
}
@media (max-width: 560px) {
  .size-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem 1.1rem;
  margin-bottom: .6rem;
  background: var(--panel);
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14.5px;
  color: var(--text);
}
.faq details[open] summary { color: var(--accent); margin-bottom: .5rem; }
.faq details p { margin-bottom: 0; }

/* ── Print: show only the rendered wrap ──────────────────── */
#printImg { display: none; }
@media print {
  body * { visibility: hidden; }
  #printImg, #printImg * { visibility: visible; }
  #printImg {
    display: block;
    position: absolute;
    top: 0; left: 0;
    max-width: none;
  }
}
