/* Gemagine — luxe minimal theme */
:root {
  --cream: #fbf8f3;
  --paper: #ffffff;
  --ink: #1d1b18;
  --muted: #6b645a;
  --line: #e7e0d4;
  /* Brand: cobalt blue */
  --brand: #6666ff;        /* Light Cobalt Blue */
  --brand-dark: #3d3dc4;   /* deeper shade for text and links, for readability */
  --brand-soft: #ececff;
  --brand-tint: #f6f6ff;
  --ok: #2f6b4f;
  --warn: #9a5b12;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-dark); font-weight: 600; margin-bottom: .9em; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Header */
.site-header { border-top: 3px solid var(--brand); border-bottom: 1px solid var(--line); background: rgba(251, 248, 243, .92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; color: var(--brand); }
.brand span { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .04em; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--cream); flex-direction: column; align-items: flex-start; padding: 12px 24px 20px; border-bottom: 1px solid var(--line); gap: 14px; }
  .nav.open { display: flex; }
}

/* Buttons */
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 500; font-size: .95rem; border: 1px solid var(--brand); cursor: pointer; font-family: var(--sans); transition: background .15s, color .15s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Hero */
.hero { padding: 96px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto 2em; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-gem { width: 120px; margin: 0 auto 28px; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; position: relative; }
section.alt .card { background: var(--cream); }
.card .num { font-family: var(--serif); font-size: 2.6rem; color: var(--brand); line-height: 1; margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }
.badge { display: inline-block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; margin-bottom: 12px; }
.badge.live { background: #e5f0ea; color: var(--ok); }

/* Article list */
.article-list { display: grid; gap: 18px; }
.article-link { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; transition: border-color .15s; }
.article-link:hover { border-color: var(--brand); color: var(--ink); }
.article-link h3 { margin-bottom: .25em; }
.article-link p { margin: 0; color: var(--muted); }

/* Prose pages */
.page-head { padding-top: 64px; padding-bottom: 24px; }
.prose { padding-bottom: 72px; }
.prose h2 { margin-top: 1.6em; font-size: 2rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.callout { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0; }
.callout.warn { background: #fbf1e4; border-color: var(--warn); }
.callout p:last-child { margin: 0; }
table.spec { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; }
table.spec th, table.spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { font-weight: 600; background: var(--paper); }

/* Verify tool */
.tool { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; margin-bottom: 40px; }
.tabs { display: inline-flex; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.tabs button { border: 0; background: transparent; padding: 9px 22px; border-radius: 999px; cursor: pointer; font: 500 .95rem var(--sans); color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
.field { display: flex; gap: 12px; flex-wrap: wrap; }
.field input { flex: 1 1 260px; padding: 14px 18px; font: 1.05rem var(--sans); border: 1px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); letter-spacing: .04em; }
.field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
label.lbl { display: block; font-weight: 600; margin-bottom: 8px; font-size: .92rem; }
.hint { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.result { margin-top: 26px; display: none; }
.result.show { display: block; }
.result .status { font-weight: 600; margin-bottom: 10px; }
.result .status.ok { color: var(--ok); }
.result .status.bad { color: var(--warn); }
.checklist { list-style: none; padding: 0; margin: 14px 0; }
.checklist li { padding: 9px 0 9px 32px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 14px; height: 14px; border: 1.5px solid var(--brand); border-radius: 4px; }
.copy-note { font-size: .85rem; color: var(--ok); margin-left: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.disclaimer { max-width: var(--max); margin: 24px auto 0; padding: 0 24px; font-size: .8rem; color: var(--muted); }

/* ---------- Library ---------- */
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.count { color: var(--brand-dark); font-weight: 500; }
.stone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.stone-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.stone-art { position: relative; background: radial-gradient(circle at 50% 40%, #f8f7f5 0, #ecebe8 85%); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.stone-art svg { width: 82%; height: 82%; filter: drop-shadow(0 10px 12px rgba(40, 35, 30, .18)) drop-shadow(0 2px 3px rgba(40, 35, 30, .12)); }
.stone-photo { position: absolute; right: 10px; bottom: 10px; width: 54px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.stone-body { padding: 18px 20px 16px; display: flex; flex-direction: column; flex: 1; }
.stone-body h3 { font-size: 1.35rem; margin-bottom: .15em; }
.stone-sum { font-weight: 500; margin-bottom: .4em; }
.stone-meta { font-size: .88rem; color: var(--muted); margin-bottom: .8em; }
.stone-actions { margin-top: auto; display: flex; gap: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-dark); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--muted); }
.link-btn.back { margin-bottom: 14px; text-decoration: none; }
.empty { text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 28px; }
.methods-inline { margin-top: 24px; text-align: left; }

/* Dialog */
dialog#add-dialog { border: 0; border-radius: 18px; padding: 36px; width: min(980px, 96vw); max-height: 92vh; overflow: auto; background: var(--cream); color: var(--ink); box-shadow: 0 30px 80px rgba(30, 20, 5, .25); }
dialog#add-dialog::backdrop { background: rgba(29, 27, 24, .45); backdrop-filter: blur(2px); }
.dlg-x { position: absolute; top: 14px; right: 18px; background: none; border: 0; font-size: 2rem; line-height: 1; color: var(--muted); cursor: pointer; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
@media (max-width: 760px) { .methods { grid-template-columns: 1fr; } dialog#add-dialog { padding: 26px 18px; } }
.method { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.method:hover { border-color: var(--brand); transform: translateY(-2px); }
.method svg { width: 30px; height: 30px; color: var(--brand-dark); margin-bottom: 6px; }
.method b { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.method span { color: var(--muted); font-size: .9rem; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload { display: inline-block; margin: 8px 0 18px; }
.upload input:focus + .btn { outline: 2px solid var(--brand); outline-offset: 2px; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress .bar { height: 100%; background: var(--brand); transition: width .3s; }
.photo-preview img { max-height: 280px; border-radius: var(--radius); border: 1px solid var(--line); }
.swatch-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); vertical-align: -2px; }
pre { white-space: pre-wrap; font-size: .82rem; background: var(--paper); border: 1px solid var(--line); padding: 12px; border-radius: 10px; }
.status.bad, .bad { color: var(--warn); font-weight: 600; }

/* Stone form */
.form-cols { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
@media (max-width: 860px) { .form-cols { grid-template-columns: 1fr; } .form-preview { order: -1; } }
.form-preview { position: sticky; top: 0; }
.preview-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.preview-art { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #f8f7f5 0, #ecebe8 85%); border-radius: 10px; margin-bottom: 12px; }
.preview-art svg { width: 86%; height: 86%; filter: drop-shadow(0 10px 12px rgba(40,35,30,.18)) drop-shadow(0 2px 3px rgba(40,35,30,.12)); }
.form-photo img { margin: 10px auto 0; max-height: 140px; border-radius: 10px; }
.stone-form label { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.stone-form input:not([type=hidden]), .stone-form select, .stone-form textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: 1rem var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.stone-form input:focus, .stone-form select:focus, .stone-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.stone-form fieldset { border: 0; padding: 0; margin: 6px 0 4px; }
.stone-form legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .row.four { grid-template-columns: 1fr 1fr; } }
.shape-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
@media (max-width: 560px) { .shape-picker { grid-template-columns: repeat(4, 1fr); } }
.shape-picker button { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px 6px; cursor: pointer; font: .78rem var(--sans); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.shape-picker button svg { width: 44px; height: 44px; }
.shape-picker button[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); background: #fffdf8; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.swatches button.auto { width: auto; border-radius: 99px; padding: 0 12px; background: var(--paper); font: .8rem var(--sans); color: var(--ink); }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .form-preview { position: static; }
  .preview-card { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px; }
  .preview-art { width: 110px; flex: 0 0 110px; margin: 0; }
  .preview-card .hint { margin: 0; }
  .form-photo { display: none; }
}

/* ---------- Design studio ---------- */
.studio { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; padding-bottom: 64px; }
@media (max-width: 920px) { .studio { grid-template-columns: 1fr; } }
.studio-stage { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: sticky; top: 88px; }
@media (max-width: 920px) { .studio-stage { position: static; } }
.canvas { background: var(--cream); width: 100%; height: min(72vh, 680px); display: flex; align-items: center; justify-content: center; }
@media (max-width: 920px) { .canvas { height: min(60vh, 520px); } }
.canvas svg { width: 100%; height: 100%; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.design-title { font-size: 1.45rem; margin: 0 0 .15em; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stage-actions .btn { padding: 10px 20px; }
.studio-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.ctl { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ctl:last-child { border-bottom: 0; }
.ctl .lbl { margin-bottom: 8px; }
.ctl select { width: 100%; padding: 10px 12px; font: .95rem var(--sans); border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink); }
.seg { display: flex; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg.wrap-seg { flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; cursor: pointer; font: 500 .85rem var(--sans); color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.metal-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.metal-picker button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--cream); border-radius: 10px; padding: 7px 9px; cursor: pointer; font: .85rem var(--sans); color: var(--ink); text-align: left; }
.metal-picker span { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px; border: 1px solid rgba(0,0,0,.12); }
.metal-picker button[aria-pressed="true"], .skin-picker button[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 1px; }
.skin-picker { display: flex; gap: 10px; }
.skin-picker button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); cursor: pointer; }
.range { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin-top: 10px; }
.range input { flex: 1; accent-color: var(--brand-dark); }
.range span { min-width: 48px; text-align: right; color: var(--ink); }
.designs-section { padding: 48px 0 72px; border-top: 1px solid var(--line); background: var(--paper); }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 18px 0; }
.design-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--cream); }
.design-thumb { display: block; width: 100%; aspect-ratio: 1/1; border: 0; padding: 0; cursor: pointer; background: var(--cream); }
.design-thumb svg { width: 100%; height: 100%; }
.design-meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.design-meta span { color: var(--muted); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 99px; opacity: 0; transition: .25s; pointer-events: none; font-size: .9rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.canvas-wrap { position: relative; }
.canvas3d { background: #f2f0ed; cursor: grab; touch-action: none; }
.canvas3d:active { cursor: grabbing; }
.canvas3d canvas { display: block; }
.rotate-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: .8rem; color: var(--muted); margin: 0; pointer-events: none; }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
[hidden] { display: none !important; }

/* Share + account */
dialog.share-dialog { border: 0; border-radius: 18px; padding: 32px; width: min(620px, 94vw); background: var(--cream); color: var(--ink); box-shadow: 0 30px 80px rgba(30,20,5,.25); }
dialog.share-dialog::backdrop { background: rgba(29,27,24,.45); }
dialog.share-dialog .field input { font-size: .85rem; letter-spacing: 0; }
.studio-panel.spec table.spec th { width: 38%; background: transparent; color: var(--muted); font-weight: 500; }
#nav-account { border: 1px solid var(--brand); color: var(--brand); padding: 6px 14px; border-radius: 99px; }

.seg.grid-seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg.grid-seg button { white-space: normal; line-height: 1.2; padding: 8px 4px; }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.bs-add { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.bs-add select { flex: 1; min-width: 0; }
.bs-add input { width: 58px; padding: 9px 8px; font: .9rem var(--sans); border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink); }
.bs-list { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 6px; }
.bs-list li.old { display: flex; align-items: center; gap: 8px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: .86rem; }
.bs-list li span.nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bs-list b { min-width: 22px; text-align: center; }

/* Guides: hand-drawn sketches */
figure.sketch { margin: 1.4em 0; background: #fbfaf7; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
figure.sketch svg { width: 100%; height: auto; display: block; }
figure.sketch figcaption { font-size: .85rem; color: var(--muted); text-align: center; padding: 6px 0 2px; }
.cut-grid { display: grid; gap: 18px; margin: 1em 0 1.5em; }
.cut-card { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cut-card figure.sketch { margin: 0; padding: 4px; }
.cut-card h3 { margin-top: .1em; }
.cut-card p { font-size: .95rem; margin-bottom: .6em; }
@media (max-width: 560px) { .cut-card { grid-template-columns: 1fr; } .cut-card figure.sketch { max-width: 220px; margin: 0 auto; } }
.band-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 1em 0 1.5em; }
.band-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: 58% 1fr; gap: 6px 20px; align-items: start; }
.band-card figure.sketch { grid-row: span 3; }
@media (max-width: 640px) { .band-card { grid-template-columns: 1fr; } .band-card figure.sketch { grid-row: auto; } }
.band-card figure.sketch { margin: 0 0 10px; padding: 4px; }
.band-card h3 { margin: .2em 0 .3em; }
.band-card p { font-size: .93rem; margin-bottom: .5em; }
ul.sources { font-size: .88rem; color: var(--muted); }
.prose table.spec { display: block; overflow-x: auto; }

/* Studio panel sections */
.panel-sec { border-top: 2px solid var(--brand); margin: 14px -22px 0; padding: 14px 22px 4px; background: linear-gradient(var(--brand-soft), transparent 80px); }
.panel-sec h3 { font-size: 1.35rem; color: var(--brand-dark); margin: 0 0 4px; }
.sub-sec { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin: 10px 0 12px; background: var(--paper); }
.sub-sec h4 { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin: 10px 0 0; color: var(--brand-dark); }
.sub-sec .ctl:last-child, .bs-card .ctl:last-child { border-bottom: 0; }
.bs-list { display: grid; gap: 10px; margin: 12px 0 8px; }
.bs-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 8px 12px 2px; }
.bs-head { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.bs-head .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bs-head button { border: 1px solid var(--line); background: var(--cream); border-radius: 8px; width: 26px; height: 26px; cursor: pointer; color: var(--brand); font: 600 .95rem var(--sans); line-height: 1; }
.bs-head b { min-width: 22px; text-align: center; }
.bs-card .ctl { padding: 8px 0; }
.bs-card .lbl { font-size: .8rem; margin-bottom: 5px; }
.bs-card .seg button { font-size: .8rem; padding: 6px 4px; }
.bs-add select { padding: 9px 10px; font: .9rem var(--sans); border: 1px solid var(--line); border-radius: 10px; background: var(--cream); color: var(--ink); }

/* ---------- more color ---------- */
.page-head { position: relative; background: var(--brand-soft); box-shadow: 0 0 0 100vmax var(--brand-soft); clip-path: inset(0 -100vmax); margin-bottom: 28px; padding-bottom: 32px; }
.page-head h1 { color: var(--brand-dark); }
.prose h2, .designs-section h2, section h2 { color: var(--brand-dark); }
.prose h2 { padding-bottom: .25em; border-bottom: 2px solid var(--brand-soft); }
.prose h3, .cut-card h3, .band-card h3 { color: var(--brand-dark); }
.hero { background: radial-gradient(ellipse at 50% 0%, var(--brand-soft), var(--cream) 70%); }
.hero h1 { color: var(--ink); }
section.alt { background: var(--brand-tint); border-color: var(--brand-soft); }
section.alt .card { background: #fff; }
.card { border-top: 3px solid var(--brand); }
.site-footer { border-top: 3px solid var(--brand); background: var(--brand-tint); }
.article-link { border-left: 4px solid var(--brand); }
.article-link h3 { color: var(--brand-dark); }
table.spec { border: 1px solid #d9d9ff; border-radius: 10px; overflow: hidden; }
table.spec th { background: var(--brand); color: #fff; border-bottom-color: var(--brand); }
table.spec td { border-bottom-color: #e3e3ff; }
table.spec tr:nth-child(even) td { background: var(--brand-tint); }
table.spec td:first-child { font-weight: 600; color: var(--brand-dark); }
.studio-panel.spec table.spec th { background: var(--brand-tint); color: var(--brand-dark); }
.callout { background: var(--brand-tint); border-left-color: var(--brand); }
figure.guide-hero { margin: 0 0 1.6em; }
.article-link.with-art { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: center; }
.article-link.with-art svg { width: 100%; height: auto; display: block; border-radius: 8px; }
@media (max-width: 560px) { .article-link.with-art { grid-template-columns: 1fr; } }

/* ---------- Shop ---------- */
.disclosure { font-size: .88rem; color: var(--brand-dark); background: #fff; border: 1px solid #d9d9ff; border-radius: 10px; padding: 8px 12px; display: inline-block; margin: 6px 0 14px; }
.shop-toc { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-toc a { text-decoration: none; background: #fff; border: 1px solid var(--brand); color: var(--brand-dark); padding: 6px 14px; border-radius: 99px; font-size: .9rem; }
.shop-toc a:hover { background: var(--brand); color: #fff; }
.shop-sec { padding: 28px 0 12px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.shop-sec:last-child { border-bottom: 0; }
.shop-sec-head { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.shop-icon svg { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); }
.shop-sec-head h2 { margin-bottom: .2em; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.shop-card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; }
.shop-card h3 { font-size: 1.3rem; color: var(--brand-dark); margin-bottom: .3em; }
.shop-card p { font-size: .93rem; color: var(--muted); flex: 1; }
.shop-card .btn { align-self: flex-start; padding: 10px 18px; font-size: .9rem; }
.shop-opts { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--line); }
.shop-opts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.shop-opts strong { color: var(--ink, #222); font-weight: 600; }
.shop-card .btn.btn-sm { padding: 6px 12px; font-size: .82rem; flex: none; }
@media (max-width: 560px) { .shop-sec-head { grid-template-columns: 90px 1fr; gap: 14px; } }

/* Home tiles (guides & shop) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 18px; }
.tile { aspect-ratio: 1 / 1; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(61,61,196,.14); }
.tile-art { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #fbfaf7; border-radius: 10px; overflow: hidden; }
.tile-art svg { width: 100%; height: 100%; display: block; }
.tile h3 { font-size: 1.15rem; color: var(--brand-dark); margin: 12px 2px 0; line-height: 1.25; }
@media (max-width: 480px) { .tile-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .tile h3 { font-size: 1rem; } }

/* Guest banner (My Stones, Design) */
.guest-banner { background: #fff; border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--brand); }
.guest-banner .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.guest-banner p { margin: 0; flex: 1; font-size: .92rem; color: var(--ink, #222); }
.guest-banner p a { color: var(--brand-dark); font-weight: 600; }
.guest-banner .btn { flex: none; }
.guest-close { flex: none; background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--brand-dark); cursor: pointer; padding: 4px 6px; }
@media (max-width: 640px) { .guest-banner .btn { display: none; } }
