/*!
 * Avery Press-On Studio — front-end styles
 * Soft, warm and simple. Scoped to .apo so the theme is untouched.
 * Palette is built from Avery's Pale Dogwood with warm espresso text.
 */

.apo {
  --apo-bg: #fbf7f5;
  --apo-surface: #ffffff;
  --apo-ink: #3a2e2a;
  --apo-muted: #85766f;
  --apo-line: #eee3de;
  --apo-blush: #f3e1d9;
  --apo-blush-soft: #f9efea;
  --apo-rose: #b5806f;
  --apo-skin: #f1e3da;
  --apo-error: #a8432f;
  --apo-warn: #8a5a1c;
  --apo-warn-bg: #fbf0e1;
  --apo-radius: 16px;
  --apo-radius-sm: 12px;
  --apo-shadow: 0 1px 2px rgba(58, 46, 42, .04), 0 6px 20px rgba(58, 46, 42, .06);
  --apo-head: "Season Sans", "Avenir Next", "Nunito Sans", "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --apo-sans: "Season Sans", "Avenir Next", "Nunito Sans", "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --apo-ease: cubic-bezier(.2, .7, .2, 1);

  background: var(--apo-bg);
  color: var(--apo-ink);
  font-family: var(--apo-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.apo *, .apo *::before, .apo *::after { box-sizing: border-box; }
.apo[lang="zh-Hans"] { line-height: 1.75; }

/* Theme-proofing */
.apo p, .apo h2, .apo h3, .apo ul, .apo ol, .apo dl, .apo dd, .apo figure { margin: 0; padding: 0; }
.apo ul, .apo ol { list-style: none; }
.apo img { max-width: 100%; height: auto; display: block; }
.apo button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; box-shadow: none; }
.apo input, .apo textarea { font: inherit; color: inherit; }

.apo-sr, .apo .apo-sr-input {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0;
}
.apo :focus { outline: none; }
.apo :focus-visible,
.apo label:focus-within:has(.apo-sr-input:focus-visible) { outline: 2px solid var(--apo-ink); outline-offset: 3px; }

.apo-loading { min-height: 320px; display: grid; place-items: center; }
.apo-boot { display: grid; place-items: center; color: var(--apo-muted); }
.apo-spinner {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; vertical-align: -3px;
  animation: apo-spin .8s linear infinite;
}
@keyframes apo-spin { to { transform: rotate(360deg); } }

/* Header & progress */
.apo-shell { padding: 20px 16px 0; }
.apo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.apo-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.apo .apo-logo { height: 20px; width: auto; max-width: 110px; display: block; }
.apo-brand .apo-logo + .apo-title { font-size: 13px; font-weight: 500; color: var(--apo-muted); padding-left: 12px; border-left: 1px solid var(--apo-line); line-height: 1.2; }
.apo-title { font-family: var(--apo-head); font-size: 15px; font-weight: 600; color: var(--apo-ink); }
.apo-mark { width: 100%; height: 100%; object-fit: cover; }
.apo .apo-lang {
  appearance: none; background: var(--apo-surface); border: 1px solid var(--apo-line); border-radius: 999px;
  padding: 6px 16px; min-height: 40px; cursor: pointer; font-size: 14px; color: var(--apo-ink);
}
.apo .apo-lang:hover { border-color: var(--apo-rose); }
.apo-head-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.apo .apo-acc-link { font-size: 14px; font-weight: 600; color: var(--apo-ink); text-decoration: none; white-space: nowrap; }
.apo-progress { margin-bottom: 28px; }
.apo-progress-text { font-size: 13px; color: var(--apo-muted); margin-bottom: 8px; }
.apo-progress-text strong { color: var(--apo-ink); font-weight: 600; }
.apo-bar { height: 4px; background: var(--apo-line); border-radius: 4px; overflow: hidden; position: relative; }
.apo-bar span { position: absolute; inset: 0 auto 0 0; background: var(--apo-rose); border-radius: 4px; transition: width .5s var(--apo-ease); }

/* Body */
.apo-body { min-height: 340px; padding-bottom: 28px; }
.apo-enter { animation: apo-in .35s var(--apo-ease) both; }
@keyframes apo-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.apo-step-head { margin-bottom: 22px; }
.apo-h2 { font-family: var(--apo-head); font-weight: 600; font-size: 26px; line-height: 1.25; margin: 0 0 6px; color: var(--apo-ink); letter-spacing: -.01em; text-wrap: balance; }
.apo-h3 { display: block; font-family: var(--apo-head); font-weight: 600; font-size: 17px; line-height: 1.35; margin-bottom: 4px; color: var(--apo-ink); padding: 0; }
.apo-lead { color: var(--apo-muted); max-width: 52ch; }
.apo-note { color: var(--apo-muted); font-size: 14px; }
.apo-eyebrow { font-size: 13px; color: var(--apo-muted); margin-bottom: 2px; }
.apo-fs { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
.apo-fs > legend { padding: 0; float: left; width: 100%; }
.apo-fs > legend + * { clear: both; }
.apo-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.apo-alert {
  border-radius: var(--apo-radius-sm); background: #fbe9e4; color: var(--apo-error);
  padding: 12px 16px; margin-bottom: 18px; font-size: 15px;
}

/* Buttons */
.apo .apo-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; cursor: pointer;
  font-size: 15px; font-weight: 600; border: 1px solid transparent; text-decoration: none;
  transition: background .2s var(--apo-ease), border-color .2s var(--apo-ease), transform .1s;
}
.apo .apo-btn:active:not(:disabled) { transform: scale(.98); }
.apo .apo-btn:disabled { opacity: .4; cursor: not-allowed; }
.apo .apo-btn-primary { background: var(--apo-ink); color: #fff; }
.apo .apo-btn-primary:hover:not(:disabled) { background: #2a201d; }
.apo .apo-btn-ghost { background: transparent; color: var(--apo-ink); }
.apo .apo-btn-ghost:hover:not(:disabled) { background: var(--apo-blush-soft); }
.apo .apo-btn-line { background: var(--apo-surface); color: var(--apo-ink); border-color: var(--apo-line); }
.apo .apo-btn-line:hover { border-color: var(--apo-rose); }
.apo .apo-link {
  appearance: none; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--apo-rose);
  font-weight: 600; font-size: 14px; min-height: 32px; text-decoration: none;
}
.apo .apo-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Selectable surfaces share one look */
.apo-card, .apo-opt, .apo-pill, .apo-extra, .apo-chip {
  background: var(--apo-surface); border: 1.5px solid transparent; box-shadow: var(--apo-shadow);
  transition: border-color .2s var(--apo-ease), background .2s var(--apo-ease), transform .2s var(--apo-ease);
}
.apo-card.is-on, .apo-opt.is-on, .apo-pill.is-on, .apo-extra.is-on, .apo-chip.is-on { border-color: var(--apo-ink); }

/* First page: Ready-made vs Customise */
.apo-modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.apo-mode {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; cursor: pointer;
  background: var(--apo-surface); border: 1.5px solid transparent; border-radius: var(--apo-radius); box-shadow: var(--apo-shadow);
  transition: border-color .2s var(--apo-ease);
}
.apo-mode.is-on { border-color: var(--apo-ink); }
.apo-mode-img { display: block; aspect-ratio: 16 / 10; border-radius: var(--apo-radius-sm); overflow: hidden; background: var(--apo-blush-soft); }
.apo .apo-mode-img img { width: 100%; height: 100%; object-fit: cover; }
.apo-mode-text { display: flex; flex-direction: column; line-height: 1.3; }
.apo-mode-title { font-weight: 600; font-size: 16px; }
.apo-mode-sub { font-size: 13px; color: var(--apo-muted); margin-top: 2px; }
.apo-mode .apo-check { top: 18px; right: 18px; }
.apo-mode.is-on .apo-check { opacity: 1; background: var(--apo-ink); }
.apo-mode.is-on .apo-check::after { content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.apo-section { margin-bottom: 18px; }
.apo-section > .apo-note { margin-bottom: 12px; }

/* Category filter */
.apo-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 6px; }
.apo-cats::-webkit-scrollbar { display: none; }
.apo .apo-cat {
  appearance: none; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--apo-line); background: var(--apo-surface); color: var(--apo-ink);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .2s var(--apo-ease), color .2s var(--apo-ease);
}
.apo .apo-cat span { font-size: 12px; color: var(--apo-muted); font-variant-numeric: tabular-nums; }
.apo .apo-cat:hover { border-color: var(--apo-rose); }
.apo .apo-cat.is-on { background: var(--apo-ink); border-color: var(--apo-ink); color: #fff; }
.apo .apo-cat.is-on span { color: rgba(255,255,255,.7); }
@media (min-width: 640px) { .apo-cats { margin: 0 0 14px; padding: 2px 0 6px; flex-wrap: wrap; } }

/* Design cards */
.apo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.apo-card { position: relative; display: flex; flex-direction: column; border-radius: var(--apo-radius); overflow: hidden; cursor: pointer; }
.apo-card:hover { transform: translateY(-2px); }
.apo-card-media { display: block; aspect-ratio: 4 / 5; background: var(--apo-blush-soft); overflow: hidden; }
.apo-card-media img { width: 100%; height: 100%; object-fit: cover; }
.apo-card-art { display: grid; place-items: center; background: var(--apo-blush-soft); }
.apo-card-art svg { width: 52%; height: auto; }
.apo-art-a { fill: var(--apo-blush); }
.apo-art-b { fill: var(--apo-rose); opacity: .45; }
.apo-art-c { fill: var(--apo-rose); }
.apo-card-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; flex: 1; }
.apo-card-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.apo-card-desc { display: none; }
.apo-card-custom .apo-card-desc { display: block; font-size: 13px; color: var(--apo-muted); line-height: 1.45; }
.apo-card-price { font-size: 14px; color: var(--apo-muted); margin-top: auto; padding-top: 2px; }
.apo-check {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); opacity: 0; transition: opacity .2s var(--apo-ease);
}
.apo-card.is-on .apo-check { opacity: 1; background: var(--apo-ink); }
.apo-card.is-on .apo-check::after {
  content: ""; position: absolute; left: 9px; top: 5px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Colour chips */
.apo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.apo-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 7px;
  border-radius: 999px; cursor: pointer; font-size: 14px;
}
.apo-chip.is-static { cursor: default; min-height: 34px; box-shadow: none; background: var(--apo-blush-soft); }
.apo-swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .06); flex: none; }

/* Uploads */
.apo-uploads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.apo-uploads:empty { display: none; }
.apo-thumb { position: relative; aspect-ratio: 1; background: var(--apo-blush-soft); border-radius: var(--apo-radius-sm); overflow: hidden; }
.apo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.apo-thumb figcaption { display: none; }
.apo-thumb.is-file figcaption { display: grid; place-items: center; height: 100%; padding: 8px; font-size: 11px; color: var(--apo-muted); text-align: center; word-break: break-all; }
.apo-thumb.is-pending { display: grid; place-items: center; color: var(--apo-muted); }
.apo .apo-thumb-x {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(58, 46, 42, .7); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.apo-upload-btn { position: relative; margin-top: 8px; }

.apo-textarea {
  width: 100%; border: 1.5px solid var(--apo-line); background: var(--apo-surface); padding: 14px 16px;
  border-radius: var(--apo-radius-sm); font-size: 16px; resize: vertical; min-height: 110px; margin-top: 8px;
}
.apo-textarea:focus-visible { border-color: var(--apo-ink); outline: none; }

/* Shape & length */
.apo-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.apo-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 12px; text-align: center;
  border-radius: var(--apo-radius); cursor: pointer;
}
.apo-tip-svg { width: 54px; height: 85px; margin-bottom: 4px; }
.apo-opt-name { font-size: 14px; font-weight: 500; }
.apo-opt-price { font-size: 12px; color: var(--apo-muted); min-height: 0; }
.apo-opt-price:empty, .apo-pill-price:empty { display: none; }

/* Shape guide (from Avery's nail shapes post) */
.apo-guide { background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); margin-bottom: 22px; overflow: hidden; }
.apo-guide summary { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; cursor: pointer; list-style: none; min-height: 64px; }
.apo-guide summary::-webkit-details-marker { display: none; }
.apo-guide summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--apo-muted); line-height: 1; }
.apo-guide[open] summary::after { content: "−"; }
.apo .apo-guide-thumb { width: 44px; height: 56px; object-fit: cover; object-position: center 70%; border-radius: 8px; flex: none; }
.apo-guide summary > span { display: flex; flex-direction: column; line-height: 1.35; }
.apo-guide summary strong { font-weight: 600; font-size: 15px; }
.apo-guide summary span span { font-size: 13px; color: var(--apo-muted); }
.apo .apo-guide-img { width: 100%; max-width: 420px; margin: 0 auto; display: block; }

/* Measuring intro */
.apo-howto { display: grid; gap: 20px; }
.apo-fig { background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); padding: 20px; }
.apo-curve { width: 100%; height: auto; max-width: 300px; margin: 0 auto 14px; display: block; }
.apo-c-nail { fill: var(--apo-blush); }
.apo-c-tape { fill: none; stroke: var(--apo-ink); stroke-width: 2.5; stroke-linecap: round; }
.apo-c-dot { fill: var(--apo-ink); }
.apo-c-straight { stroke: var(--apo-error); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; }
.apo-legend { display: grid; gap: 8px; font-size: 14px; }
.apo-legend li { display: flex; gap: 10px; align-items: flex-start; }
.apo-key { flex: none; width: 20px; height: 0; margin-top: 11px; border-top: 2.5px solid var(--apo-ink); border-radius: 2px; }
.apo-key-no { border-top: 1.5px dashed var(--apo-error); }
.apo-rich { font-size: 15px; }
.apo-rich ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 8px; margin-bottom: 12px; }
.apo-rich ul { list-style: disc; padding-left: 1.3em; }
.apo-rich p { margin-bottom: 10px; }
.apo-tools { padding: 12px 16px; background: var(--apo-blush-soft); border-radius: var(--apo-radius-sm); font-size: 14px; }
.apo-offer { background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); padding: 18px; margin-bottom: 24px; }
.apo-offer-sizes { font-size: 13px; color: var(--apo-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* One finger per screen */
.apo-finger-head { margin-bottom: 12px; }
.apo-finger-head .apo-eyebrow { font-weight: 500; }
.apo-hand { color: var(--apo-muted); font-weight: 500; }
.apo-dots { display: flex; gap: 4px; margin-bottom: 16px; }
.apo-dots li { flex: 1; }
.apo-dots .apo-dots-gap { margin-left: 10px; }
.apo .apo-dot { position: relative; appearance: none; width: 100%; height: 24px; border: 0; background: none; cursor: pointer; padding: 0; display: flex; align-items: center; }
.apo .apo-dot span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.apo .apo-dot::after { content: ""; display: block; width: 100%; height: 6px; background: var(--apo-line); border-radius: 6px; transition: background .3s var(--apo-ease); }
.apo .apo-dot.is-done::after { background: var(--apo-blush); }
.apo .apo-dot.is-cur::after { background: var(--apo-rose); }
.apo .apo-dot:disabled { cursor: default; }

.apo-finger-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.apo-visuals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.apo-illus, .apo-closeup {
  background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow);
  display: grid; place-items: center; padding: 10px; aspect-ratio: 4 / 5; min-width: 0; position: relative;
}
.apo-illus img { max-height: 240px; width: auto; }
.apo-hand-svg, .apo-closeup-svg { width: 100%; height: 100%; max-height: 260px; }
.apo-closeup { grid-template-rows: 1fr auto; background: linear-gradient(180deg, #fff, var(--apo-blush-soft)); }
.apo-closeup-cap { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; line-height: 1.3; padding-top: 4px; }
.apo-closeup-cap strong { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.apo-closeup-cap span { font-size: 12px; color: var(--apo-muted); }
.apo-dim line { stroke: var(--apo-ink); stroke-width: 1.4; stroke-linecap: round; }
.apo-dim-soft line { stroke: var(--apo-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.apo-nail-ring {
  fill: none; stroke: var(--apo-rose); stroke-width: 2; opacity: .5;
  transform-box: fill-box; transform-origin: center; animation: apo-pulse 2s var(--apo-ease) infinite;
}
@keyframes apo-pulse { 0% { transform: scale(1); opacity: .7; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }

.apo-label { display: block; font-size: 14px; font-weight: 500; color: var(--apo-muted); margin-bottom: 6px; }
.apo-mm {
  display: flex; align-items: baseline; gap: 6px; background: var(--apo-surface); border: 1.5px solid var(--apo-line);
  border-radius: var(--apo-radius); padding: 6px 18px; transition: border-color .2s var(--apo-ease);
}
.apo-mm:focus-within { border-color: var(--apo-ink); }
.apo-mm.is-warn { border-color: var(--apo-warn); }
.apo-mm.is-invalid { border-color: var(--apo-error); }
.apo .apo-mm input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 0; margin: 0; box-shadow: none;
  font-family: var(--apo-head); font-size: 44px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; height: auto;
}
.apo .apo-mm input:focus-visible { outline: none; }
.apo-unit { font-size: 18px; color: var(--apo-muted); }
.apo-msg { min-height: 1.4em; font-size: 14px; margin: 8px 0; }
.apo-msg.is-error { color: var(--apo-error); }
.apo-msg.is-warn { color: var(--apo-warn); background: var(--apo-warn-bg); padding: 10px 14px; border-radius: var(--apo-radius-sm); }
.apo-msg.is-warn:empty { display: none; }
.apo-details { margin-top: 10px; background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); padding: 0 16px; }
.apo-details summary { cursor: pointer; padding: 14px 0; font-size: 14px; font-weight: 600; min-height: 44px; }
.apo-details .apo-curve { max-width: 240px; }
.apo-details .apo-legend { margin-bottom: 14px; font-size: 13px; }
.apo-details .apo-rich { padding-bottom: 8px; border-top: 1px solid var(--apo-line); padding-top: 12px; }

/* Review table */
.apo-table-wrap { overflow-x: auto; background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); }
.apo-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; background: transparent; }
.apo-table th, .apo-table td { padding: 10px 14px; border: 0; border-bottom: 1px solid var(--apo-line); text-align: left; font-weight: 400; vertical-align: middle; background: transparent; }
.apo-table tr:last-child th, .apo-table tr:last-child td { border-bottom: 0; }
.apo-table thead th { font-size: 13px; color: var(--apo-muted); font-weight: 500; }
.apo-table tbody th { font-weight: 500; }
.apo-table td.is-warn { color: var(--apo-warn); }
.apo-cell { display: flex; align-items: center; gap: 4px; border: 1.5px solid var(--apo-line); background: var(--apo-bg); border-radius: 10px; padding: 0 10px; max-width: 110px; }
.apo-cell:focus-within { border-color: var(--apo-ink); background: #fff; }
.apo-cell.is-warn { border-color: var(--apo-warn); background: var(--apo-warn-bg); }
.apo-cell.is-invalid { border-color: var(--apo-error); }
.apo .apo-cell input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 9px 0; min-height: 42px; font-size: 17px; font-weight: 600; box-shadow: none; margin: 0; }
.apo-cell span { color: var(--apo-muted); font-size: 13px; }
.apo-review-flag { margin-top: 12px; }

.apo-ack, .apo-check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin-top: 20px; font-size: 15px; }
.apo-ack { padding: 16px; background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); }
.apo-ack input, .apo-check-row input, .apo-extra-toggle input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--apo-ink); }

/* Extras */
.apo-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.apo-pill { display: inline-flex; align-items: baseline; gap: 8px; padding: 12px 22px; cursor: pointer; border-radius: 999px; }
.apo-pill-name { font-weight: 500; }
.apo-pill-price { font-size: 13px; color: var(--apo-muted); }
.apo-extras { display: grid; gap: 10px; margin-top: 10px; }
.apo-extra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; min-height: 64px; border-radius: var(--apo-radius); }
.apo-extra-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; width: 100%; min-height: 44px; }
.apo-extra-text { display: flex; flex-direction: column; }
.apo-extra-name { font-weight: 500; }
.apo-extra-price { font-size: 13px; color: var(--apo-muted); }
.apo-stepper { display: flex; align-items: center; gap: 6px; flex: none; }
.apo .apo-stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--apo-blush-soft);
  cursor: pointer; font-size: 20px; line-height: 1; padding: 0;
}
.apo .apo-stepper button:hover:not(:disabled) { background: var(--apo-blush); }
.apo .apo-stepper button:disabled { opacity: .35; cursor: default; }
.apo-stepper output { min-width: 24px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.apo-running { display: none; }

/* Summary */
.apo-sum-sec { padding: 18px; margin-bottom: 12px; background: var(--apo-surface); border-radius: var(--apo-radius); box-shadow: var(--apo-shadow); }
.apo-sum-sec .apo-table-wrap { box-shadow: none; border-radius: 0; background: transparent; margin: 0 -4px; }
.apo-sum-sec .apo-table th, .apo-sum-sec .apo-table td { padding: 8px 4px; }
.apo-sum-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.apo-sum-design { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; }
.apo-sum-design img, .apo-sum-design .apo-card-art { width: 72px; height: 90px; object-fit: cover; flex: none; border-radius: var(--apo-radius-sm); }
.apo-sum-name { font-weight: 600; font-size: 17px; }
.apo-dl { display: grid; gap: 2px 16px; }
.apo-dl dt { font-size: 13px; color: var(--apo-muted); margin-top: 10px; }
.apo-dl-row { grid-template-columns: max-content 1fr; align-items: baseline; }
.apo-dl-row dt { margin-top: 0; }
.apo-dl dd { margin: 0; }
.apo-pre { white-space: pre-wrap; }
.apo-price { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; }
.apo-price th, .apo-price td { padding: 5px 0; font-weight: 400; text-align: left; border: 0; background: none; color: var(--apo-muted); }
.apo-price td { text-align: right; white-space: nowrap; }
.apo-price tfoot th, .apo-price tfoot td { border-top: 1px solid var(--apo-line); padding-top: 12px; font-size: 20px; font-weight: 600; color: var(--apo-ink); }
.apo-sum-price .apo-note { margin-top: 6px; }

/* Sticky bottom bar */
.apo-nav {
  position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(251, 247, 245, .95); box-shadow: 0 -1px 0 var(--apo-line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.apo-nav .apo-btn { padding: 0 18px; }
.apo-nav .apo-btn-primary { min-width: 116px; }
.apo-total { display: flex; flex-direction: column; align-items: center; line-height: 1.2; text-align: center; }
.apo-total-label { font-size: 12px; color: var(--apo-muted); }
.apo-total-val { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Toast */
.apo-toast {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--apo-blush-soft);
  border-radius: var(--apo-radius-sm); padding: 8px 8px 8px 16px; margin-bottom: 18px; font-size: 14px;
}
.apo-toast[hidden] { display: none; }
.apo-toast > span { flex: 1; }
.apo .apo-toast-x { appearance: none; background: none; border: 0; font-size: 20px; cursor: pointer; width: 36px; height: 36px; padding: 0; }

/* Confirm sheet */
.apo-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(58, 46, 42, .35); display: grid; place-items: end center; }
.apo-modal[hidden] { display: none; }
.apo-modal-card {
  width: 100%; max-width: 460px; background: var(--apo-surface); border-radius: 22px 22px 0 0;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); animation: apo-up .3s var(--apo-ease) both;
}
@keyframes apo-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.apo-modal-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--apo-line); }
.apo-modal-total strong { font-size: 22px; font-weight: 600; }
.apo-modal-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 18px; }
html.apo-modal-open { overflow: hidden; }

.apo.is-busy .apo-body { opacity: .7; pointer-events: none; transition: opacity .2s; }

/* My Account */
.apo-account { background: transparent; max-width: 640px; margin: 0; }
.apo-account .apo-lead { margin-bottom: 8px; }
.apo-account .apo-table { margin: 18px 0; }

@media (min-width: 640px) {
  .apo-shell { padding: 32px 32px 0; }
  .apo-h2 { font-size: 30px; }
  .apo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .apo-opts { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .apo-uploads { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .apo-nav { margin: 0 -32px; padding-left: 32px; padding-right: 32px; }
  .apo-modal { place-items: center; padding: 24px; }
  .apo-modal-card { border-radius: 22px; padding: 32px; }
}
@media (min-width: 760px) {
  .apo-howto { grid-template-columns: 1fr 1fr; align-items: start; }
  .apo-finger-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* When the phone keyboard is open (short viewport), stop the bottom bar floating over the field. */
@media (max-height: 520px) { .apo-nav { position: static; } }

@media (prefers-reduced-motion: reduce) {
  .apo *, .apo *::before, .apo *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .apo-nail-ring { display: none; }
}
@media (forced-colors: active) {
  .apo-card.is-on, .apo-opt.is-on, .apo-pill.is-on, .apo-chip.is-on, .apo-extra.is-on { outline: 3px solid Highlight; }
  .apo-nail.is-on { fill: Highlight; }
}
@media (max-width: 400px) { .apo-head-actions ~ .apo-title, .apo-shell .apo-head:has(.apo-acc-link) .apo-title { display: none; } }
