/* Character-first buyer pages and the local LINE preview. */
:root:not([data-palette="sage"], [data-palette="slate"]) {
  --paper: #faf8f2;
  --ink: #0f172a;
  --navy: #132b4c;
  --blue: #1d4178;
}
.stitch-home {
  --home-paper: var(--paper);
  --home-ink: var(--ink);
  --home-line: var(--line);
  --home-primary: var(--blue);
  --home-dark: var(--navy);
}
.stitch-home .showroom-hero.home-hero {
  background: radial-gradient(ellipse at 77% 40%, #d6eeee 0%, transparent 50%), var(--home-paper);
  padding-block: clamp(24px, 4vw, 56px) clamp(58px, 6vw, 94px);
  text-align: left;
}
.character-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(12px, 3vw, 46px);
  align-items: center;
}
.stitch-home .character-hero-layout .showroom-hero-copy { width: auto; max-width: none; }
.stitch-home .character-hero-layout h1 {
  color: var(--home-ink);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.28;
  margin: 0 0 12px;
  max-width: 20ch;
}
.stitch-home .character-hero-layout .hero-title-accent,
.stitch-home .character-hero-layout .home-brand-title { color: var(--home-primary); }
.stitch-home .character-hero-layout .showroom-hero-copy > p { color: #334155; margin-inline: 0; }
.stitch-home .character-hero-layout .hero-buttons { justify-content: flex-start; margin-top: 18px; }
.stitch-home .character-hero-layout .hero-buttons .btn { background: var(--home-primary); border-color: var(--home-primary); }
.stitch-home .character-hero-layout .hero-buttons .hero-secondary { background: white; border-color: #a8b6c8; color: var(--home-primary); }
.stitch-home .character-hero-layout .hero-buttons .hero-secondary:hover { background: #e6eef5; }
.character-hero-art {
  display: block;
  width: min(100%, 350px);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 18px 28px #132b4c28);
}
.character-section { margin-block: clamp(28px, 5vw, 64px); }
.character-section > p { margin-block: 6px 16px; }
.character-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.character-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
}
.character-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; background: #e9eff6; }
.character-card > div { padding: 12px 16px 16px; }
.character-card h3 { font-size: 1.15rem; margin: 0 0 6px; }
.character-card a { color: var(--blue); font-weight: 650; text-decoration: underline; }
.character-section > .text-link { display: inline-block; margin-top: 20px; }
.shop-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-block: 22px 32px;
  padding: 18px clamp(18px, 3vw, 32px);
  border-radius: 16px;
  background: #d8eff0;
  color: #132b4c;
}
.shop-banner h2 { font-size: clamp(18px, 2.5vw, 24px); }
.shop-banner .btn { background: #132b4c; color: white; text-align: center; }
body[data-page="gallery"] .page-intro, body[data-page="line"] .page-intro, body[data-page="shop"] .page-intro { background: #e7f2f4; }
.line-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  align-items: start;
  gap: clamp(18px, 3vw, 42px);
  margin-block: clamp(22px, 4vw, 46px);
}
.line-options { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: clamp(16px, 3vw, 28px); }
.line-options h2 { margin-bottom: 18px; }
.line-options fieldset { margin: 0 0 20px; padding: 0; min-width: 0; border: 0; }
.line-options legend, .line-file-label { display: block; font-weight: 700; margin-bottom: 9px; }
.line-theme-options, .line-sticker-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.line-theme-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid #bac9d6;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.line-theme-options label:has(:checked) { border-color: #1d4178; background: #e8f2ff; }
.line-theme-options input { accent-color: #1d4178; }
.line-sticker-grid button {
  display: grid;
  justify-items: center;
  align-content: start;
  width: min(105px, calc((100% - 8px) / 2));
  padding: 5px;
  color: #132b4c;
  background: #f1f5fa;
  border: 1px solid #c5d2e1;
  border-radius: 10px;
  font-size: .79rem;
}
.line-sticker-grid button:hover { border-color: #1d4178; }
.line-sticker {
  display: block;
  width: 100%;
  max-width: 122px;
  aspect-ratio: 145 / 125.5;
  background: url('assets/line-beaver-preview.webp') 0 0 / 400% 400% no-repeat;
  border-radius: 7px;
}
.line-sticker.sticker-1 { background-position-x: 33.333%; }
.line-sticker.sticker-2 { background-position-x: 66.667%; }
.line-sticker.sticker-3 { background-position-x: 100%; }
#line-file { max-width: 100%; font-size: .9rem; }
#line-file-note, #line-file-status { font-size: .86rem; margin-top: 8px; }
#line-file-status:empty { margin: 0; }
.line-phone {
  overflow: hidden;
  border: 1px solid #9ab3c7;
  border-radius: 18px;
  background: #dbeaf8;
  color: #182b45;
}
.line-phone[data-theme="forest"] { background: #d2ede0; }
.line-phone[data-theme="midnight"] { background: #18263b; }
.line-phone header { display: flex; justify-content: space-between; gap: 8px; padding: 15px 18px; background: #132b4c; color: white; }
.line-phone header span { font-size: .9rem; }
.line-log { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; height: 285px; overflow: auto; padding: 16px; }
.line-log p { margin: 0; padding: 7px 11px; border-radius: 10px; overflow-wrap: anywhere; background: white; }
.line-log .line-outgoing { align-self: flex-end; flex-shrink: 0; }
.line-log p.line-outgoing { background: #ceefd9; }
.line-log img.line-outgoing { display: block; width: auto; max-width: min(75%, 210px); max-height: 240px; object-fit: contain; border-radius: 9px; }
#line-composer { display: flex; gap: 8px; padding: 10px; background: white; }
#line-composer input { min-width: 0; width: 100%; color: #182b45; border: 1px solid #acbdcd; border-radius: 8px; padding-inline: 10px; }
#line-composer button { flex-shrink: 0; padding: 8px 12px; min-height: 44px; border: 0; border-radius: 8px; color: white; background: #0f6a42; }
.line-selected { margin: 0 0 20px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; max-width: max-content; }
.line-selected img { display: block; max-width: 100%; height: auto; }
.line-selected figcaption { margin-top: 6px; font-weight: 650; }
@media (max-width: 660px) {
  .stitch-home .showroom-hero.home-hero { padding-block: 26px 54px; }
  .character-hero-layout { grid-template-columns: minmax(0, 1fr) minmax(80px, .36fr); gap: 6px; }
  .stitch-home .character-hero-layout h1 { font-size: clamp(28px, 7vw, 38px); }
  .stitch-home .character-hero-layout .hero-buttons :is(.btn, .hero-secondary) { padding-inline: 10px; font-size: .9rem; }
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .line-lab { grid-template-columns: minmax(0, 1fr); }
  .line-log { height: 235px; }
}
.related-products { margin-block: clamp(28px, 5vw, 54px); }
.related-products .home-section-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.related-products .home-section-heading a { color: var(--blue); font-weight: 650; }
.shop-banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.shop-banner-actions > a:not(.btn) { text-decoration: underline; font-weight: 650; }
.line-jump { display: none; }
.line-phone { scroll-margin-top: 100px; }
@media (max-width: 660px) {
  .line-options .line-jump { display: inline-flex; margin-top: 14px; }
}
