:root {
  color-scheme: light;
  --ink: #260c11;
  --muted: #67564d;
  --orange: #fa570d;
  --accent: #a43a0c;
  --cream: #fbe8c6;
  --paper: #fffaf0;
  --sheet: #fffcf7;
  --mint: #8bddc1;
  --mint-light: #e0f4eb;
  --line: #d8c7af;
  --edge: #8d7865;
  --focus: #006650;
  --control-face: "Segoe UI", system-ui, Arial, sans-serif;
  --display-face: "Arial Rounded MT Bold", "Trebuchet MS", var(--control-face);
  --display-shadow: 3px 4px 0 var(--ink);
  --control-shadow: 0 2px 0 var(--ink);
  font-family: var(--control-face);
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--accent);
}
.brand, h1, h2, h3, legend { font-family: var(--display-face); }
.brand { font-weight: 800; letter-spacing: -.055em; gap: 2px; }
.brand-mark { display: block; flex: none; width: clamp(38px, 7vw, 48px); height: auto; }
.brand .brand-wordmark { display: block; flex: none; width: clamp(64px, 7vw, 80px); height: auto; }
.peely-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1504px;
  min-height: 70px;
  margin-inline: auto;
  padding: 8px clamp(12px, 3vw, 40px);
}
.peely-header-row .brand {
  display: flex;
  align-items: center;
  flex: none;
  min-height: 44px;
}
.peely-header-row .header-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 6px;
}
@media (max-width: 390px) {
  .peely-header-row { flex-direction: column; }
  .peely-header-row .header-actions { gap: 4px; }
  .peely-header-row .brand-mark { width: clamp(32px, 10vw, 38px); }
  .peely-header-row .brand-wordmark { width: clamp(54px, 17vw, 64px); }
}
header:has(.brand) {
  background: var(--cream);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.cta, .primary, .catalog-save, .collection .create-sticker:not([hidden]) {
  background: var(--orange);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--control-shadow);
  font-weight: 750;
}
.selection-actions a, .cart-item form .primary {
  background: var(--sheet);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: var(--control-shadow);
}
:is(.cta, .primary, .catalog-save, .selection-actions a, .collection .create-sticker):hover:not(:disabled) {
  background: var(--cream);
  color: var(--ink);
  filter: none;
}
:is(.cta, .primary, .catalog-save, .selection-actions a, .collection .create-sticker):active:not(:disabled) {
  translate: 0 1px;
  box-shadow: none;
}
button:hover:not(:disabled) { filter: none; }
:is(.tools, .zoom, .view-tabs) button:hover:not(:disabled, [aria-pressed=true]),
:is(.text-button, .dismiss, .catalog-add, .catalog-entry, .dialog-actions .cancel):hover:not(:disabled) {
  background: var(--mint-light);
  color: var(--ink);
}
a:hover { text-underline-offset: 4px; }
a.peely-link:not([hidden]) {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: .42em;
  max-inline-size: 100%;
  min-block-size: 36px;
  padding: .35em .7em;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  font: 700 .875rem/1.25 var(--control-face);
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
}
a.peely-link.peely-link--compact:not([hidden]) {
  min-block-size: 30px;
  padding: .25em .55em;
  font-size: .8125rem;
}
a.peely-link:hover { background: var(--mint-light); }
a.peely-link:active { background: var(--mint); }
a.peely-link:focus-visible { outline-color: var(--link-focus, var(--focus)); }
@media (pointer: coarse), (max-width: 620px) {
  a.peely-link:not([hidden]) { min-block-size: 44px; }
  a.peely-link.peely-link--compact:not([hidden]) { min-block-size: 44px; }
}
:is(.peely-link, .account-cta) > i[data-icon] {
  display: inline-flex;
  flex: none;
}
:is(.peely-link, .account-cta) > i[data-icon] > :is(svg, img) {
  width: 1.15em;
  height: 1.15em;
}
:is(.peely-link, .account-cta) > i[data-icon] > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card, .paper-dialog, #padding-picker, .review-sheet, .cart-items, .cart-panel, .unplaced {
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 12px;
  box-shadow: 1px 2px 0 var(--ink);
}
.paper-dialog, #padding-picker { box-shadow: var(--display-shadow), 0 18px 52px #260c1126; }
.paper-dialog::backdrop, #padding-picker::backdrop { background: #260c116b; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 620px) {
  .paper-dialog :is(input, select, button), .catalog-admin :is(summary, button, select),
  .catalog-editor input:not([type=checkbox]), .cart-item :is(button, input),
  .auth-options button { min-height: 44px; }
}

.print-dimensions :is(input, select), .effects select, .materials button,
.catalog-editor :is(input:not([type=checkbox]), select) { border-color: var(--edge); }
@media (pointer: coarse), (max-width: 620px) {
  .demo-controls input, .finish-lights input, .availability { min-height: 44px; }
  .paper-dialog .dismiss { min-width: 44px; }
  .catalog-editor input:not([type=checkbox]), .catalog-editor select { min-height: 44px; }
}

header:has(.brand) .header-icon:is(a, button):not([hidden]) {
  display: inline-grid;
  position: relative;
  place-items: center;
  flex: none;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--orange);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--control-shadow);
  text-decoration: none;
}
header:has(.brand) .header-icon:is(a, button):hover:not(:disabled),
header:has(.brand) .header-icon:is(a, button)[aria-current="page"] {
  background: var(--cream);
}
header:has(.brand) .header-icon:is(a, button):active:not(:disabled) {
  translate: 0 1px;
  box-shadow: none;
}
header:has(.brand) #guest-cart-add:not([hidden]) {
  display: inline-flex;
  gap: 6px;
  width: auto;
  padding-inline: 10px;
  font-size: 13px;
  font-weight: 750;
}
@media (max-width: 520px) {
  .peely-header-row:has(#guest-cart-add:not([hidden])) {
    flex-direction: column;
  }
  .header-actions:has(#guest-cart-add:not([hidden])) {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
}
.peely-header-row .header-actions .header-icon-title {
  position: absolute;
  z-index: 10;
  inset-block-start: calc(100% + 7px);
  inset-inline-end: 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 5px 9px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--sheet);
  box-shadow: var(--control-shadow);
  color: var(--ink);
  font: 650 12px/1.3 var(--control-face);
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  translate: 0 -4px;
  transition: opacity 160ms ease, translate 160ms ease;
}
.peely-header-row .header-actions .header-icon:first-child > .header-icon-title {
  inset-inline: 0 auto;
}
.peely-header-row .header-actions .header-icon:focus-visible > .header-icon-title {
  opacity: 1;
  translate: 0 0;
}
@media (hover: hover) and (pointer: fine) {
  .peely-header-row .header-actions .header-icon:hover > .header-icon-title {
    opacity: 1;
    translate: 0 0;
  }
}
.peely-header-row .header-actions .header-icon[aria-current="page"] {
  --nav-fold-scale: 1;
}
.peely-header-row .header-actions .header-icon:is(a, button)::before,
.peely-header-row .header-actions .header-icon:is(a, button)::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transform-origin: top right;
  transform: scale(var(--nav-fold-scale, 0));
}
/* The lower half follows the mascot's dark outline around the rounded flap. */
.peely-header-row .header-actions .header-icon:is(a, button)::before {
  background: linear-gradient(225deg, var(--cream) 50%, var(--ink) 50%);
  clip-path: path("M 0 0 H 18 V 18 C 14 15 10 17 6 13 C 2 9 4 4 0 0 Z");
}
.peely-header-row .header-actions .header-icon:is(a, button)::after {
  background: linear-gradient(225deg, var(--paper) 54%, var(--cream) 60%, var(--edge) 72%);
  clip-path: path("M 4 5.5 L 12.5 14 C 10 14.5 8.5 14 7 12.5 C 5 10.5 5 8 4 5.5 Z");
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .peely-header-row .header-actions .header-icon:is(a, button):not([aria-current="page"])::before,
  .peely-header-row .header-actions .header-icon:is(a, button):not([aria-current="page"])::after {
    transition: transform 160ms ease;
  }
  .peely-header-row .header-actions .header-icon:hover:not(:disabled) {
    --nav-fold-scale: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .peely-header-row .header-actions .header-icon-title {
    transition: none;
    translate: none;
  }
}
header .header-icon i, .create-sticker i {
  display: grid;
  place-items: center;
}
header .header-icon i svg, .create-sticker i svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.points-label::before {
  content:""; display:inline-block; inline-size:1.15em; block-size:1.15em;
  min-inline-size:1.15em; vertical-align:-.2em; margin-inline-end:.28em;
  background:url('/Assets/peely-points-coin.png') center / contain no-repeat;
}
.achievement-popup {
  --link-focus: var(--mint);
  position:fixed; z-index:2000; right:max(.8rem,env(safe-area-inset-right)); bottom:max(1rem,env(safe-area-inset-bottom));
  width:min(23rem,calc(100vw - 1.6rem)); box-sizing:border-box; padding:1rem 1.1rem;
  max-height:50dvh; overflow:auto; background:#38232b; color:#fff1cc; border:3px solid #271817;
  outline:1px solid #c8a466; box-shadow:inset 0 0 0 2px #d5ad68,0 5px 16px #21181b55;
  font:1rem/1.45 var(--control-face);
}
.achievement-popup>strong { color:#ffe098; font-family:Georgia,serif; font-size:1.25rem; }
.achievement-popup>button { float:right; width:44px; height:44px; margin:-.4rem -.4rem 0 0; background:transparent; color:#ffe5af; border:0; font-size:1.5rem; }
.achievement-popup ul { list-style:none; padding:0; margin:.6rem 0 0; }
.achievement-popup li { display:grid; gap:.15rem; border-top:1px solid #a58a68; padding:.55rem 0; }
