:root {
  --cork: #c4a06a;
  --cork_deep: #a67c45;
  --ink: #1a1510;
  --navy_enamel: #16324f;
  --teal_enamel: #1a6e62;
  --coral_enamel: #c41e3a;
  --gold: #d4a017;
  --gold_deep: #8a6a12;
  --cream: #f7ecd4;
  --felt: #1c4a3a;
  --felt_lit: #245744;
  --wood: #5a3218;
  --wood_lit: #7a4a24;
  --focus: #16324f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: Futura, "Century Gothic", "Tw Cen MT", Verdana, sans-serif;
  line-height: 1.45;
  background-color: var(--cork);
  background-image:
    radial-gradient(circle, rgba(72, 46, 18, 0.22) 0.7px, transparent 1.1px),
    radial-gradient(circle, rgba(90, 58, 24, 0.16) 0.5px, transparent 0.9px),
    radial-gradient(circle, rgba(140, 96, 48, 0.18) 1px, transparent 1.5px),
    linear-gradient(180deg, #d0ab76 0%, #c4a06a 42%, #b58950 100%);
  background-size: 11px 12px, 7px 8px, 17px 14px, 100% 100%;
  background-position: 0 0, 5px 3px, 9px 8px, 0 0;
}

[hidden] {
  display: none !important;
}

.cork_board {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1.1rem 3.5rem;
}

.name_pin {
  position: relative;
  max-width: 38rem;
  margin: 0 auto 1.75rem;
  padding: 1.6rem 1.6rem 1.4rem;
  color: var(--cream);
  text-align: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.16), transparent 42%),
    var(--navy_enamel);
  border: 8px solid var(--gold);
  border-radius: 48% / 38%;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.22),
    inset 0 -10px 18px rgba(0, 0, 0, 0.28),
    0 6px 0 var(--gold_deep),
    0 14px 22px rgba(60, 30, 10, 0.35);
  transform: rotate(-1.1deg);
}

.shop_stamp {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e0b429;
}

h1 {
  margin: 0;
  font-family: "Cooper Black", "Cooper Std", "Arial Black", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 7vw, 3.5rem);
  letter-spacing: 0.01em;
  line-height: 1;
  text-shadow: 0 2px 0 var(--gold_deep);
}

.lede {
  margin: 0.85rem auto 0;
  max-width: 30rem;
  font-size: 0.98rem;
  color: #ead9b8;
}

.status_card {
  margin: 0 auto 1rem;
  max-width: 40rem;
  padding: 0.7rem 0.9rem;
  background: #f3c9b4;
  border: 3px solid var(--coral_enamel);
  border-radius: 0.7rem;
  box-shadow: 0 3px 0 #7a1828;
}

.file_input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.felt_tray {
  position: relative;
  min-height: 16rem;
  padding: 2.4rem 1.2rem 1.8rem;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.05), transparent 36%),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.04) 0 1px,
      transparent 1px 7px
    ),
    linear-gradient(180deg, var(--felt_lit), var(--felt));
  border: 10px solid var(--wood);
  border-radius: 1.4rem;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.28),
    0 8px 0 #3a1e0c,
    0 16px 24px rgba(50, 25, 5, 0.28);
  cursor: pointer;
}

.felt_tray.is_dragging {
  box-shadow:
    inset 0 0 0 4px var(--gold),
    inset 0 0 40px rgba(0, 0, 0, 0.28),
    0 8px 0 #3a1e0c;
}

.felt_copy {
  text-align: center;
  color: var(--cream);
}

.felt_title {
  margin: 0;
  font-family: "Cooper Black", "Arial Black", Impact, sans-serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  text-shadow: 0 2px 0 #0c2a22;
}

.felt_hint {
  margin: 0.55rem 0 1.15rem;
  color: #cfe6dc;
}

.pushpin {
  position: absolute;
  top: 0.55rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 3px 0 rgba(0, 0, 0, 0.35),
    0 6px 8px rgba(0, 0, 0, 0.28);
}

.pushpin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 3px;
  height: 10px;
  margin-left: -1.5px;
  background: linear-gradient(#c0c4c8, #6d7378);
  border-radius: 1px;
}

.pushpin_red {
  left: 1.1rem;
  background: radial-gradient(circle at 35% 30%, #ff7a7a, var(--coral_enamel) 58%, #7a1222);
}

.pushpin_teal {
  right: 1.1rem;
  left: auto;
  background: radial-gradient(circle at 35% 30%, #7ee0d4, var(--teal_enamel) 58%, #0c3f38);
}

.pushpin_gold {
  left: 50%;
  margin-left: -8px;
  background: radial-gradient(circle at 35% 30%, #f3d56a, var(--gold) 58%, var(--gold_deep));
}

.pushpin_coral {
  left: 50%;
  margin-left: -8px;
  background: radial-gradient(circle at 35% 30%, #ff8a7a, #e24b3b 58%, #8b1228);
}

.enamel_button {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  text-align: center;
  text-decoration: none;
  padding: 0.72rem 1.25rem;
  border: 3px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    0 3px 0 var(--gold_deep);
}

.enamel_coral {
  background: radial-gradient(circle at 30% 18%, #f07a68, var(--coral_enamel) 54%, #8b1228);
}

.enamel_teal {
  background: radial-gradient(circle at 30% 18%, #4ecdc4, var(--teal_enamel) 54%, #0e4a42);
}

.enamel_button:hover,
.enamel_button:focus-visible {
  filter: brightness(1.06);
}

.enamel_button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35) brightness(0.85);
}

.enamel_button:focus-visible,
.ghost_button:focus-visible,
.size_download:focus-visible,
.chip input:focus-visible,
input[type="range"]:focus-visible,
input[type="color"]:focus-visible,
input[type="checkbox"]:focus-visible,
.file_input:focus-visible + .felt_tray .enamel_button {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19.5rem;
  gap: 1.1rem;
  margin-top: 1.2rem;
  align-items: start;
}

.pin_wall {
  display: grid;
  gap: 0.9rem;
}

.tab_card,
.size_pin {
  position: relative;
  background: var(--cream);
  border: 2px solid #e0c48a;
  border-radius: 0.6rem;
  padding: 1.35rem 0.9rem 0.9rem;
  box-shadow: 0 8px 0 rgba(90, 50, 18, 0.18);
}

.card_label {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a4e2e;
}

.tab_strip {
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
  padding: 0.55rem 0.55rem 0;
  background: #3d2a1c;
  border-radius: 0.7rem 0.7rem 0 0;
  min-height: 2.8rem;
}

.fake_tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem 0.45rem;
  background: #efe0c4;
  border-radius: 0.55rem 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--ink);
}

.fake_tab.is_idle {
  background: #5a3d28;
  color: #d9c4a0;
  opacity: 0.85;
}

.idle_dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8a6a4a;
}

.fake_tab_title {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.size_pins {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.8rem;
}

.size_pin_wide {
  grid-column: 1 / -1;
}

.checker_well {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.7rem;
  background-color: #ddd4c2;
  background-image:
    linear-gradient(45deg, #cfc3ad 25%, transparent 25%),
    linear-gradient(-45deg, #cfc3ad 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cfc3ad 75%),
    linear-gradient(-45deg, transparent 75%, #cfc3ad 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  border-radius: 0.4rem;
}

.pixel_canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#preview_16 {
  width: 16px;
  height: 16px;
}

#preview_32 {
  width: 32px;
  height: 32px;
}

#preview_48 {
  width: 48px;
  height: 48px;
}

#preview_180 {
  width: 180px;
  height: 180px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: auto;
}

.bench_tray {
  background: linear-gradient(180deg, var(--wood_lit), var(--wood));
  border: 3px solid #2a160c;
  border-radius: 1rem;
  padding: 1rem 0.95rem 1.1rem;
  color: var(--cream);
  box-shadow:
    inset 0 1px 0 #a56a38,
    0 8px 0 #3a1e0c;
}

.tray_label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e0b429;
}

.source_readout {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.6rem;
  background: #3a1e0c;
  border-radius: 0.45rem;
}

.source_readout div {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.4rem;
  align-items: baseline;
}

.source_readout dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e0b429;
}

.source_readout dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shape_set {
  margin: 0 0 0.9rem;
  padding: 0;
  border: 0;
}

.shape_set legend {
  padding: 0;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.55rem 0.4rem 0;
  cursor: pointer;
}

.chip input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--gold);
}

.field {
  margin-bottom: 0.95rem;
}

.field_header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.field_label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field_value {
  font-variant-numeric: tabular-nums;
  color: #e0b429;
}

.field_note {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: #ead9b8;
}

.color_row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.color_row .field_label {
  font-weight: 500;
  font-size: 0.85rem;
}

input[type="range"] {
  width: 100%;
  margin: 0.35rem 0 0;
  accent-color: var(--gold);
}

input[type="color"] {
  width: 2.6rem;
  height: 2rem;
  padding: 0;
  border: 2px solid var(--gold);
  border-radius: 0.35rem;
  background: #3a1e0c;
  cursor: pointer;
}

input[type="color"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.check_row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-weight: 700;
}

.check_row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--gold);
}

.action_stack {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0.9rem;
}

.action_stack .enamel_button,
.ghost_button {
  width: 100%;
}

.ghost_button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  background: transparent;
  border: 2px solid #e0b429;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  cursor: pointer;
}

.ghost_button:hover,
.ghost_button:focus-visible {
  background: rgba(224, 180, 41, 0.15);
}

.png_size_row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.size_download {
  min-width: 2.7rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.5rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 0.4rem;
  cursor: pointer;
}

.size_download:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.board_note {
  max-width: 40rem;
  margin: 1.4rem auto 0;
  padding: 0.85rem 1rem;
  background: rgba(247, 236, 212, 0.72);
  border-radius: 0.6rem;
  color: #4a3420;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .name_pin {
    border-radius: 2rem;
    transform: none;
    padding: 1.3rem 1.1rem 1.2rem;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .felt_tray {
    min-height: 13rem;
    border-width: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .name_pin {
    transform: none;
  }
}
