:root {
  --navy: #1e3a8a;
  --navy-dark: #16295f;
  --green: #16a34a;
  --green-dark: #15803d;
  --gold: #f59e0b;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --danger: #dc2626;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 720px; margin: 0 auto; padding: 0 16px 120px; }
#app.wide { max-width: 1080px; }

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  margin: 0 -16px 18px;
  padding: 30px 22px 26px;
  text-align: center;
}
.hero .brand { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; }
.hero p { margin: 0; opacity: .85; font-size: 15px; }

.demo-banner {
  background: #fef3c7;
  border: 1px dashed #d97706;
  color: #92400e;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin: 0 0 16px;
  text-align: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.card h2 { margin: 0 0 4px; font-size: 19px; }
.card .sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

.price-strip {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.price-chip {
  flex: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 8px; text-align: center;
}
.price-chip b { display: block; font-size: 17px; color: var(--navy); }
.price-chip span { font-size: 12px; color: var(--muted); }
.price-hint { text-align: center; font-size: 13px; color: var(--muted); margin: -8px 0 16px; }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-card {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.photo-card .thumb {
  width: calc(100% - 20px); aspect-ratio: 1; object-fit: cover; display: block;
  background: #eee; border-radius: 50%; margin: 10px 10px 0;
  border: 2px dashed #c7d2fe;
}
.photo-card .body { padding: 10px; }
.photo-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
/* 3D ornament frame option: highlighted so it's hard to miss on the photo card. */
.photo-card .frame-opt { background: #f0fdf4; border: 2px solid #16a34a; border-radius: 12px; padding: 9px 10px; justify-content: flex-start; flex-wrap: wrap; }
.photo-card .frame-opt label { font-size: 14px; font-weight: 700; color: #14532d; display: flex; gap: 7px; align-items: center; }
.photo-card .frame-opt label input { width: 18px; height: 18px; accent-color: #16a34a; flex: none; }
.photo-card .frame-opt select { padding: 7px 8px; border: 1.5px solid #16a34a; border-radius: 8px; font-size: 13px; font-weight: 600; background: #fff; color: #10243a; }
/* Frame picker modal (order form): button + scrolling photo list. */
.frame-add-btn { background: #16a34a; color: #fff; border: none; border-radius: 10px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.frame-modal-back { position: fixed; inset: 0; background: rgba(16,36,58,.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.frame-modal { background: #fff; border-radius: 18px; width: 100%; max-width: 380px; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.frame-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 17px; color: #10243a; }
.frame-modal-head button { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #617180; }
.frame-modal-list { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.frame-opt-row { display: flex; gap: 12px; align-items: center; text-align: left; background: #fcfdfc; border: 1px solid #ccd8dd; border-radius: 14px; padding: 10px; cursor: pointer; }
.frame-opt-row:disabled { opacity: .45; cursor: default; }
.frame-opt-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; background: #dfe7ea; }
.frame-ph-missing { width: 84px; height: 84px; border-radius: 10px; background: #eef3f5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: none; color: #617180; font-size: 12px; text-align: center; padding: 4px; }
.frame-ph-missing span { font-weight: 700; font-size: 13px; color: #10243a; }
.frame-opt-meta { display: flex; flex-direction: column; gap: 2px; font-size: 15px; color: #10243a; }
.frame-opt-meta span { color: #617180; font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: #f3f4f6; font-size: 18px; line-height: 1; cursor: pointer;
}
.stepper b { min-width: 22px; text-align: center; }
.type-toggle-label { font-size: 14px; font-weight: 700; margin: 2px 0 6px; }
.type-toggle { display: flex; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.type-toggle button {
  border: 0; background: #fff; padding: 10px 8px; font-size: 15px; line-height: 1.25; cursor: pointer; color: var(--muted);
  flex: 1;
}
.type-toggle button + button { border-left: 2px solid var(--line); }
.type-toggle button b { display: block; font-size: 16px; }
.type-toggle button small { display: block; font-size: 12px; font-weight: 400; margin-top: 2px; opacity: .8; }
.type-toggle button.active { background: var(--navy); color: #fff; }
.type-toggle button.active small { opacity: .85; }
.ovl-badge {
  display: inline-block; margin: 8px 10px 0; padding: 3px 10px;
  font-size: 11px; font-weight: 700; color: var(--navy);
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px;
}
.bg-badge { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.fg-badge { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* background picker (crop modal) */
.bg-section { margin-top: 12px; }
.bg-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.bg-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bg-opt {
  flex: 0 0 auto; width: 78px; padding: 0; overflow: hidden; cursor: pointer;
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
}
.bg-opt.selected { border-color: var(--navy); }
.bg-opt { position: relative; }
.bg-opt.is-disabled { opacity: .45; }
.fg-num {
  position: absolute; top: 4px; right: 4px; z-index: 1;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.bg-thumb { display: block; width: 100%; height: 74px; object-fit: cover; }
.bg-orig {
  display: flex; align-items: center; justify-content: center;
  height: 74px; font-size: 12px; font-weight: 600; color: var(--muted); background: #f3f4f6;
}
.bg-name {
  display: block; font-size: 11px; padding: 3px 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--muted);
}
.bg-status { font-size: 12px; color: var(--muted); min-height: 16px; margin-top: 4px; }

/* custom text (crop modal) */
.text-section { margin-top: 12px; }
.text-hint { font-weight: 400; }
.text-input {
  width: 100%; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; margin-bottom: 8px; color: var(--navy);
}
.text-input:focus { outline: 2px solid #bfdbfe; border-color: var(--navy); }
.text-styles { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.text-style {
  flex: 0 0 auto; padding: 8px 14px; font-size: 15px; cursor: pointer;
  background: #fff; border: 2px solid var(--line); border-radius: 999px; color: var(--navy);
}
.text-style.selected { border-color: var(--navy); background: #eef2ff; }
.text-pos { display: flex; gap: 8px; padding: 2px 0 6px; }
.text-pos-btn {
  flex: 0 0 auto; padding: 8px 14px; font-size: 15px; cursor: pointer;
  background: #fff; border: 2px solid var(--line); border-radius: 999px; color: var(--navy);
}
.text-pos-btn.selected { border-color: var(--navy); background: #eef2ff; }
.text-warn { font-size: 13px; color: #92400e; background: #fef3c7; border-radius: 8px; padding: 8px 10px; margin: 2px 0 8px; }
.text-style.font-classic { font-family: "Anton", sans-serif; letter-spacing: 1px; }
.text-style.font-script { font-family: "Dancing Script", cursive; font-weight: 700; font-size: 19px; }
.text-style.font-rounded { font-family: "Fredoka", sans-serif; font-weight: 600; }
.text-colors { display: flex; gap: 8px; padding: 2px 0 6px; }
.text-color {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #d1d5db; padding: 0; cursor: pointer; flex: 0 0 auto;
}
.text-color.selected { border-color: var(--navy); box-shadow: 0 0 0 2px #eef2ff; }
.text-badge { background: #fdf4ff; border-color: #f0abfc; color: #86198f; }
.overlay-toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 12px;
  padding: 11px 12px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--navy);
}
.overlay-toggle input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.ovl-admin { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.link-btn { background: none; border: 0; color: var(--navy); font-size: 13px; cursor: pointer; padding: 4px 0; }
.link-btn.danger { color: var(--danger); }

.add-photos {
  border: 2px dashed #c7d2fe; border-radius: 12px; background: #eef2ff;
  padding: 22px; text-align: center; color: var(--navy); cursor: pointer; margin-bottom: 16px;
  font-size: 15px; font-weight: 600;
}
.add-photos small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid #bfdbfe; border-color: var(--navy); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 4px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .error { display: block; }

.totals { font-size: 15px; }
.totals .trow { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .trow.grand { font-weight: 700; font-size: 19px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.totals .deal { color: var(--green-dark); font-size: 13px; }

.btn {
  display: block; width: 100%; padding: 15px; border: 0; border-radius: 12px;
  background: var(--green); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { background: #9ca3af; cursor: not-allowed; }
.btn.secondary { background: var(--navy); }
.btn.secondary:hover { background: var(--navy-dark); }
.btn.ghost { background: #eef2ff; color: var(--navy); }
.btn.small { width: auto; padding: 9px 16px; font-size: 14px; display: inline-block; }

.sticky-pay {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.sticky-pay .inner { max-width: 720px; margin: 0 auto; }

/* crop modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(15,23,42,.72); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 16px; max-width: 480px; width: 100%;
  max-height: 92vh; overflow-y: auto; padding: 18px;
}
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; background: #111; border-radius: 12px; overflow: hidden; touch-action: none; }
.crop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crop-mask {
  position: absolute; inset: 6%; border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0,0,0,.55);
  border: 2px dashed #fff; pointer-events: none;
}
.crop-controls { padding: 12px 4px 0; }
.crop-controls input[type=range] { width: 100%; }
.crop-actions { display: flex; gap: 10px; margin-top: 22px; }
.crop-actions .btn { margin: 0; }

/* generic modal */
.detail-modal { max-width: 640px; }
.detail-modal img.order-photo {
  width: 140px; height: 140px; object-fit: cover; border-radius: 50%;
  border: 2px dashed #c7d2fe; margin-bottom: 8px; display: block;
}
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 14px; margin: 10px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.status-chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.status-pending_payment { background: #fef3c7; color: #92400e; }
.status-paid { background: #dbeafe; color: #1e40af; }
.status-ready { background: #dcfce7; color: #166534; }
.status-picked_up { background: #f3f4f6; color: #4b5563; }
.status-gallery { background: #ede9fe; color: #5b21b6; }
.status-rush { background: #fee2e2; color: #991b1b; }
.status-ship { background: #e0e7ff; color: #3730a3; }
.pay-paid { background: #dcfce7; color: #166534; }
.pay-awaiting { background: #fef3c7; color: #92400e; }
.pay-expired { background: #f3f4f6; color: #6b7280; }
.pay-unpaid { background: #fee2e2; color: #991b1b; }
.pay-checking { background: #f3f4f6; color: #9ca3af; }

.info-note { font-size: 14px; line-height: 1.5; }
.info-note b { color: var(--navy); }
.rush-row { cursor: pointer; align-items: center; }
.rush-row span:first-child { display: flex; align-items: center; gap: 8px; }
.rush-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--navy); }
.radio-row, .field label.radio-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; line-height: 1.3; cursor: pointer; }
.radio-row input[type=radio] { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--navy); position: relative; top: 2px; }
.cash-row, .field label.cash-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; line-height: 1.3; cursor: pointer; }
.cash-row input[type=checkbox] { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--navy); position: relative; top: 2px; }
.pay-cash { background: #fef3c7; color: #92400e; }

.consent-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; cursor: pointer; }
.consent-row input[type=checkbox] { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--navy); }
/* Button-text controls: font/position/color groups share one flex row and
   wrap onto more lines on narrow screens, instead of stacking full-width. */
.text-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 10px; align-items: flex-start; }
.text-group { display: flex; flex-direction: column; gap: 6px; }
.text-group-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.order-card { cursor: pointer; }
.order-card:hover { border-color: var(--navy); }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-head b { font-size: 16px; }
.order-meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

.tabs { display: flex; gap: 8px; margin: 0 -16px 16px; padding: 0 16px; overflow-x: auto; }
.tabs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chips button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.chips button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.check-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

.pin-wrap { max-width: 360px; margin: 60px auto; text-align: center; }
.pin-wrap input {
  font-size: 28px; letter-spacing: 12px; text-align: center; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; width: 100%; margin: 14px 0;
}

.notif { border-left: 4px solid var(--green); }
.notif .mock-tag {
  display: inline-block; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px;
}
.notif .sent-tag {
  display: inline-block; background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px;
}
.notif pre {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  font-size: 13px; white-space: pre-wrap; font-family: inherit; margin: 8px 0 0;
}

.success-hero { text-align: center; padding: 34px 10px; }
.success-hero .check {
  width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff;
  font-size: 40px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.order-num {
  font-size: 15px; background: #eef2ff; border: 1px dashed var(--navy); color: var(--navy);
  border-radius: 10px; padding: 10px; margin: 14px 0; font-weight: 700;
}

.spinner {
  display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 15px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 99;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: 90vw; text-align: center;
}

/* homepage */
.home-hero { padding: 40px 22px 34px; }
.home-logo { height: 64px; margin-bottom: 10px; }
.home-hero .brand { font-size: 15px; }
.home-hero h1 { font-size: 30px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-item figcaption { font-size: 12px; color: var(--muted); padding: 8px 10px; }
.event-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; text-decoration: none; color: var(--ink); background: #fff; font-weight: 600; }
.event-row:hover { border-color: var(--navy); }
.event-row .chev { color: var(--navy); font-size: 20px; font-weight: 700; }
.home-footer { text-align: center; padding: 26px 10px 10px; color: var(--muted); font-size: 14px; }
.home-footer a { color: var(--navy); }
.home-footer .fine { font-size: 12px; margin-top: 6px; letter-spacing: 1px; text-transform: uppercase; }
.field textarea {
  width: 100%; padding: 12px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-family: inherit; resize: vertical;
}
.field textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--navy); }

/* print sheets */
#print-area { display: none; }
.print-page {
  position: relative; background: #fff; margin: 0 auto 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.print-circle {
  position: absolute; border-radius: 50%; overflow: hidden;
  border: 3px dashed #94a3b8; background: #fff;
}
.print-circle.is-magnet {
  border-color: #e11d48; /* rose: magnet cut-circles, distinct from button gray */
}
.print-circle.is-ornament {
  border-color: #16a34a; /* green: ornament buttons (button in a 3D frame), distinct from gray buttons and rose magnets */
}
.print-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Event tracker tab — styled after the Weekly Workout Tracker: soft
   blue-gray surface, white 18px-radius cards, navy text, big-number tiles. */
.trk-wrap { background: #eef3f5; border-radius: 18px; padding: 18px; color: #10243a; font-family: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif; }
.trk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trk-head select { padding: 9px; border: 1px solid #ccd8dd; border-radius: 10px; font: inherit; font-size: 14px; background: #fcfdfc; color: #10243a; max-width: 100%; }
.trk-updated { color: #617180; font-size: 13px; }
.trk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.trk-tile { background: #fcfdfc; border: 1px solid #ccd8dd; border-radius: 18px; padding: 14px 16px; }
.trk-tile .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.trk-tile .l { color: #617180; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.trk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.trk-card { background: #fcfdfc; border: 1px solid #ccd8dd; border-radius: 18px; padding: 16px; }
.trk-card h3 { margin: 0 0 8px; font-size: 16px; }
.trk-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e6edef; font-size: 14px; }
.trk-row:last-child { border-bottom: none; }
.trk-row .dim, .trk-row span.dim { color: #617180; }
.trk-field { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.trk-field input { width: 112px; padding: 8px 10px; border: 1px solid #ccd8dd; border-radius: 10px; font: inherit; text-align: right; background: #fff; color: #10243a; }
.trk-field input:focus { border-color: #10243a; outline: none; }
.trk-pos { color: #15803d; }
.trk-neg { color: #b91c1c; }
.trk-title { margin: 14px 0 4px; font-size: 20px; }
.trk-exp { display: flex; gap: 8px; align-items: center; padding: 5px 0; }
.trk-exp .exp-label { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #ccd8dd; border-radius: 10px; font: inherit; background: #fff; color: #10243a; }
.trk-exp .exp-amt { width: 100px; padding: 8px 10px; border: 1px solid #ccd8dd; border-radius: 10px; font: inherit; text-align: right; background: #fff; color: #10243a; }
.trk-exp input:focus { border-color: #10243a; outline: none; }
.trk-sub { color: #617180; font-size: 12px; text-align: right; min-height: 2px; }
.print-cap {
  position: absolute; text-align: center; font-size: 8pt; color: #475569;
  transform: translateX(-50%); white-space: nowrap;
}
#p-print:disabled { opacity: .55; }
@media print {
  body { background: #fff; }
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  .print-page { box-shadow: none; margin: 0; page-break-after: always;
    transform: none !important; } /* undo the screen-preview shrink */
  @page { size: letter; margin: 0; }
}
