/* Silverline gift cards marketplace — scoped under .gc-* / #view-gift-cards. Uses the dashboard palette. */
:root {
  --gc-cobalt: #0A4D8C; --gc-cobalt2: #117ACA; --gc-teal: #009CDE; --gc-ink: #1A1A1A; --gc-muted: #414042; --gc-soft: #566070;
  --gc-line: #D6DCE5; --gc-line2: #E8ECF2; --gc-bg: #F5F7FA; --gc-ok: #0B7A55; --gc-bad: #C62828; --gc-warn: #B54708;
}
.gc-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.gc-lock { overflow: hidden; }

/* ---------- logos & cards ---------- */
.gc-logo { display: block; width: 100%; height: 100%; background-color: var(--lc, #fff); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.gc-mono { display: grid; place-items: center; width: 100%; height: 100%; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1em; }
.gc-card { position: relative; aspect-ratio: 1.586; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; box-shadow: 0 14px 30px -14px rgba(5, 43, 82, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.12); isolation: isolate; }
.gc-card-shine { position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(120deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.10) 50%, rgba(255, 255, 255, 0) 60%); z-index: -1; pointer-events: none; }
.gc-card-logo { display: block; width: 46%; max-width: 150px; height: 40%; margin: 6% auto 0; }
.gc-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.92; }
.gc-card-amt { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; text-transform: none; font-variant-numeric: tabular-nums; }
.gc-art { margin-bottom: 14px; }
.gc-art-sm { margin: 4px auto 14px; max-width: 280px; }
.gc-card-done { max-width: 300px; margin: 0 auto 16px; }
.gc-mini-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 9px; border-radius: 12px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.gc-mini { display: inline-flex; flex: none; }

/* ---------- marketplace ---------- */
.gc-market, .gc-orders { padding: 0 !important; overflow: visible; }
.gc-market-head, .gc-orders-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 20px 22px 6px; }
.gc-search { position: relative; flex: 1 1 280px; max-width: 380px; display: flex; align-items: center; }
.gc-search svg { position: absolute; left: 13px; color: var(--gc-soft); pointer-events: none; }
.gc-search input { width: 100%; background: var(--gc-bg); border: 1px solid var(--gc-line); border-radius: 12px; padding: 10px 14px 10px 38px; font-size: 13px; color: var(--gc-ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.gc-search input:focus { border-color: var(--gc-cobalt); box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.14); background: #fff; }
.gc-search-sm { flex: 0 1 240px; }
.gc-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 22px 0; border-bottom: 1px solid var(--gc-line2); scrollbar-width: none; }
.gc-tabs::-webkit-scrollbar { display: none; }
.gc-tab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--gc-muted); border: 0; background: transparent; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; border-radius: 8px 8px 0 0; transition: color .15s, background .15s; }
.gc-tab:hover { color: var(--gc-cobalt); background: rgba(10, 77, 140, 0.05); }
.gc-tab.on { color: var(--gc-cobalt); border-bottom-color: var(--gc-teal); }
.gc-tab-n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--gc-line2); color: var(--gc-muted); }
.gc-tab.on .gc-tab-n { background: var(--gc-cobalt); color: #fff; }
.gc-tab:focus-visible, .gc-tile:focus-visible, .gc-chip input:focus-visible + span, .gc-occ-btn:focus-visible, .gc-x:focus-visible, .gc-link:focus-visible, .gc-opt input:focus-visible + span, .gc-stepper button:focus-visible, .gc-act:focus-visible, .gc-details summary:focus-visible { outline: 3px solid rgba(0, 156, 222, 0.55); outline-offset: 2px; }

.gc-grid { list-style: none; margin: 0; padding: 20px 22px 8px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gc-grid[hidden] { display: none; }
.gc-tile { width: 100%; display: flex; flex-direction: column; text-align: left; background: #fff; border: 1px solid var(--gc-line2); border-radius: 18px; padding: 8px 8px 12px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; font: inherit; color: inherit; }
.gc-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -14px rgba(10, 77, 140, 0.35); border-color: #BFD3E8; }
.gc-tile-art { position: relative; display: block; aspect-ratio: 1.586; border-radius: 12px; overflow: hidden; padding: 20% 26%; isolation: isolate; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.gc-tile-art .gc-logo, .gc-tile-art .gc-mono { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18)); }
.gc-tile-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.gc-pill { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.02em; background: rgba(255, 255, 255, 0.94); color: var(--gc-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.gc-pill-pop { background: #FFF4D6; color: #7A4B00; }
.gc-pill-pts { background: #E1F5FE; color: #035E86; }
.gc-tile-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px 0; }
.gc-tile-name { font-size: 14px; font-weight: 700; color: var(--gc-ink); }
.gc-tile-range { font-size: 12px; color: var(--gc-muted); font-variant-numeric: tabular-nums; }
.gc-tile-line { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--gc-soft); font-weight: 600; margin-top: 3px; }
.gc-inst { display: inline-flex; align-items: center; gap: 3px; color: var(--gc-ok); }
.gc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; color: var(--gc-muted); font-size: 13px; }
.gc-empty[hidden] { display: none; }
.gc-empty strong { color: var(--gc-ink); font-size: 15px; }
.gc-trust { list-style: none; margin: 14px 0 0; padding: 14px 22px; border-top: 1px solid var(--gc-line2); display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); font-size: 12px; color: var(--gc-muted); background: var(--gc-bg); border-radius: 0 0 16px 16px; }
.gc-trust li { display: flex; align-items: center; gap: 10px; }
.gc-trust svg { color: var(--gc-cobalt2); flex: none; }
.gc-trust strong { color: var(--gc-ink); }

/* ---------- orders ---------- */
.gc-orders-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gc-select { width: auto !important; min-width: 150px; }
.gc-table-wrap { overflow-x: auto; padding: 8px 8px 0; }
.gc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gc-table[hidden] { display: none; }
.gc-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gc-soft); padding: 10px 14px; border-bottom: 1px solid var(--gc-line2); white-space: nowrap; }
.gc-table td { padding: 12px 14px; border-bottom: 1px solid var(--gc-line2); vertical-align: middle; color: var(--gc-ink); }
.gc-table tbody tr:last-child td { border-bottom: 0; }
.gc-table tbody tr:hover { background: #F8FAFD; }
.gc-num { text-align: right !important; }
.gc-ord-brand { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.gc-ord-brand .gc-mini-badge { width: 36px; height: 36px; padding: 8px; }
.gc-ord-name { font-weight: 700; }
.gc-ord-rn { font-weight: 600; }
.gc-ord-ref { font-size: 11px; color: var(--gc-soft); }
.gc-fail { color: var(--gc-bad); max-width: 220px; margin-top: 4px; }
.gc-status { display: inline-flex !important; align-items: center; gap: 5px; }
.gc-status .chip, .chip-amber.gc-status { color: #8A4B00; }
.gc-actions { text-align: right; white-space: nowrap; }
.gc-act-row { display: inline-flex; gap: 6px; }
.gc-act { padding: 6px 10px !important; font-size: 12px !important; }
.gc-more { display: flex; justify-content: center; padding: 8px 0 18px; }
.gc-more button[hidden] { display: none; }

/* ---------- overlay / drawer ---------- */
.gc-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(6, 22, 44, 0.55); backdrop-filter: blur(2px); display: flex; justify-content: flex-end; opacity: 0; transition: opacity .2s ease; }
.gc-overlay[hidden] { display: none; }
.gc-overlay.open { opacity: 1; }
.gc-overlay-center { align-items: center; justify-content: center; padding: 16px; }
.gc-drawer { width: min(1000px, 100%); height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -24px 0 60px rgba(5, 43, 82, 0.35); transform: translateX(32px); transition: transform .25s cubic-bezier(.2, .8, .2, 1); outline: none; font-family: inherit; color: var(--gc-ink); }
.gc-overlay.open .gc-drawer { transform: none; }
.gc-d-head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--gc-line2); }
.gc-d-titles { flex: 1; min-width: 0; }
.gc-d-titles h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.gc-d-titles p { font-size: 12px; color: var(--gc-muted); margin: 2px 0 0; }
.gc-x { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gc-line); background: #fff; color: var(--gc-muted); cursor: pointer; flex: none; }
.gc-x:hover { background: var(--gc-bg); color: var(--gc-ink); }
.gc-d-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px; background: var(--gc-bg); }
.gc-d-body[hidden], .gc-done[hidden] { display: none; }
.gc-form { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 940px; margin: 0 auto; }
@media (min-width: 900px) {
  .gc-form { grid-template-columns: 340px 1fr; align-items: start; }
  .gc-side { position: sticky; top: 0; }
}
.gc-side { display: flex; flex-direction: column; gap: 12px; }
.gc-summary { background: #fff; border: 1px solid var(--gc-line2); border-radius: 16px; padding: 16px 18px; }
.gc-summary h3 { font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.gc-summary dl { margin: 0; }
.gc-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--gc-muted); }
.gc-summary dd { margin: 0; color: var(--gc-ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.gc-summary .gc-total { border-top: 1px dashed var(--gc-line); margin-top: 6px; padding-top: 12px; font-size: 15px; color: var(--gc-ink); font-weight: 700; }
.gc-summary .gc-total dd { font-size: 18px; font-weight: 800; }
.gc-summary .gc-pts dd { color: var(--gc-ok); }
.gc-free { color: var(--gc-ok); font-weight: 700; }
.gc-details { background: #fff; border: 1px solid var(--gc-line2); border-radius: 14px; padding: 0 16px; font-size: 12px; color: var(--gc-muted); }
.gc-details summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--gc-ink); padding: 13px 0; list-style: none; display: flex; justify-content: space-between; border-radius: 8px; }
.gc-details summary::-webkit-details-marker { display: none; }
.gc-details summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--gc-cobalt2); }
.gc-details[open] summary::after { content: "−"; }
.gc-details ol, .gc-details ul { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }

.gc-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gc-fs { background: #fff; border: 1px solid var(--gc-line2); border-radius: 16px; padding: 16px 18px 18px; margin: 0; min-width: 0; }
.gc-fs legend { font-size: 13px; font-weight: 700; padding: 0 6px; margin-left: -6px; color: var(--gc-ink); }
.gc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.gc-chip { position: relative; cursor: pointer; }
.gc-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gc-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--gc-line); background: #fff; font-weight: 700; font-size: 14px; color: var(--gc-ink); font-variant-numeric: tabular-nums; transition: all .15s; }
.gc-chip:hover span { border-color: var(--gc-cobalt2); }
.gc-chip input:checked + span { background: var(--gc-cobalt); border-color: var(--gc-cobalt); color: #fff; box-shadow: 0 6px 14px -6px rgba(10, 77, 140, 0.6); }
.gc-custom { margin-bottom: 14px; }
.gc-money { position: relative; }
.gc-money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--gc-muted); }
.gc-money input { padding-left: 28px !important; font-size: 16px !important; font-weight: 700; }
.gc-hint { font-size: 11.5px; color: var(--gc-soft); margin: 6px 0 0; }
.gc-err { font-size: 12px; font-weight: 600; color: var(--gc-bad); margin: 6px 0 0; }
.gc-err[hidden] { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--gc-bad) !important; box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12) !important; }
.gc-qty .gc-stepper { display: inline-flex; align-items: center; border: 1px solid var(--gc-line); border-radius: 12px; overflow: hidden; background: #fff; }
.gc-stepper button { width: 42px; height: 42px; border: 0; background: var(--gc-bg); font-size: 18px; font-weight: 700; cursor: pointer; color: var(--gc-ink); }
.gc-stepper button:hover { background: var(--gc-line2); }
.gc-stepper input { width: 54px; height: 42px; text-align: center; border: 0; font-size: 15px; font-weight: 700; outline: none; background: #fff; }
.gc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gc-opt { position: relative; cursor: pointer; display: block; }
.gc-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gc-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--gc-line); border-radius: 14px; background: #fff; transition: all .15s; }
.gc-opt strong { font-size: 13px; }
.gc-opt small { font-size: 11.5px; color: var(--gc-soft); }
.gc-opt input:checked + span { border-color: var(--gc-cobalt); background: #EEF5FC; box-shadow: inset 0 0 0 1px var(--gc-cobalt); }
.gc-date { margin-top: 12px; }
.gc-date[hidden] { display: none; }
.gc-row2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .gc-row2 { grid-template-columns: 1fr 1.3fr; } }
.gc-opt-tag { font-weight: 500; font-size: 10px; text-transform: none; letter-spacing: 0; color: var(--gc-soft); background: var(--gc-line2); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
.gc-link { margin-top: 10px; background: none; border: 0; padding: 2px 0; color: var(--gc-cobalt2); font-weight: 700; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; border-radius: 6px; }
.gc-link[hidden] { display: none; }
.gc-occ { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gc-occ-btn { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gc-line); background: #fff; font-size: 12px; font-weight: 600; color: var(--gc-muted); cursor: pointer; transition: all .15s; }
.gc-occ-btn:hover { border-color: var(--gc-cobalt2); color: var(--gc-cobalt); }
.gc-occ-btn[aria-pressed="true"] { background: var(--gc-cobalt); border-color: var(--gc-cobalt); color: #fff; }
.gc-fs textarea { resize: vertical; min-height: 76px; }
.gc-msg-foot { display: flex; justify-content: space-between; gap: 10px; }
.gc-msg-foot .gc-hint { margin-left: auto; font-variant-numeric: tabular-nums; }
.gc-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--gc-muted); cursor: pointer; padding: 4px 2px; line-height: 1.45; }
.gc-agree input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--gc-cobalt); flex: none; }
.gc-banner { border-radius: 14px; padding: 12px 14px; font-size: 13px; font-weight: 600; }
.gc-banner[hidden] { display: none; }
.gc-banner-error { background: #FDECEC; color: #8F1D1D; border: 1px solid #F5C2C2; }
.gc-d-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--gc-line2); background: #fff; }
.gc-d-foot[hidden] { display: none; }
.gc-foot-total { display: flex; flex-direction: column; font-size: 11px; color: var(--gc-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.gc-foot-total strong { font-size: 20px; color: var(--gc-ink); letter-spacing: -0.02em; text-transform: none; }
.gc-submit { min-width: 220px; padding-top: 13px !important; padding-bottom: 13px !important; font-size: 14px !important; }
.gc-submit:disabled { opacity: .65; cursor: progress; }

/* confirmation */
.gc-done { outline: none; }
.gc-done-in { max-width: 520px; margin: 0 auto; text-align: center; padding: 10px 0 20px; }
.gc-done-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: #E3F6EE; color: var(--gc-ok); }
.gc-done h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.gc-done-lead { font-size: 13.5px; color: var(--gc-muted); margin: 8px 0 18px; }
.gc-codebox { background: #fff; border: 1px dashed var(--gc-line); border-radius: 16px; padding: 14px; margin: 0 auto 14px; display: flex; flex-direction: column; gap: 4px; max-width: 360px; }
.gc-codebox-l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--gc-soft); }
.gc-codebox-v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.gc-codebox-n { font-size: 11.5px; color: var(--gc-soft); }
.gc-done-sum { background: #fff; border: 1px solid var(--gc-line2); border-radius: 16px; padding: 6px 18px; margin: 0 0 18px; text-align: left; }
.gc-done-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--gc-line2); font-size: 13px; color: var(--gc-muted); }
.gc-done-sum > div:last-child { border-bottom: 0; }
.gc-done-sum dd { margin: 0; font-weight: 700; color: var(--gc-ink); }
.gc-done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* code dialog */
.gc-modal { position: relative; width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 26px 24px 22px; text-align: center; box-shadow: 0 30px 80px rgba(5, 43, 82, 0.45); outline: none; }
.gc-modal h2 { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.gc-modal-x { position: absolute; right: 12px; top: 12px; }
.gc-code { margin: 14px 0; padding: 14px; background: var(--gc-bg); border: 1px solid var(--gc-line2); border-radius: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; letter-spacing: .1em; word-break: break-all; }
.gc-code.shown { background: #EEF5FC; border-color: #BFD3E8; color: var(--gc-cobalt); }
.gc-modal-actions { display: flex; gap: 8px; justify-content: center; }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .gc-drawer { width: 100%; }
}
@media (max-width: 640px) {
  .gc-market-head, .gc-orders-head { padding: 16px 16px 4px; }
  .gc-search, .gc-search-sm { max-width: none; flex-basis: 100%; }
  .gc-tabs { padding: 8px 16px 0; }
  .gc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 12px 6px; }
  .gc-tile-art { padding: 18% 22%; }
  .gc-trust { padding: 14px 16px; }
  .gc-d-body { padding: 14px; }
  .gc-d-head { padding: 12px 14px; }
  .gc-d-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .gc-submit { min-width: 0; flex: 1; }
  .gc-seg { grid-template-columns: 1fr; }
  /* orders table -> stacked cards */
  .gc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .gc-table, .gc-table tbody, .gc-table tr, .gc-table td { display: block; width: 100%; }
  .gc-table tr { border: 1px solid var(--gc-line2); border-radius: 16px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  .gc-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 7px 0; text-align: right; }
  .gc-table td::before { content: attr(data-label); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gc-soft); text-align: left; flex: none; }
  .gc-table td[data-label=""]::before { content: none; }
  .gc-table td:first-child { padding-top: 4px; }
  .gc-actions .gc-act-row { width: 100%; justify-content: flex-end; }
  .gc-table-wrap { padding: 8px 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gc-overlay, .gc-drawer, .gc-tile, .gc-chip span { transition: none !important; }
  .gc-tile:hover { transform: none; }
}

/* Primary actions: darker than the stock .btn-tan so white text meets WCAG AA contrast (4.5:1). */
.gc-submit, .gc-done .btn-tan { background: #0E6DB5 !important; }
.gc-submit:hover:not(:disabled), .gc-done .btn-tan:hover { background: #0A4D8C !important; }

/* Mobile purchase panel: card art first, then the form, then summary + terms. */
@media (max-width: 899px) {
  .gc-form { display: flex; flex-direction: column; gap: 14px; }
  .gc-side { display: contents; }
  .gc-art { order: 0; max-width: 360px; width: 100%; align-self: center; margin-bottom: 0; }
  .gc-fields { order: 1; }
  .gc-summary { order: 2; }
  .gc-details { order: 3; }
}

#sh-overlay { justify-content: stretch; }
#sh-drawer { width: 100%; max-width: none; }
.sh-d-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sh-d-main { min-width: 0; }
.sh-d-side { position: sticky; top: 0; }
.share-price-card { background: #fff; border: 1px solid #e6e8eb; border-radius: 16px; padding: 12px 12px 8px; }
.share-chart-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.share-price-card .home-period-chip { color: #5f6368; border-color: #e6e8eb; background: #fff; }
.share-price-card .home-period-chip.is-active { color: #fff; background: #1a73e8; border-color: #1a73e8; }
.share-ohlc { margin: 0; color: #5f6368; font-size: 12px; font-variant-numeric: tabular-nums; }
.share-price-plot { height: min(62vh, 560px); min-height: 320px; }
@media (max-width: 900px) {
  .sh-d-layout { grid-template-columns: 1fr; }
  .sh-d-side { position: static; }
}

.my-shares-plot { height: 260px; min-height: 200px; position: relative; }
.my-shares-alloc { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.my-shares-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.my-shares-legend li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.my-shares-swatch { width: 10px; height: 10px; border-radius: 999px; flex: none; }
.my-shares-spark { width: 96px; height: 32px; display: block; }
.share-meter { height: 8px; border-radius: 999px; background: #E8ECF2; overflow: hidden; }
.share-meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: #0B7A55; }
.share-meter > span.is-down { background: #C62828; }
.share-meter > span.is-weight { background: #0A4D8C; }
@media (max-width: 640px) {
  .my-shares-plot { height: 220px; }
}
/* Market and holdings filter bars. Search grows; selects stay compact.
   The Chatwoot launcher sits fixed at the bottom-right, so these bars stay
   in the card header and the page keeps a clear strip under that button. */
.share-market-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  min-width: 0;
}
.share-filters-scroll { display: contents; }
.share-market-tools .field-input {
  width: auto;
  min-width: 0;
  height: 2.5rem;
}
.share-market-tools input[type="search"] {
  flex: 1 1 14rem;
}
.share-market-tools select.field-input {
  flex: 0 0 auto;
  width: 10.25rem;
}
.share-market-tools .home-period-chips { flex: 0 0 auto; }
#view-shares,
#view-my-shares { padding-bottom: 5.75rem; }
@media (max-width: 1023px) {
  #view-shares,
  #view-my-shares { padding-bottom: 7.5rem; }
  button.woot-widget-bubble:not(.woot--close) {
    bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (max-width: 1024px) {
  .share-market-tools { flex-wrap: wrap; }
  .share-market-tools input[type="search"] { flex: 1 1 100%; }
  .share-market-tools select.field-input { flex: 1 1 8.5rem; width: auto; }
}
@media (max-width: 640px) {
  .share-filters-scroll {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .share-market-tools select.field-input {
    flex: 0 0 auto;
    width: 9.5rem;
  }
}
.share-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #E6F5FC;
  color: #0A4D8C;
  font-weight: 700;
  font-size: 14px;
}
.share-logo {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
}
.share-logo .share-mark { position: absolute; inset: 0; }
.share-logo img {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #E8ECF2;
}
.share-quotes {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* The chat launcher is fixed at the bottom-right. Inset the buy column
     so a row scrolled under that button still shows its action. */
  padding-right: 4.75rem;
}
#view-my-shares #my-shares-holdings { padding-right: 4.75rem; }
.share-quote-empty { margin: 0; padding: 16px 20px; color: #6b7280; font-size: 13px; }
.share-quote,
.share-quote-head {
  display: grid;
  grid-template-columns: minmax(140px, 1.5fr) 112px minmax(108px, 0.9fr) 4.5rem minmax(108px, 0.9fr) 6.5rem auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 16px;
  border-top: 1px solid #E8ECF2;
  min-width: 0;
}
.share-quote { cursor: pointer; }
.share-quote-head {
  cursor: default;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f7f9fb;
  border-top: 0;
}
.share-sort {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
}
.share-sort.is-active { color: #0A4D8C; font-weight: 700; }
.share-col-vol,
.share-quote-px,
.share-col-px { text-align: right; }
.share-col-px { display: flex; justify-content: flex-end; gap: 10px; }
.share-col-spark { display: flex; align-items: center; justify-content: center; min-width: 0; }
.share-spark { width: 112px; height: 36px; }
.share-miss { color: #98a2b3; }
.share-id-mark { position: relative; flex: none; width: 36px; height: 36px; }
.share-id-mark .share-star {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px #E8ECF2;
}
.share-star {
  flex: none;
  width: 18px;
  height: 18px;
  border: 0;
  background: #fff;
  color: #98a2b3;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.share-star.is-on { color: #B45309; }
.share-own {
  display: inline-flex;
  margin-top: 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E6F5FC;
  color: #0A4D8C;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}
.share-range { min-width: 0; }
.share-range-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: #E8ECF2;
  margin: 2px 0 3px;
}
.share-range-track > span {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0A4D8C;
  transform: translate(-50%, -50%);
}
.share-range-lab {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.share-board-strip {
  display: flex;
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  padding: 12px 16px 4px;
  align-items: flex-start;
}
.share-mover-group { flex: 0 0 auto; min-width: 0; }
.share-mover-group > p {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280;
}
.share-mover-group > div { display: flex; gap: 8px; }
.share-mover {
  flex: 0 0 auto;
  border: 1px solid #E8ECF2;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  min-width: 8.5rem;
  text-align: left;
  cursor: pointer;
}
.share-mover strong { display: block; font-size: 13px; }
.share-mover-name {
  display: block;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #6b7280;
}
@media (max-width: 1100px) {
  .share-col-52 { display: none; }
  .share-quote,
  .share-quote-head {
    grid-template-columns: minmax(120px, 1.4fr) 100px minmax(96px, 0.85fr) 4.25rem 6rem auto;
  }
  .share-spark { width: 100px; }
}
.share-quote:hover { background: #F7FAFC; }
.share-quote-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.share-quote-copy { min-width: 0; }
.share-quote-name {
  font-weight: 650;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-quote-sub {
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  color: #6b7280;
}
.share-sub-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-quote-px { text-align: right; white-space: nowrap; }
.share-quote-price { font-weight: 700; font-size: 13px; line-height: 1.2; }
.share-quote-chg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-top: 2px;
}
.share-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}
.share-pill.is-up { background: #E7F6EE; color: #0B7A55; }
.share-pill.is-down { background: #FDECEC; color: #C62828; }
.share-pill.is-flat { background: #F3F4F6; color: #6b7280; }
.share-chg-amt { font-size: 11px; line-height: 1.2; }
.share-quote-buy {
  padding: 6px 12px !important;
  white-space: nowrap;
  flex: none;
}
@media (max-width: 640px) {
  .share-region,
  .share-chg-amt,
  .share-quote-head,
  .share-col-day,
  .share-col-vol,
  .share-col-52 { display: none; }
  .share-quote {
    grid-template-columns: minmax(0, 1fr) 48px max-content;
    padding: 10px 12px;
    gap: 6px 8px;
  }
  .share-quote-id { grid-column: 1; grid-row: 1 / span 2; }
  .share-col-spark { grid-column: 2; grid-row: 1 / span 2; }
  .share-quote-px { grid-column: 3; grid-row: 1; }
  .share-quote-buy { grid-column: 3; grid-row: 2; justify-self: end; }
  .share-spark { width: 48px; height: 28px; }
  .share-quote-buy { padding: 6px 10px !important; }
  .share-id-mark,
  .share-quote .share-logo,
  .share-quote .share-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .share-quote .share-logo img { width: 32px; height: 32px; }
}
.share-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 0 0 14px; }
.share-facts div { min-width: 0; }
.share-facts dt { margin: 0; font-size: 11px; color: #6b7280; }
.share-facts dd { margin: 1px 0 0; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

#invest-buy-modal { justify-content: stretch; }
#invest-buy-drawer { width: 100%; max-width: none; }
.invest-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
#invest-buy-drawer #invest-modal-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.invest-place { margin: 4px 0 0; font-size: 13px; color: #6b7280; }
.invest-summary { margin: 10px 0 14px; font-size: 13px; line-height: 1.5; color: #5c6b7a; }
.invest-hero-photo { display: block; width: 100%; height: min(46vh, 420px); object-fit: cover; border-radius: 16px; background: #eef1f4; margin: 0 0 14px; }
.invest-ticket { background: #fff; border: 1px solid #E8ECF2; border-radius: 16px; padding: 16px; }
.invest-close { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--gc-line); background: #fff; color: var(--gc-ink); font-size: 13px; font-weight: 700; cursor: pointer; flex: none; }
.invest-close:hover { background: var(--gc-bg); }
.share-price-plot.invest-roi-plot { height: 280px; min-height: 220px; }
.invest-faq, .share-faq { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.invest-faq .section-title, .share-faq .section-title { margin: 0 0 2px; }
.invest-faq .gc-details p, .share-faq .gc-details p { margin: 0 0 14px; line-height: 1.5; }
@media (max-width: 640px) {
  .share-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.profile-more { position: relative; }
.profile-more > summary { list-style: none; cursor: pointer; }
.profile-more > summary::-webkit-details-marker { display: none; }
.profile-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 12.5rem; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #fff; border: 1px solid #E8ECF2; border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.profile-more-menu .btn-ghost { width: 100%; justify-content: flex-start; text-align: left; }
.profile-purpose { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-purpose .home-period-chip { cursor: pointer; }
.profile-purpose input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[data-fund-fields][hidden] { display: none !important; }
@media (max-width: 640px) {
  .profile-actions { justify-content: flex-start; }
  .profile-more-menu { right: auto; left: 0; }
}
