:root {
    
    --bone: #F0E8D5;
    --linen: #E5DBC4;
    --sand: #D4C0A0;
    --taupe: #A89A82;
    --stone: #6B5F4F;
    --ink: #2A2018;

    
    --wine: #540D00;
    --terracotta: #40D0D0;
    --persimmon: #40D0D0;
    --powder-blue: #40D0D0;

    --bg: var(--bone);
    --ink-default: var(--ink);
    --accent: var(--wine);
    --line: rgba(42, 32, 24, 0.18);

    --pad: clamp(28px, 4vw, 80px);
    --serif: "Fraunces", "Times New Roman", serif;
    --sans: "Brandon Grotesque", "Brandon Text", "Avenir Next", Avenir, "Inter", system-ui, sans-serif;
    --mono: "Brandon Grotesque", "Brandon Text", "Avenir Next", Avenir, "Inter", system-ui, sans-serif;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
  body { overflow-x: hidden; }
  ::selection { background: var(--wine); color: var(--bone); }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

  
  .loader {
    position: fixed; inset: 0; background: var(--bone); z-index: 100;
    display: grid; place-items: center; transition: opacity 0.8s ease, visibility 0.8s ease;
  }
  .loader.hidden { opacity: 0; visibility: hidden; }
  .loader .knotter { display: grid; gap: 18px; justify-items: center; }
  .loader .knot-field {
    width: min(260px, 68vw);
    height: 108px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 5px;
    padding: 10px;
    border-radius: 5px;
    background:
      repeating-linear-gradient(0deg, rgba(42,32,24,.05) 0 1px, transparent 1px 7px),
      #F3E9D4;
    box-shadow:
      0 16px 24px rgba(42,32,24,.16),
      inset 0 0 0 1px rgba(139,36,24,.20);
  }
  .loader .knot-field span {
    border-radius: 50%;
    background:
      radial-gradient(circle at 35% 32%, rgba(255,255,255,.42), transparent 24%),
      radial-gradient(circle at 54% 58%, var(--wine) 0 48%, #5A120D 72%);
    opacity: .15;
    animation: loaderKnotPop 2.4s ease-in-out infinite;
    box-shadow:
      0 2px 3px rgba(42,32,24,.20),
      inset -2px -3px 4px rgba(42,32,24,.22);
  }
  .loader .knot-field span:nth-child(3n) {
    background:
      radial-gradient(circle at 35% 32%, rgba(255,255,255,.52), transparent 24%),
      radial-gradient(circle at 54% 58%, var(--powder-blue) 0 48%, #1C7F7F 72%);
    animation-delay: .12s;
  }
  .loader .knot-field span:nth-child(4n) { animation-delay: .24s; }
  .loader .knot-field span:nth-child(5n) { animation-delay: .36s; }
  .loader .knot-count {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .18em;
    color: var(--wine);
    text-transform: uppercase;
  }
  @keyframes loaderKnotPop { 0% { opacity: .15; transform: scale(.65); } 45%,100% { opacity: 1; transform: scale(1); } }

  
  .internal-terms-page {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    overflow-y: auto;
    background: #FAF6EE;
    color: var(--ink);
    padding: clamp(28px, 5vw, 88px);
  }
  .internal-terms-page:target {
    display: block;
  }
  .terms-document {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding-bottom: 80px;
  }
  .terms-close {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 2;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--wine);
    border-bottom: 1px solid currentColor;
  }
  .terms-kicker,
  .terms-updated {
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--wine);
  }
  .terms-document h1 {
    margin: 18px 0 12px;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(46px, 7vw, 112px);
    line-height: 0.92;
    color: var(--wine);
  }
  .terms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 52px;
    margin-top: clamp(36px, 5vw, 72px);
  }
  .terms-grid article {
    border-top: 1px solid rgba(42,32,24,0.16);
    padding-top: 18px;
  }
  .terms-grid h2 {
    margin-bottom: 10px;
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--wine);
  }
  .terms-grid p {
    font-family: var(--serif);
    font-size: clamp(16px, 1.35vw, 20px);
    line-height: 1.48;
    color: var(--ink);
    opacity: 0.86;
  }
  .terms-grid a {
    color: var(--wine);
    border-bottom: 1px solid currentColor;
  }
  @media (max-width: 760px) {
    .internal-terms-page {
      padding: 72px 24px 32px;
    }
    .terms-close {
      top: 18px;
      right: 22px;
    }
    .terms-grid {
      grid-template-columns: 1fr;
      gap: 24px;
    }
  }

  
  .top-nav, .bottom-bar {
    position: fixed; left: 0; right: 0; z-index: 30;
    padding: 22px var(--pad);
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none; mix-blend-mode: normal; color: var(--powder-blue);
  }
  .top-nav { top: 0; }
  .bottom-bar { bottom: 0; }
  .top-nav a, .bottom-bar a, .nav-jumps button { pointer-events: auto; }
  .top-nav .mark { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 17px; letter-spacing: 0; text-transform: none; }
  .nav-jumps { display: flex; gap: 16px; pointer-events: auto; }
  .nav-jumps button { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; transition: opacity 0.3s; }
  .nav-jumps button:hover, .nav-jumps button.active { opacity: 1; }
  .bottom-bar .progress-track { flex: 1; height: 1px; background: transparent; margin: 0 24px; position: relative; }
  .bottom-bar .progress-track::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0.42; }
  .bottom-bar .progress-fill { position: absolute; top: 0; left: 0; bottom: 0; background: currentColor; width: 0; z-index: 1; }
  .bottom-bar .scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
  .bottom-bar .scroll-cue::before { content: ""; width: 22px; height: 1px; background: currentColor; animation: cue 1.8s infinite; }
  @keyframes cue { 0%,100% { transform: translateX(0); opacity: 1 } 50% { transform: translateX(8px); opacity: 0.4 } }

  
  .scroll-shell { height: 1300vh; position: relative; }
  .sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .track { height: 100vh; display: flex; will-change: transform; }
  .panel {
    flex: 0 0 100vw; height: 100vh; padding: 90px var(--pad) 90px;
    display: flex; flex-direction: column; justify-content: center; position: relative;
  }
  .panel.bg-bone     { background: var(--bone);  color: var(--ink); }
  .panel.bg-linen    { background: var(--linen); color: var(--ink); }
  .panel.bg-sand     { background: var(--sand);  color: var(--ink); }
  .panel.bg-taupe    { background: var(--taupe); color: var(--bone); --line: rgba(240,232,213,0.22); }
  .panel.bg-stone    { background: var(--stone); color: var(--bone); --line: rgba(240,232,213,0.22); }
  .panel.bg-white    { background: #FAF6EE; color: var(--ink); --line: rgba(42, 32, 24, 0.18); }
  
  .panel.bg-wine     { background: #8B2418; color: var(--bone); --line: rgba(240,232,213,0.22); --accent: #40D0D0; }
  .panel.bg-burgundy { background: #6B1A14; color: var(--bone); --line: rgba(240,232,213,0.22); --accent: #40D0D0; }
  .panel.bg-maroon   { background: #4D0F0B; color: var(--bone); --line: rgba(240,232,213,0.22); --accent: #40D0D0; }

  
  .cover {
    justify-content: space-between;
    padding: 90px var(--pad) 110px;
    background:
      radial-gradient(ellipse at 50% 14%, rgba(225, 52, 18, 0.18), transparent 60%),
      radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.30), transparent 60%),
      #6B1A14;
    color: var(--bone);
    --line: rgba(240, 232, 213, 0.22);
    overflow: hidden;
    isolation: isolate;
  }
  .cover::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(62vw, 920px);
    height: min(62vw, 920px);
    transform: translate3d(-50%, -50%, 0);
    border: 1px solid rgba(64, 208, 208, 0.16);
    border-radius: 50%;
    opacity: 0.50;
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(circle at 50% 50%, transparent 0 32%, rgba(64,208,208,0.14) 32.25% 32.45%, transparent 32.75%),
      radial-gradient(circle at 50% 50%, transparent 0 45%, rgba(240,232,213,0.10) 45.25% 45.45%, transparent 45.75%),
      radial-gradient(circle at 22% 44%, rgba(64,208,208,0.34) 0 1.25px, transparent 1.65px),
      radial-gradient(circle at 31% 26%, rgba(240,232,213,0.26) 0 1px, transparent 1.45px),
      radial-gradient(circle at 39% 68%, rgba(64,208,208,0.26) 0 1.4px, transparent 1.8px),
      radial-gradient(circle at 48% 17%, rgba(240,232,213,0.20) 0 1px, transparent 1.45px),
      radial-gradient(circle at 55% 79%, rgba(64,208,208,0.30) 0 1.2px, transparent 1.6px),
      radial-gradient(circle at 64% 35%, rgba(240,232,213,0.24) 0 1px, transparent 1.45px),
      radial-gradient(circle at 73% 58%, rgba(64,208,208,0.32) 0 1.35px, transparent 1.8px),
      radial-gradient(circle at 81% 40%, rgba(240,232,213,0.18) 0 1px, transparent 1.45px),
      radial-gradient(circle at 26% 73%, rgba(240,232,213,0.20) 0 1px, transparent 1.45px),
      radial-gradient(circle at 69% 75%, rgba(64,208,208,0.24) 0 1px, transparent 1.45px),
      radial-gradient(circle at 50% 50%, rgba(64,208,208,0.10), transparent 55%);
    filter: blur(0.15px);
    animation: majlisKnotConstellationDrift 24s ease-in-out infinite alternate;
    will-change: transform, opacity;
  }
  .cover::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(46vw, 680px);
    height: min(30vw, 440px);
    transform: translate3d(-50%, -50%, 0);
    border-radius: 50%;
    border: 1px solid rgba(64, 208, 208, 0.18);
    box-shadow:
      0 0 0 18px rgba(64, 208, 208, 0.018),
      0 0 90px rgba(64, 208, 208, 0.10);
    opacity: 0.50;
    pointer-events: none;
    z-index: 0;
    animation: majlisKnotHaloDrift 28s ease-in-out infinite alternate;
    will-change: transform, opacity;
  }
  .cover .meta-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.28em; color: var(--bone); text-transform: uppercase; opacity: 0.78; }
  .cover .meta-row .right { color: var(--persimmon); opacity: 1; }
  .cover-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; }
  .cover .ornament { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 14px; letter-spacing: 1.2em; color: var(--persimmon); padding-left: 1.2em; opacity: 0.95; }
  .cover h1 { font-family: var(--serif); font-weight: 200; font-size: clamp(60px, 9.5vw, 156px); line-height: 0.95; letter-spacing: -0.02em; color: var(--bone); }
  .cover h1 .ital { font-style: italic; font-weight: 300; color: var(--persimmon); }
  .cover .rule { width: 64px; height: 1px; background: var(--persimmon); margin: 8px 0; opacity: 0.95; }
  .cover .kicker { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(16px, 1.5vw, 22px); color: var(--terracotta); opacity: 1; max-width: 36ch; }
  .cover .meta-row,
  .cover-center {
    position: relative;
    z-index: 1;
  }
  @keyframes majlisKnotConstellationDrift {
    0% { transform: translate3d(calc(-50% - 1px), calc(-50% + 1px), 0) rotate(-0.15deg); opacity: 0.42; }
    100% { transform: translate3d(calc(-50% + 2px), calc(-50% - 2px), 0) rotate(0.18deg); opacity: 0.50; }
  }
  @keyframes majlisKnotHaloDrift {
    0% { transform: translate3d(calc(-50% + 1px), calc(-50% - 1px), 0) scale(0.995); opacity: 0.42; }
    100% { transform: translate3d(calc(-50% - 2px), calc(-50% + 2px), 0) scale(1.005); opacity: 0.50; }
  }

  
  @keyframes magicRugsFloat {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    25% { transform: translate3d(12px, -8px, 0) rotate(1.2deg) scale(1.02); }
    50% { transform: translate3d(0, -16px, 0) rotate(-0.8deg) scale(0.98); }
    75% { transform: translate3d(-10px, -6px, 0) rotate(0.6deg) scale(1.01); }
  }

  .magic-rug-bg {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    animation: magicRugsFloat 18s ease-in-out infinite;
  }

  .magic-rug-bg.rug-1 {
    width: 140px;
    height: 180px;
    left: 8%;
    top: 12%;
    animation-delay: 0s;
    animation-duration: 20s;
  }

  .magic-rug-bg.rug-2 {
    width: 160px;
    height: 200px;
    right: 6%;
    top: 8%;
    animation-delay: 3s;
    animation-duration: 24s;
  }

  .magic-rug-bg.rug-3 {
    width: 130px;
    height: 170px;
    left: 12%;
    bottom: 10%;
    animation-delay: 6s;
    animation-duration: 22s;
  }

  .cover-foot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: end; }
  .cover-foot .tag { font-family: var(--serif); font-weight: 300; font-size: clamp(13px, 0.95vw, 15px); line-height: 1.7; max-width: 320px; opacity: 0.82; color: var(--bone); }
  .cover-foot .tag.right { text-align: right; margin-left: auto; }
  .cover-foot .crest { font-family: var(--serif); font-style: italic; font-weight: 200; font-size: clamp(28px, 3vw, 44px); line-height: 1; color: var(--bone); text-align: center; border: 1px solid var(--line); padding: 14px 26px; letter-spacing: -0.01em; }
  .cover-foot .crest small { display: block; font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; color: var(--persimmon); text-transform: uppercase; margin-top: 6px; opacity: 1; }

  
  .story { justify-content: center; }
  .story .index { position: absolute; top: 90px; left: var(--pad); font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.75; }
  .story-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; max-width: 1500px; }
  .story h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.2vw, 52px); line-height: 1.05; letter-spacing: -0.015em; font-style: italic; }
  .story h2 .accent { color: var(--bone); font-style: italic; }
  .story p { font-family: var(--serif); font-weight: 300; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.5; max-width: 720px; }
  .story p + p { margin-top: 22px; }
  .story .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
  .story .stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.7; }
  .story .stat .v { font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 1.6vw, 24px); margin-top: 6px; line-height: 1.15; }
  .story .stat .v .ital { font-style: italic; }

  
  .overview { padding: 120px var(--pad); justify-content: flex-start; }
  .overview .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 48px; }
  .overview .head h2 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(36px, 4.5vw, 72px); line-height: 1; letter-spacing: -0.02em; }
  .overview .head h2 .accent { color: var(--persimmon); }
  .overview .head .note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; max-width: 320px; text-align: right; opacity: 0.75; text-transform: uppercase; line-height: 1.5; }
  .col-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .col-card { border: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; gap: 16px; aspect-ratio: 3 / 4; position: relative; overflow: hidden; transition: transform 0.5s ease, border-color 0.5s ease; text-align: left; color: inherit; background: rgba(255, 255, 255, 0.06); }
  .col-card:hover { transform: translateY(-8px); border-color: var(--powder-blue); }
  .col-card::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
  .col-card > * { position: relative; z-index: 1; }
  .col-card.core::before {
    background:
      repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 3px),
      repeating-linear-gradient(90deg, rgba(0,0,0,0.055) 0 1px, transparent 1px 4px),
      radial-gradient(circle at 22% 18%, rgba(255,255,255,0.12), transparent 26%),
      radial-gradient(circle at 78% 72%, rgba(0,0,0,0.13), transparent 32%);
    opacity: 0.62;
  }
  .col-card.soft::before {
    background:
      linear-gradient(115deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 26%, transparent 48%, rgba(168,201,220,0.10) 72%, rgba(255,255,255,0.20) 100%),
      repeating-linear-gradient(95deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px);
    opacity: 0.78;
  }
  .col-card.framed::before {
    inset: 42px;
    border: 14px solid rgba(168,154,130,0.50);
    box-shadow: inset 0 0 0 3px rgba(240,232,213,0.26), 0 0 0 1px rgba(240,232,213,0.10);
    opacity: 1;
  }
  .col-card .roman { font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.85; color: var(--persimmon); }
  .col-card h3 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(28px, 3vw, 48px); line-height: 0.95; letter-spacing: -0.02em; }
  .col-card .desc { font-family: var(--serif); font-size: 15px; line-height: 1.55; font-weight: 300; flex: 1; }
  .col-card .desc span { display: block; margin-bottom: 0.42em; }
  .col-card .desc span:last-child { margin-bottom: 0; }
  .col-card .meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.65; }
  .col-card .arrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--persimmon); }
  .col-card .preview-deco { position: absolute; right: -22px; bottom: -22px; width: 130px; height: 130px; opacity: 0.45; z-index: 1; }
  .col-card.core .preview-deco { background: var(--taupe); }
  .col-card.soft .preview-deco { background: linear-gradient(135deg, var(--sand), var(--stone)); border-radius: 50%; }
  .col-card.framed .preview-deco { background: transparent; border: 8px solid var(--taupe); }

  
  .hero-collection { padding: 120px var(--pad); justify-content: center; }
  .hero-collection .top { display: flex; justify-content: space-between; margin-bottom: 36px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.72; }
  .hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
  .hero-collection h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 7.5vw, 124px); line-height: 0.9; letter-spacing: -0.035em; }
  .hero-collection h2 .ital { font-style: italic; }
  .hero-collection h2 .vibrant { color: var(--persimmon); font-style: italic; }
  .hero-collection .blurb { margin-top: 20px; font-family: var(--serif); font-weight: 300; font-size: clamp(16px, 1.4vw, 22px); line-height: 1.55; max-width: 540px; opacity: 0.92; }
  .hero-collection .specs { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 36px; margin-top: 40px; }
  .hero-collection .spec .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.7; margin-bottom: 6px; }
  .hero-collection .spec .v { font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.15; }
  .hero-collection .spec .v .ital { font-style: italic; }

  .swatch-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 32px; max-width: 440px; }
  .swatch-strip .sw { aspect-ratio: 1; border: 1px solid rgba(0,0,0,0.10); }
  .swatch-strip .more { display: grid; place-items: center; aspect-ratio: 1; font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; border: 1px solid var(--line); opacity: 0.85; }

  
  .rug-big { aspect-ratio: 4 / 5; position: relative; overflow: hidden; outline: 1px solid rgba(255, 255, 255, 0.14); }
  .rug-big.core { background: var(--sand); }
  .rug-big.core::before {
    content: ""; position: absolute; inset: 0;
    background:
      repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 2px),
      repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 3px),
      radial-gradient(circle at 30% 40%, rgba(255,255,255,0.06), transparent 30%),
      radial-gradient(circle at 70% 60%, rgba(0,0,0,0.05), transparent 30%);
  }
  
  .rug-big.soft { background: linear-gradient(135deg, var(--taupe) 0%, var(--stone) 100%); }
  .rug-big.soft::before {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(115deg,
        rgba(255,255,255,0.40) 0%,
        rgba(255,255,255,0.20) 18%,
        rgba(255,255,255,0.06) 38%,
        transparent 50%,
        transparent 60%,
        rgba(255,255,255,0.10) 80%,
        rgba(255,255,255,0.30) 100%
      ),
      repeating-linear-gradient(95deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  }
  .rug-big.framed { background: var(--stone); }
  .rug-big.framed .frame { position: absolute; inset: 24px; border: 12px solid var(--bone); }
  .rug-big.framed .frame::before { content: ""; position: absolute; inset: 22px; border: 3px solid var(--wine); }
  .rug-big.framed .frame::after { content: ""; position: absolute; inset: 60px; background: var(--bone); opacity: 0.06; }

  
  .framed-designs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
  .framed-mini { aspect-ratio: 1; background: var(--stone); position: relative; overflow: hidden; border: 1px solid var(--line); }
  .fm-1 .a { position: absolute; inset: 14%; border: 4px solid var(--bone); }
  .fm-1 .b { position: absolute; inset: 28%; border: 2px solid var(--wine); }
  .fm-2 .a { position: absolute; inset: 18%; border: 6px solid var(--bone); }
  .fm-2 .corner { position: absolute; width: 32%; height: 32%; border: 4px solid var(--wine); }
  .fm-2 .tl { top: 8%; left: 8%; border-right: 0; border-bottom: 0; }
  .fm-2 .tr { top: 8%; right: 8%; border-left: 0; border-bottom: 0; }
  .fm-2 .bl { bottom: 8%; left: 8%; border-right: 0; border-top: 0; }
  .fm-2 .br { bottom: 8%; right: 8%; border-left: 0; border-top: 0; }
  .fm-3 .a { position: absolute; left: 18%; right: 18%; top: 12%; bottom: 12%; border-left: 8px solid var(--bone); border-right: 8px solid var(--bone); }
  .fm-3 .b { position: absolute; top: 36%; left: 32%; right: 32%; bottom: 36%; background: var(--wine); }
  .fm-4 .a { position: absolute; inset: 10%; background: var(--bone); }
  .fm-4 .b { position: absolute; inset: 22%; background: var(--stone); }
  .fm-4 .c { position: absolute; inset: 34%; background: var(--wine); }
  .fm-4 .d { position: absolute; inset: 44%; background: var(--bone); }
  .framed-mini .name { position: absolute; bottom: 8px; left: 8px; right: 8px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(240,232,213,0.85); display: flex; justify-content: space-between; }

  
  .editions { padding: 100px var(--pad); justify-content: center; }
  .editions .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 36px; gap: 40px; }
  .editions .head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 4.5vw, 72px); line-height: 1; letter-spacing: -0.02em; }
  .editions .head h2 .accent { color: var(--wine); font-style: italic; }
  .editions .head .note { font-family: var(--serif); font-weight: 300; font-size: clamp(14px, 1.05vw, 17px); max-width: 520px; line-height: 1.55; opacity: 0.85; text-align: right; }
  .editions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .edition-card { border: 1px solid var(--line); background: rgba(255,255,255,0.40); display: flex; flex-direction: column; transition: transform 0.5s, border-color 0.5s; text-decoration: none; }
  .edition-card:hover { transform: translateY(-6px); border-color: var(--wine); }
  .edition-card .visual { aspect-ratio: 1; position: relative; overflow: hidden; background: var(--stone); }
  .edition-card .info { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .edition-card .num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--wine); }
  .edition-card .title { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(20px, 1.6vw, 26px); letter-spacing: -0.01em; margin-top: 4px; }
  .edition-card .collab { font-family: var(--serif); font-size: 14px; opacity: 0.85; line-height: 1.35; }
  .edition-card .meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; margin-top: auto; padding-top: 8px; }
  
  .ed-oasis { background: var(--stone); }
  .ed-oasis::before { content: ""; position: absolute; left: 22%; top: 18%; width: 56%; aspect-ratio: 1; background: radial-gradient(circle, var(--bone) 0%, var(--bone) 60%, transparent 62%); }
  .ed-oasis::after { content: ""; position: absolute; right: 16%; bottom: 16%; width: 28%; aspect-ratio: 1; background: var(--wine); border-radius: 50%; }
  .ed-diorama { background: var(--bone); }
  .ed-diorama .a { position: absolute; inset: 14%; background: var(--taupe); }
  .ed-diorama .b { position: absolute; inset: 26%; background: var(--bone); }
  .ed-diorama .c { position: absolute; inset: 38%; background: var(--wine); }
  .ed-almond { background: var(--linen); }
  .ed-almond::before { content: ""; position: absolute; inset: 22% 28%; background: var(--wine); border-radius: 50%; transform: rotate(-12deg); }
  .ed-almond::after { content: ""; position: absolute; inset: 36% 42%; background: var(--terracotta); border-radius: 50%; transform: rotate(-12deg); }
  .ed-pleat {
    background: repeating-linear-gradient(90deg,
      var(--bone) 0 14%,
      var(--stone) 14% 16%,
      var(--sand) 16% 22%,
      var(--stone) 22% 24%,
      var(--wine) 24% 38%,
      var(--stone) 38% 40%);
  }

  
  .process-list { display: grid; gap: 0; margin-top: 8px; }
  .process-step { display: grid; grid-template-columns: 60px 140px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
  .process-step:last-child { border-bottom: 1px solid var(--line); }
  .process-step .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--terracotta); align-self: center; }
  .process-step .label { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(20px, 1.7vw, 26px); align-self: center; }
  .process-step .desc { font-family: var(--serif); font-weight: 300; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.5; align-self: center; opacity: 0.88; }
  .cta-row { display: flex; gap: 12px; }
  a.btn { display: inline-block; text-decoration: none; }

  
  .builder { padding: clamp(70px, 8vh, 100px) var(--pad); justify-content: flex-start; overflow-y: auto; }
  .builder .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
  .builder .head h2 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(36px, 4.5vw, 72px); line-height: 1; letter-spacing: -0.02em; }
  .builder .head h2 .vibrant { color: var(--wine); }
  .builder .head .note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; opacity: 0.7; text-transform: uppercase; }
  .builder .head .note .builder-material-inline-note {
    display: block;
    margin-top: 12px;
    max-width: 520px;
    font-family: var(--serif);
    font-size: clamp(13.5px, 1vw, 16px);
    line-height: 1.55;
    letter-spacing: 0.01em;
    text-transform: none;
    color: rgba(42,32,24,0.72);
  }
  .builder-grid { display: grid; grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr); gap: clamp(24px, 3.2vw, 56px); align-items: stretch; --builder-pane-height: clamp(560px, calc(100vh - 260px), 1000px); }
  .builder-controls {
    min-height: var(--builder-pane-height);
    height: var(--builder-pane-height);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 14px;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
  }
  .builder-controls::-webkit-scrollbar { width: 8px; }
  .builder-controls::-webkit-scrollbar-thumb { background: rgba(42,32,24,0.22); border-radius: 999px; }

  .tabs { display: flex; gap: 0; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
  .tab { flex: 1; padding: 14px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.5; border-bottom: 2px solid transparent; transition: all 0.3s; color: var(--ink); }
  .tab.active { opacity: 1; border-bottom-color: var(--wine); color: var(--wine); }

  .builder-controls h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.7; margin: 22px 0 12px; }
  .builder-controls h4:first-of-type { margin-top: 0; }
  .builder-controls h4 .hint { color: var(--wine); margin-left: 6px; opacity: 1; font-size: 9px; }

  
  .color-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(18px, 1fr));
    gap: 4px;
    max-height: 148px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 2px 2px;
    scrollbar-width: thin;
  }
  .color-grid::-webkit-scrollbar { width: 6px; }
  .color-grid::-webkit-scrollbar-thumb { background: rgba(42,32,24,0.22); border-radius: 999px; }
  .swatch { width: 100%; aspect-ratio: 1; min-height: 18px; border: 1px solid rgba(42, 32, 24, 0.18); position: relative; cursor: pointer; transition: transform 0.2s, outline-color 0.2s; background-size: cover; background-position: center; }
  .swatch:hover { outline: 2px solid rgba(139,36,24,0.55); outline-offset: 1px; z-index: 2; }
  .swatch.selected { outline: 2px solid var(--wine); outline-offset: 1px; }
  .swatch[data-image="true"] { background-size: cover; background-position: center center; background-repeat: no-repeat; }
  .rug-preview.image-material .layer, .rug-zoom.image-material .layer { background-blend-mode: normal; }
  .swatch.selected::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(0,0,0,0.4); }
  .swatch[data-context="frame"].selected { outline-color: var(--terracotta); }
  .swatch.texture-wool {
    background-image:
      repeating-linear-gradient(0deg, rgba(255,255,255,0.12) 0 1px, rgba(255,255,255,0) 1px 4px),
      repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 1px, rgba(0,0,0,0) 1px 5px);
    background-size: 18px 18px, 22px 22px;
    background-blend-mode: soft-light, multiply;
  }
  .swatch.texture-silk { background-image:
      linear-gradient(115deg,
        rgba(255,255,255,0.42) 0%,
        rgba(255,255,255,0.20) 18%,
        rgba(255,255,255,0.06) 38%,
        transparent 54%,
        rgba(255,255,255,0.12) 84%,
        rgba(255,255,255,0.28) 100%);
  }

  
  
  .frame-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 240px; }
  .frame-pick { aspect-ratio: 1; background: #4A3C2D; cursor: pointer; position: relative; overflow: hidden; border: 2px solid transparent; transition: border 0.3s; }
  .frame-pick.selected { border-color: var(--wine); }
  .frame-pick.fp-1 .a { position: absolute; inset: 14%; border: 2px solid #C8B894; }
  .frame-pick.fp-1 .b { position: absolute; inset: 28%; border: 1.5px solid #8C7F6F; }
  .frame-pick.fp-2 .a { position: absolute; inset: 18%; border: 2.5px solid #C8B894; }
  .frame-pick.fp-2 .corner { position: absolute; width: 30%; height: 30%; border: 2px solid #8C7F6F; }
  .frame-pick.fp-2 .tl { top: 10%; left: 10%; border-right: 0; border-bottom: 0; }
  .frame-pick.fp-2 .tr { top: 10%; right: 10%; border-left: 0; border-bottom: 0; }
  .frame-pick.fp-2 .bl { bottom: 10%; left: 10%; border-right: 0; border-top: 0; }
  .frame-pick.fp-2 .br { bottom: 10%; right: 10%; border-left: 0; border-top: 0; }
  .frame-pick.fp-3 .a { position: absolute; left: 18%; right: 18%; top: 12%; bottom: 12%; border-left: 3px solid #C8B894; border-right: 3px solid #C8B894; }
  .frame-pick.fp-3 .b { position: absolute; top: 36%; left: 32%; right: 32%; bottom: 36%; background: #8C7F6F; }
  .frame-pick.fp-4 .a { position: absolute; inset: 10%; background: #C8B894; }
  .frame-pick.fp-4 .b { position: absolute; inset: 22%; background: #4A3C2D; }
  .frame-pick.fp-4 .c { position: absolute; inset: 34%; background: #8C7F6F; }
  .frame-pick.fp-4 .d { position: absolute; inset: 44%; background: #C8B894; }

  
  .pile-picker, .shape-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pile-picker.pile-picker-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .pile-opt, .shape-opt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; text-align: left; background: transparent; transition: background 0.2s, border-color 0.2s; color: inherit; }
  .pile-opt:hover, .shape-opt:hover { border-color: var(--wine); }
  .pile-opt.selected, .shape-opt.selected { border-color: var(--wine); background: rgba(139, 36, 24, 0.06); }
  .pile-opt .ph-mm { font-family: var(--serif); font-size: 26px; font-weight: 300; line-height: 1; }
  .pile-opt .ph-mm .unit { font-size: 13px; opacity: 0.7; margin-left: 2px; }
  .pile-opt .ph-rate { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; opacity: 0.85; }
  .pile-opt .ph-note { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wine); min-height: 11px; }

  
  .shape-opt { align-items: center; gap: 10px; }
  .shape-opt .sh-icon { width: 36px; height: 26px; position: relative; }
  .shape-opt .sh-icon.rect i { position: absolute; inset: 0; border: 2px solid currentColor; }
  .shape-opt .sh-icon.circle i { position: absolute; inset: 2px 7px; border: 2px solid currentColor; border-radius: 50%; }
  .shape-opt .sh-icon.oval i { position: absolute; inset: 2px 0; border: 2px solid currentColor; border-radius: 50%; }
  .shape-opt .sh-name { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
  .shape-opt .sh-note { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--wine); opacity: 0.9; }
  .corner-picker { display: grid; gap: 12px; }
  .corner-slider-row { display: flex; flex-direction: column; gap: 8px; }
  .corner-slider-row label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
  .corner-slider-row input[type="range"] { width: 100%; cursor: pointer; }
  .corner-value { font-family: var(--mono); font-size: 12px; color: var(--wine); }

  
  .size-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .size-row.single { grid-template-columns: 1fr; }
  .size-input { display: flex; flex-direction: column; gap: 6px; }
  .size-input label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.7; }
  .size-input input { background: rgba(42, 32, 24, 0.03); border: 1px solid var(--line); color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 300; padding: 10px 14px; outline: 0; }
  .size-input input:focus { border-color: var(--wine); }
  .size-input input:disabled { opacity: 0.35; }
  .size-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .size-presets button { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--line); opacity: 0.78; transition: opacity 0.2s, background 0.2s; }
  .size-presets button:hover { opacity: 1; background: rgba(139, 36, 24, 0.08); }

  
  .preview-pane { background: #FFFFFF; border: 1px solid var(--line); padding: clamp(18px, 2vw, 32px); display: flex; flex-direction: column; gap: clamp(10px, 1.2vw, 18px); position: relative; color: var(--ink); overflow: hidden; min-height: var(--builder-pane-height); height: var(--builder-pane-height); }
  .preview-stage { flex: 1; display: grid; place-items: center; min-height: clamp(300px, calc(var(--builder-pane-height) - 250px), 560px); position: relative; padding: clamp(14px, 1.6vw, 24px); overflow: hidden; }
  .rug-preview {
    position: relative; overflow: hidden;
    transform-origin: center center;
    transition: width 0.5s ease, height 0.5s ease, transform 0.2s ease, border-radius 0.4s ease;
    background: var(--rug-color, #DDD);
    
    box-shadow:
      0 22px 44px rgba(42, 32, 24, 0.18),
      0 8px 16px rgba(42, 32, 24, 0.10);
    cursor: default;
    user-select: none;
  }
  .rug-preview.round { border-radius: 50%; }
  .rug-preview.zoomable { cursor: grab; }
  .rug-preview.dragging { cursor: grabbing; transition: none; }
  .rug-preview .layer { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
  
  .rug-preview.core .layer,
  .rug-preview.framed .layer {
    background-image:
      repeating-linear-gradient(0deg, rgba(255,255,255,0.10) 0 1px, rgba(255,255,255,0) 1px 4px),
      repeating-linear-gradient(90deg, rgba(0,0,0,0.055) 0 1px, rgba(0,0,0,0) 1px 5px);
    background-size: 18px 18px, 22px 22px;
    background-blend-mode: soft-light, multiply;
  }
  
  .rug-preview.soft .layer {
    background:
      linear-gradient(115deg,
        rgba(255,255,255,0.40) 0%,
        rgba(255,255,255,0.20) 18%,
        rgba(255,255,255,0.06) 38%,
        transparent 50%,
        transparent 60%,
        rgba(255,255,255,0.10) 80%,
        rgba(255,255,255,0.30) 100%
      );
  }

  
  .preview-controls { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; }
  .preview-controls button { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.92); color: var(--ink); transition: all 0.2s; min-width: 36px; }
  .preview-controls button:hover { background: var(--wine); color: var(--bone); border-color: var(--wine); }
  .preview-controls .level { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.92); color: var(--ink); min-width: 50px; text-align: center; }
  .preview-controls .glyph { font-family: var(--serif); font-weight: 200; font-size: 16px; line-height: 0; }

  .preview-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
  .preview-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
  .preview-summary .k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.65; }
  .preview-summary .v { font-family: var(--serif); font-weight: 300; font-size: 18px; line-height: 1.1; margin-top: 4px; }
  .preview-summary .v .ital { font-style: italic; }
  .preview-summary .price { color: var(--wine); }
  .preview-summary .surcharge { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.2em; color: var(--wine); display: block; margin-top: 4px; text-transform: uppercase; line-height: 1.4; }

  
  #frameGrid {
    display: none;
  }

  .frame-picker {
    display: none;
  }

  body.collection-framed #frameGrid,
  body.collection-framed .frame-picker {
    display: grid;
  }

  
  .rug-preview.dragging-corner {
    transition: border-radius 0.08s ease-out !important;
  }

  .corner-inspector {
    position: absolute; left: 14px; bottom: 14px; width: 148px; height: 148px;
    border: 1px solid rgba(42,32,24,0.18); background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 24px rgba(42,32,24,0.12); z-index: 4; overflow: hidden;
    display: none;
  }
  .corner-inspector.show { display: block; }
  .corner-inspector .ci-rug {
    position: absolute; width: 200px; height: 200px; left: 30px; top: 30px;
    box-shadow: 0 8px 18px rgba(42,32,24,0.16);
  }
  .corner-inspector .ci-rug::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .corner-inspector.wool .ci-rug::before {
    background:
      radial-gradient(circle at 28% 34%, rgba(255,255,255,0.10), transparent 34%),
      radial-gradient(circle at 72% 66%, rgba(0,0,0,0.07), transparent 36%),
      linear-gradient(135deg, rgba(255,255,255,0.06), rgba(0,0,0,0.04));
  }
  .corner-inspector.silk .ci-rug::before {
    background:
      linear-gradient(115deg,
        rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.20) 18%, rgba(255,255,255,0.06) 38%, transparent 54%, rgba(255,255,255,0.12) 84%, rgba(255,255,255,0.28) 100%);
  }
  .corner-inspector .ci-line-x,
  .corner-inspector .ci-line-y {
    position: absolute; background: var(--wine); opacity: 0.88;
  }
  .corner-inspector .ci-line-x, .corner-inspector .ci-line-y { display: none; }
  .corner-inspector .ci-label {
    position: absolute; right: 10px; bottom: 10px; top: auto; max-width: 120px;
    font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--wine); text-align: right; line-height: 1.45;
    background: rgba(255,255,255,0.82); padding: 6px 8px; border-radius: 8px;
    box-shadow: 0 4px 10px rgba(42,32,24,0.08);
  }

  .inquire-row { display: flex; gap: 12px; margin-top: 14px; }
  .btn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; padding: 16px 22px; border: 1px solid var(--wine); transition: all 0.2s; }
  .btn.primary { background: var(--persimmon); color: var(--bone); border-color: var(--persimmon); }
  .btn.primary:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }
  .btn.ghost { color: var(--ink); }
  .btn.ghost:hover { background: rgba(139, 36, 24, 0.08); }
  .surcharge { display: none !important; }

  
  
  #game3DCanvas {
    position: absolute; left: 12px; right: 12px; top: 12px; bottom: 12px;
    width: calc(100% - 24px); height: calc(100% - 24px);
    display: none;
    background: #FFFFFF;
    cursor: grab;
    touch-action: none;
  }
  #game3DCanvas:active { cursor: grabbing; }
  .preview-stage.in-game #game3DCanvas { display: block; }
  .preview-stage.in-game .rug-preview,
  .preview-stage.in-game .preview-controls { display: none; }
  .game3d-controls {
    position: absolute; left: 50%; top: 72px;
    transform: translateX(-50%);
    display: none;
    background: rgba(42,32,24,0.96); padding: 6px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.32);
    z-index: 8;
    white-space: nowrap;
    backdrop-filter: blur(8px);
  }
  .preview-stage.in-game.has-selection .game3d-controls { display: flex !important; gap: 4px; z-index: 30; }
  .game3d-controls button {
    font-family: var(--mono); font-size: 19px; line-height: 1;
    width: 42px; height: 38px; padding: 0;
    color: var(--bone); background: transparent; cursor: pointer;
    transition: background 0.15s;
    display:flex; align-items:center; justify-content:center; text-align:center;
  }
  .game3d-controls button:hover { background: var(--persimmon); }
  .game3d-controls button.del:hover { background: var(--wine); }
  .game3d-hint {
    position: absolute; left: 14px; right: 14px; top: 14px;
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--ink);
    opacity: 0; pointer-events: none; transition: opacity 0.4s;
    text-align: center; z-index: 7;
  }
  .preview-stage.in-game .game3d-hint { opacity: 0.55; }
  .preview-stage.in-game { min-height: clamp(360px, calc(var(--builder-pane-height) - 170px), 560px); }
  .game-fab {
    position: absolute; top: 14px; z-index: 9; display: none;
    font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 10px 12px; border: 1px solid rgba(240,232,213,0.34); background: var(--wine);
    color: var(--bone); box-shadow: 0 8px 18px rgba(42,32,24,0.18); backdrop-filter: blur(8px); cursor: pointer;
  }
  .game-fab:hover { background: var(--maroon, #4D0F0B); border-color: var(--powder-blue); color: var(--powder-blue); }
  #rugDetailsFab { left: 14px; top: 64px; z-index: 12; display: none !important; }
  #objectsFab { right: 14px; }
  #sunsetFab { right: 104px; }
  #sunsetFab.active { background: var(--ink); color: var(--powder-blue); border-color: var(--powder-blue); }
  .preview-stage.in-game .game-fab { display: inline-flex; }
  .game-float-panel {
    position: absolute; left: 14px; top: 64px; width: min(280px, calc(100% - 28px)); z-index: 10;
    background: rgba(255,255,255,0.96); border: 1px solid rgba(42,32,24,0.12); box-shadow: 0 14px 28px rgba(42,32,24,0.14);
    backdrop-filter: blur(8px); padding: 14px; display: none;
  }
  .game-float-panel.open { display: block; }
  .game-float-panel .mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
  .game-float-panel .mini-grid .k { font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); opacity: 0.62; margin-bottom: 4px; }
  .game-float-panel .mini-grid .v { font-family: var(--serif); font-size: 15px; line-height: 1.25; }
  .game-float-panel .mini-actions { display: flex; gap: 8px; margin-top: 12px; }
  .game-float-panel .mini-actions button { flex: 1; padding: 12px 8px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; border: 1px solid var(--wine); background: #fff; color: var(--ink); cursor: pointer; }
  .game-float-panel .mini-actions button.primary { background: var(--persimmon); border-color: var(--persimmon); color: var(--bone); }
  .game-panel.game-panel-floating {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 10; max-height: min(46%, 300px); overflow: auto;
    margin-top: 0; display: none; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
  }
  .game-panel.game-panel-floating.open { display: block; }

  .game-items { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
  .placed-item {
    position: absolute; pointer-events: auto; cursor: grab;
    user-select: none;
  }
  .placed-item.dragging { cursor: grabbing; z-index: 5; }
  .placed-item.selected { z-index: 4; }
  .placed-item.selected .item-frame {
    position: absolute; inset: -6px; pointer-events: none;
    border: 1.5px dashed var(--persimmon);
    border-radius: 2px;
  }
  .placed-item svg { display: block; width: 100%; height: auto; }
  .item-controls {
    position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 2px; pointer-events: auto;
    background: var(--ink); padding: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
    white-space: nowrap;
  }
  .item-controls button {
    font-family: var(--mono); font-size: 11px; line-height: 1;
    width: 26px; height: 24px; padding: 0;
    color: var(--bone); background: transparent; cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .item-controls button:hover { background: var(--persimmon); color: var(--bone); }
  .item-controls button.del:hover { background: var(--wine); }

  .animal-picker {
    position: fixed; inset: 0; z-index: 95; display: none; place-items: center;
    background: rgba(42,32,24,0.18); padding: 24px;
  }
  .animal-picker.open { display: grid; }
  .animal-picker .ap-panel {
    width: min(430px, 92vw); max-height: min(82vh, 680px); overflow: auto;
    background: rgba(255,255,255,0.98); border: 1px solid rgba(42,32,24,0.12);
    box-shadow: 0 20px 48px rgba(42,32,24,0.18); padding: 22px; display: grid; gap: 14px;
  }
  .animal-picker .ap-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
  .animal-picker .ap-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
  .animal-picker .ap-choices button,
  .animal-picker .ap-cancel {
    border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 12px 10px; min-height: 48px;
    font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; line-height: 1.32; text-transform: uppercase;
  }
  .animal-picker .ap-choices button:hover,
  .animal-picker .ap-cancel:hover { background: rgba(139,36,24,0.08); border-color: var(--wine); }

  .game-launcher {
    margin-top: 14px; padding: 14px 16px;
    border: 1px dashed var(--line);
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
  }
  .game-launcher .info { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.78; line-height: 1.5; }
  .game-launcher .info .title {
    display: block; margin-bottom: 4px;
    font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: 19px; letter-spacing: -0.01em; text-transform: none; opacity: 1; color: var(--wine);
  }
  .btn-game {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
    padding: 12px 18px; border: 2px solid var(--wine); background: var(--wine); color: var(--bone);
    cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  }
  .btn-game::before { content: "\25B6"; font-size: 9px; }
  .btn-game:hover { background: var(--ink); border-color: var(--ink); }
  .btn-game.active { background: var(--ink); border-color: var(--ink); }
  .btn-game.active::before { content: "\25A0"; }

  .design-code-fab {
    position: absolute; right: 14px; bottom: 14px; z-index: 6;
    font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 10px 12px; border: 1px solid rgba(42,32,24,0.14); background: rgba(255,255,255,0.96);
    color: var(--ink); box-shadow: 0 8px 18px rgba(42,32,24,0.12); cursor: pointer;
  }
  .design-code-fab:hover { background: var(--wine); color: var(--bone); border-color: var(--wine); }
  .preview-stage.in-game .design-code-fab { display: none; }
  .design-code-modal .ap-panel { width: min(520px, 94vw); }
  .design-code-grid { display: grid; gap: 12px; }
  .design-code-grid label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); opacity: 0.7; display: block; margin-bottom: 6px; }
  .design-code-grid input { width: 100%; border: 1px solid var(--line); padding: 14px 16px; font-family: var(--mono); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); background: #fff; }
  .design-code-actions { display:flex; gap:10px; flex-wrap:wrap; }
  .design-code-actions button { flex:1; min-width: 140px; border:1px solid var(--wine); background:#fff; color:var(--ink); padding:12px 14px; font-family: var(--mono); font-size:9px; letter-spacing:.16em; text-transform:uppercase; cursor:pointer; }
  .design-code-actions button.primary { background: var(--persimmon); color: var(--bone); border-color: var(--persimmon); }
  .design-code-note { font-family: var(--serif); font-size: 14px; line-height: 1.4; color: var(--ink); opacity: 0.72; }

  .game-panel {
    margin-top: 14px; padding: 16px;
    background: rgba(42, 32, 24, 0.04); border: 1px solid var(--line);
  }
  .game-disclaimer {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--wine); margin-bottom: 12px; line-height: 1.6;
  }
  .game-disclaimer strong { font-weight: 600; color: var(--wine); }
  .game-disclaimer .normal { color: var(--ink); opacity: 0.75; text-transform: none; letter-spacing: 0; font-size: 12px; font-family: var(--serif); display: block; margin-top: 4px; }

  .game-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 10px; }
  .game-sprite {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    min-height: 104px; padding: 9px 7px; background: #FFFFFF;
    border: 1px solid rgba(42,32,24,0.18); cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
  }
  .game-sprite:hover { border-color: var(--wine); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(42,32,24,0.12); background: #FFFDF8; }
  .game-sprite .sp-art { width: 100%; height: 66px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(180deg, rgba(240,232,213,0.82), rgba(255,255,255,0.98)); overflow: hidden; border: 1px solid rgba(42,32,24,0.07); }
  .game-sprite .sp-art img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 6px 7px rgba(42,32,24,0.22)); }
  .game-sprite .sp-art svg { max-width: 92%; max-height: 92%; filter: drop-shadow(0 6px 7px rgba(42,32,24,0.22)); }
  .game-sprite .sp-name { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink); text-align: center; line-height: 1.24; }
  .second-rug-note {
    display: none; margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(139,36,24,0.24); background: rgba(139,36,24,0.06);
    font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.45; color: var(--wine);
  }
  .preview-stage.editing-secondary-rug .second-rug-note { display: block; }

  .game-actions { display: flex; gap: 8px; margin-top: 12px; }
  .game-actions button {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    padding: 10px 14px; border: 1px solid var(--line); background: transparent; color: var(--ink);
    cursor: pointer; transition: all 0.2s;
  }
  .game-actions button:hover { background: var(--wine); color: var(--bone); border-color: var(--wine); }

  
  .zoom-modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(42, 32, 24, 0.88); padding: 60px 60px 100px; }
  .zoom-modal.open { display: grid; }
  .zoom-modal .stage { position: relative; background: #FFFFFF; padding: 40px; max-width: 92vw; max-height: 78vh; overflow: auto; display: grid; place-items: center; }
  .zoom-modal .rug-zoom {
    position: relative; overflow: hidden;
    transform-origin: center center;
    background: var(--rug-color, #DDD);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.30), 0 8px 16px rgba(0, 0, 0, 0.18);
  }
  .zoom-modal .rug-zoom.round { border-radius: 50%; }
  .zoom-modal .rug-zoom .layer { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
  .zoom-modal .rug-zoom.core .layer,
  .zoom-modal .rug-zoom.framed .layer { background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08), transparent 34%), radial-gradient(circle at 70% 60%, rgba(0,0,0,0.06), transparent 36%), linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.035)); }
  .zoom-modal .rug-zoom.soft .layer { background: linear-gradient(115deg, rgba(255,255,255,0.40), rgba(255,255,255,0.18) 25%, transparent 50%, rgba(255,255,255,0.10) 80%, rgba(255,255,255,0.30) 100%); }
  .zoom-modal .close { position: absolute; top: 20px; right: 20px; z-index: 4; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone); border: 1px solid var(--bone); padding: 10px 14px; background: transparent; cursor: pointer; }
  .zoom-modal .close:hover { background: var(--bone); color: var(--ink); }
  .zoom-modal .zoom-controls { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; z-index: 5; }
  .zoom-modal .zoom-controls button, .zoom-modal .zoom-controls .level {
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 12px 14px; border: 1px solid var(--bone); color: var(--bone); background: rgba(0,0,0,0.30);
    min-width: 44px; backdrop-filter: blur(6px);
  }
  .zoom-modal .zoom-controls button:hover { background: var(--bone); color: var(--ink); }
  .zoom-modal .zoom-controls .level { min-width: 70px; text-align: center; }
  .zoom-modal .zoom-controls .glyph { font-family: var(--serif); font-weight: 200; font-size: 18px; line-height: 0; }
  .zoom-modal .caption { position: fixed; top: 30px; left: 60px; right: 60px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bone); display: flex; justify-content: space-between; gap: 24px; pointer-events: none; }
  .zoom-modal .caption .right { text-align: right; opacity: 0.8; }

  
  .account { justify-content: center; padding: clamp(80px, 8vh, 120px) var(--pad); }
  .account .stamp { position: absolute; top: 90px; left: var(--pad); font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.65; }
  .account-grid { display: grid; grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.22fr); gap: clamp(36px, 6vw, 90px); align-items: start; max-width: 1480px; }
  .account h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 5.5vw, 96px); line-height: 0.95; letter-spacing: -0.025em; color: var(--powder-blue); margin-bottom: 26px; }
  .account h2 .ital { font-style: italic; color: var(--powder-blue); }
  .account .intro { font-family: var(--serif); font-weight: 300; font-size: clamp(16px, 1.2vw, 20px); line-height: 1.55; max-width: 560px; opacity: 0.9; }
  .account-note-card { margin-top: 28px; border: 1px solid var(--line); padding: 20px; background: rgba(255,255,255,0.06); }
  .account-note-card .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--persimmon); margin-bottom: 8px; }
  .account-note-card .v { font-family: var(--serif); font-size: 15px; line-height: 1.55; opacity: 0.9; }
  .account-form { display: grid; gap: 18px; padding: clamp(22px, 2.4vw, 34px); background: rgba(240,232,213,0.96); color: var(--ink); border: 1px solid rgba(240,232,213,0.28); box-shadow: 0 18px 38px rgba(42,32,24,0.18); }
  .account-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .account-form .field { display: flex; flex-direction: column; gap: 7px; }
  .account-form label, .account-form .label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.72; }
  .account-form input, .account-form select, .account-form textarea { width: 100%; border: 1px solid rgba(42,32,24,0.18); background: rgba(255,255,255,0.68); color: var(--ink); font-family: var(--sans); font-size: 14px; padding: 12px 13px; outline: 0; border-radius: 0; }
  .account-form textarea { min-height: 92px; resize: vertical; }
  .account-form input:focus, .account-form select:focus, .account-form textarea:focus { border-color: var(--wine); background: #fff; }
  .account-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .account-type-card { border: 1px solid rgba(42,32,24,0.16); padding: 14px; cursor: pointer; background: rgba(255,255,255,0.42); transition: border-color 0.2s, background 0.2s; }
  .account-type-card input { width: auto; margin-right: 8px; accent-color: var(--wine); }
  .account-type-card strong { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
  .account-type-card span { display: block; margin-top: 7px; font-family: var(--serif); font-size: 14px; line-height: 1.45; opacity: 0.82; }
  .account-type-card:has(input:checked) { border-color: var(--wine); background: rgba(139,36,24,0.08); }
  .trade-upload { border: 1px dashed rgba(139,36,24,0.45); padding: 14px; background: rgba(139,36,24,0.04); }
  .trade-upload .hint { margin-top: 6px; font-family: var(--serif); font-size: 13px; line-height: 1.45; opacity: 0.78; }
  .account-form .submit-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .account-form .fine-print { font-family: var(--serif); font-size: 13px; line-height: 1.45; opacity: 0.72; flex: 1; min-width: 220px; }
  .est-note { display:block; font-family:var(--mono); font-size:7px; letter-spacing:0.12em; text-transform:uppercase; color:var(--wine); margin-top:4px; opacity:0.88; }
  @media (max-width: 880px) {
    .account-grid { grid-template-columns: 1fr; }
    .account-form .form-row, .account-type-grid { grid-template-columns: 1fr; }
  }

  
  .contact { justify-content: center; padding: var(--pad); }
  .contact .stamp { position: absolute; top: 90px; left: var(--pad); font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.65; }
  .contact h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 5.5vw, 96px); line-height: 0.95; letter-spacing: -0.025em; margin-bottom: 50px; }
  .contact h2 .ital { font-style: italic; color: var(--persimmon); }
  .contact-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 34px; max-width: 1480px; }
  .contact .col .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 12px; color: var(--powder-blue); }
  .contact .col .v { font-family: var(--serif); font-size: clamp(16px, 1.35vw, 22px); font-weight: 300; line-height: 1.42; }
  .contact .col a:hover { font-style: italic; color: var(--powder-blue); }
  .contact .colophon { position: absolute; bottom: 70px; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.65; }
  .contact .stamp,
  .contact .colophon { color: var(--powder-blue); }

  
  .cover h1,
  .story h2,
  .overview .head h2,
  .col-card h3,
  .hero-collection h2,
  .editions .head h2,
  .builder .head h2,
  .contact h2,
  .cover h1 .ital,
  .story h2 .accent,
  .overview .head h2 .accent,
  .hero-collection h2 .vibrant,
  .editions .head h2 .accent,
  .builder .head h2 .vibrant,
  .contact h2 .ital {
    color: var(--powder-blue);
  }

  
  .panel,
  .panel *,
  .cover-center,
  .cover-foot .tag.right,
  .overview .head .note,
  .editions .head .note,
  .contact .colophon {
    text-align: left;
    text-align-last: left;
  }
  .cover-center { align-items: flex-start; }
  .cover .ornament { padding-left: 0; letter-spacing: 1.1em; }
  .cover-foot .tag.right { margin-left: 0; }
  .cover-foot .crest { text-align: left; }
  .cover .kicker,
  .cover-foot .tag,
  .story p,
  .overview .head .note,
  .col-card .desc,
  .hero-collection .blurb,
  .editions .head .note,
  .process-step .desc,
  .game-launcher .info,
  .game-disclaimer,
  .game-disclaimer .normal,
  .contact .col .v {
    text-wrap: auto;
    hyphens: manual;
    text-align: left;
    text-align-last: left;
    overflow-wrap: break-word;
  }
  .game3d-hint,
  .game-launcher .info,
  #cover .cover-center,
  #cover .cover-center * {
    text-align: center !important;
    text-align-last: center !important;
  }
  #cover .cover-center { align-items: center !important; }
  #cover .kicker { margin-left: auto; margin-right: auto; }
  .story-grid > div { width: 100%; }
  .story p { max-width: min(86ch, 100%); }
  .hero-collection .blurb { max-width: min(66ch, 100%); }
  .editions .head .note { max-width: min(68ch, 100%); }
  .overview .head .note { max-width: min(44ch, 100%); }
  .col-card .desc { max-width: none; }

  
  .size-tool, .trade-portal, .majlis-game-section { padding: clamp(72px, 7vh, 112px) var(--pad); justify-content: center; overflow-y: auto; }
  .size-tool .head, .trade-portal .head, .majlis-game-section .head { display: flex; justify-content: space-between; align-items: baseline; gap: 36px; margin-bottom: 28px; }
  .size-tool h2, .trade-portal h2, .majlis-game-section h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 5vw, 84px); line-height: .95; letter-spacing: -0.025em; color: var(--powder-blue); }
  .size-tool h2 .ital, .trade-portal h2 .ital, .majlis-game-section h2 .ital { font-style: italic; color: var(--powder-blue); }
  .size-tool .note, .trade-portal .note, .majlis-game-section .note { font-family: var(--serif); font-size: clamp(14px, 1.05vw, 18px); line-height: 1.5; max-width: 520px; opacity: .88; }
  .size-tool-grid { display: grid; grid-template-columns: minmax(320px,.85fr) minmax(420px,1.15fr); gap: clamp(26px, 4vw, 70px); align-items: start; }
  .size-tool-card, .trade-card, .quote-form, .room-visualizer-card, .game-sidebar, .game-toolbar { border: 1px solid var(--line); background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 16px 34px rgba(42,32,24,.10); }
  .size-tool-card { padding: clamp(22px, 2.5vw, 34px); display: grid; gap: 16px; }
  .tool-field { display: grid; gap: 7px; }
  .tool-field label, .tool-label { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
  .tool-field input, .tool-field select, .tool-field textarea, .quote-form input, .quote-form select, .quote-form textarea, .game-sidebar input, .game-sidebar select, .game-sidebar textarea { width: 100%; border: 1px solid rgba(42,32,24,.18); background: rgba(255,255,255,.78); color: var(--ink); font-family: var(--sans); font-size: 14px; padding: 12px 13px; outline: 0; border-radius: 0; }
  .tool-field input:focus, .tool-field select:focus, .tool-field textarea:focus, .quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus, .game-sidebar input:focus, .game-sidebar select:focus, .game-sidebar textarea:focus { border-color: var(--wine); background: #fff; }
  .tool-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .size-results { display: grid; gap: 14px; }
  .size-result-card { border: 1px solid rgba(42,32,24,.16); background: rgba(255,255,255,.86); padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
  .size-result-card .k { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--wine); margin-bottom: 5px; }
  .size-result-card .v { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 40px); font-weight: 300; line-height: 1; }
  .size-result-card p { font-family: var(--serif); font-size: 14px; line-height: 1.45; opacity: .82; margin-top: 8px; max-width: 58ch; }
  .mini-btn { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; padding: 11px 13px; border: 1px solid var(--wine); background: #fff; color: var(--ink); cursor: pointer; }
  .mini-btn:hover, .mini-btn.primary { background: var(--persimmon); border-color: var(--persimmon); color: var(--bone); }
  .helper-copy { font-family: var(--serif); font-size: 14px; line-height: 1.5; opacity: .76; }

  .purchase-path { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 6px; }
  .purchase-path button { min-height: 54px; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; line-height: 1.28; text-transform: uppercase; border: 1px solid rgba(42,32,24,.16); background: #fff; color: var(--ink); padding: 10px; cursor: pointer; }
  .purchase-path button.primary { background: var(--persimmon); border-color: var(--persimmon); color: var(--bone); }
  .purchase-path button:hover { border-color: var(--wine); background: rgba(139,36,24,.08); color: var(--ink); }
  .purchase-path button.primary:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }

  .quote-modal .ap-panel { width: min(760px, 94vw); }
  .quote-form { padding: clamp(18px, 2vw, 28px); display: grid; gap: 14px; box-shadow: none; }
  .quote-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .quote-form textarea { min-height: 92px; resize: vertical; }
  .quote-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .quote-options label { border: 1px solid rgba(42,32,24,.16); padding: 12px; display: flex; gap: 8px; align-items: flex-start; cursor: pointer; background: #fff; }
  .quote-options input { width: auto; margin-top: 2px; accent-color: var(--wine); }
  .quote-options span { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; line-height: 1.35; text-transform: uppercase; }
  .quote-options label:has(input:checked) { border-color: var(--wine); background: rgba(139,36,24,.08); }
  .quote-actions { display: flex; gap: 10px; flex-wrap: wrap; }

  
  .trade-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(26px,4vw,70px); align-items: start; }
  .trade-benefits { display: grid; gap: 10px; margin-top: 24px; }
  .trade-benefit { border-top: 1px solid var(--line); padding-top: 14px; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
  .trade-benefit .num { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--persimmon); }
  .trade-benefit strong { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 4px; }
  .trade-benefit span { display: block; font-family: var(--serif); font-size: 14px; line-height: 1.45; opacity: .85; }
  .trade-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
  .trade-card { padding: 18px; min-height: 134px; display: flex; flex-direction: column; gap: 8px; }
  .trade-card .k { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--wine); }
  .trade-card .v { font-family: var(--serif); font-size: clamp(22px, 2vw, 32px); font-weight: 300; line-height: 1.05; }
  .trade-card p { font-family: var(--serif); font-size: 13px; line-height: 1.45; opacity: .76; }
  .trade-card .card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 7px; }
  .trade-card.full { grid-column: 1 / -1; }
  .portal-list { display: grid; gap: 6px; margin-top: 6px; max-height: 118px; overflow: auto; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; opacity: .82; }
  .portal-note { min-height: 84px; resize: vertical; }

  .trade-simple-grid { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(420px, 1.22fr); gap: clamp(26px,4vw,70px); align-items: start; }
  .trade-simple-copy { display: grid; gap: 18px; }
  .trade-simple-copy p { font-family: var(--serif); font-size: clamp(16px,1.2vw,20px); line-height: 1.55; max-width: 600px; opacity: .9; }
  .trade-simple-list { display: grid; gap: 12px; margin-top: 10px; }
  .trade-simple-list div { border-top: 1px solid var(--line); padding-top: 12px; font-family: var(--serif); font-size: 14px; line-height: 1.45; opacity: .86; }
  .trade-simple-list strong { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--persimmon); margin-bottom: 5px; }
  .trade-inquiry-form { padding: clamp(20px, 2.2vw, 32px); display: grid; gap: 14px; background: rgba(240,232,213,0.96); color: var(--ink); border: 1px solid rgba(240,232,213,0.28); box-shadow: 0 18px 38px rgba(42,32,24,0.18); }
  .trade-inquiry-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .trade-inquiry-form textarea { min-height: 96px; resize: vertical; }
  .trade-inquiry-form .fine-print { font-family: var(--serif); font-size: 13px; line-height: 1.45; opacity: .72; }
  @media (max-width: 1180px) { .trade-simple-grid { grid-template-columns: 1fr; } }
  @media (max-width: 880px) { .trade-inquiry-form .form-row { grid-template-columns: 1fr; } }

  
  .inquiry-quotes-panel { background: #FAF6EE !important; color: var(--ink); }
  .inquiry-head { align-items: flex-end; border-bottom: 1px solid rgba(42,32,24,0.14); padding-bottom: 24px; }
  .section-kicker { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--powder-blue); margin-bottom: 12px; }
  .inquiry-quotes-grid { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(520px, 1.28fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
  .inquiry-intro-card { border: 1px solid rgba(42,32,24,0.14); background: #fff; color: var(--ink); padding: clamp(22px, 2.5vw, 34px); box-shadow: 0 18px 34px rgba(42,32,24,0.08); }
  .inquiry-card-label, .form-section-title { font-family: var(--mono); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--powder-blue); }
  .inquiry-lede { font-family: var(--serif); font-size: clamp(18px, 1.45vw, 24px); line-height: 1.42; margin-top: 16px; color: var(--ink); }
  .inquiry-steps { display: grid; gap: 14px; margin-top: 26px; }
  .inquiry-steps div { display: grid; grid-template-columns: 44px 1fr; gap: 14px; border-top: 1px solid rgba(42,32,24,0.12); padding-top: 14px; }
  .inquiry-steps strong { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--powder-blue); }
  .inquiry-steps span { font-family: var(--serif); font-size: 14px; line-height: 1.45; color: var(--ink); opacity: .82; }
  .inquiry-quote-form { background: #fff; color: var(--ink); border: 1px solid rgba(42,32,24,0.14); box-shadow: 0 22px 44px rgba(42,32,24,0.11); border-radius: 0; }
  .inquiry-quote-form .form-section-title { margin-top: 2px; }
  .optional-trade-box { border: 1px solid rgba(64,208,208,.38); background: rgba(64,208,208,.055); padding: 16px; display: grid; gap: 12px; }
  .optional-trade-box p { font-family: var(--serif); font-size: 13.5px; line-height: 1.45; color: var(--ink); opacity: .78; }
  .trade-inquiry-form label, .trade-inquiry-form .label { color: var(--ink); }
  .trade-inquiry-form input, .trade-inquiry-form select, .trade-inquiry-form textarea { border-color: rgba(42,32,24,0.18); background: #fff; }
  .trade-inquiry-form input:focus, .trade-inquiry-form select:focus, .trade-inquiry-form textarea:focus { border-color: var(--powder-blue); box-shadow: 0 0 0 3px rgba(64,208,208,0.14); }
  @media (max-width: 1180px) { .inquiry-quotes-grid { grid-template-columns: 1fr; } }

  
  .panel a:hover, .contact .col a:hover { color: var(--powder-blue); }

  
  .majlis-game-section { justify-content: flex-start; }
  .game-workspace { display: grid; grid-template-columns: minmax(520px, 1fr) minmax(300px, 380px); gap: 16px; height: calc(100vh - 210px); min-height: 620px; }
  .game-main { position: relative; border: 1px solid var(--line); background: #fff; min-height: 100%; }
  .game-full-stage.preview-stage { position: absolute; inset: 0; min-height: 0; height: 100%; padding: 0; overflow: hidden; background: #fff; }
  .game-full-stage #game3DCanvas { left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; }
  
  .game-full-stage.in-game #game3DCanvas { display: block; }
  .game-full-stage.in-game .game3d-hint { opacity: 0.55; }
  .game-full-stage.in-game .game-fab { display: inline-flex; }
  .game-full-stage.in-game.has-selection .game3d-controls { display: flex !important; gap: 4px; z-index: 30; }
  .game-full-stage .game-panel.game-panel-floating.open { display: block; }
  .game-full-stage .game-float-panel.open { display: block; }

  .game-toolbar { position: absolute; left: 14px; top: 14px; z-index: 11; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px; background: rgba(255,255,255,.90); }
  .game-toolbar .btn-game { min-height: 38px; }
  .game-toolbar .mini-btn.active { background: var(--ink); color: var(--bone); border-color: var(--ink); }
  .game-toolbar .mini-btn:disabled, .game-sidebar select:disabled { opacity: 0.45; cursor: not-allowed; }

  .game-sidebar { padding: 14px; overflow: auto; }
  .game-sidebar-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 12px; }
  .game-sidebar-tabs button { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; border: 1px solid rgba(42,32,24,.16); background: #fff; color: var(--ink); padding: 11px 7px; cursor: pointer; }
  .game-sidebar-tabs button.active { background: var(--wine); border-color: var(--wine); color: var(--bone); }
  .game-sidebar-panel { display: none; gap: 12px; }
  .game-sidebar-panel.active { display: grid; }
  .game-sidebar h4 { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; margin: 8px 0 2px; }
  .game-code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .game-editor-tabs, .game-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .game-editor-tabs button, .game-mini-grid button { border: 1px solid rgba(42,32,24,.16); background: #fff; padding: 10px 7px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
  .game-editor-tabs button.active, .game-mini-grid button.active { background: rgba(139,36,24,.10); border-color: var(--wine); color: var(--wine); }
  .game-swatch-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: 128px; overflow: auto; }
  .game-swatch-grid button { aspect-ratio: 1; border: 1px solid rgba(42,32,24,.18); min-height: 22px; cursor: pointer; position: relative; }
  .game-swatch-grid button.active { outline: 2px solid var(--wine); outline-offset: 1px; }
  .wall-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .wall-card { border: 1px solid rgba(42,32,24,.16); padding: 10px; display: grid; gap: 8px; background: rgba(255,255,255,.72); }
  .wall-card strong { font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--wine); }
  .game-note { font-family: var(--serif); font-size: 13px; line-height: 1.45; opacity: .76; }

  @media (max-width: 1180px) {
    .size-tool-grid, .trade-grid, .game-workspace { grid-template-columns: 1fr; height: auto; }
    .game-main { min-height: 620px; }
    .game-sidebar { max-height: none; }
    .purchase-path { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 880px) {
    .size-tool .head, .trade-portal .head, .majlis-game-section .head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .tool-two, .quote-form .form-row, .quote-options, .trade-dashboard, .wall-grid { grid-template-columns: 1fr; }
    .size-result-card { grid-template-columns: 1fr; }
    .purchase-path { grid-template-columns: 1fr; }
    .game-main { min-height: 540px; }
    .game-workspace { min-height: 0; }
  }

  .swatch[data-image="true"], .game-swatch-grid button, .swatch-strip .sw { background-repeat: no-repeat; background-position: center center; background-size: cover; }
  .rug-preview.image-material, .rug-zoom.image-material { background-repeat: no-repeat; background-position: center center; background-size: cover; }
  .rug-preview.soft.image-material, .rug-zoom.soft.image-material { filter: saturate(1.05) brightness(1.04); }
  .size-result-card.with-plan { grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto; align-items: center; }
  .size-result-plan { width: 100%; min-width: 180px; }
  .size-plan { width: 100%; height: auto; display: block; background: rgba(255,255,255,0.66); border: 1px solid rgba(42,32,24,0.10); }
  @media (max-width: 880px) { .size-result-card.with-plan { grid-template-columns: 1fr; } .size-result-plan { order: 2; } }

  
  .magic-carpet-flyover {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 35;
  }
  .magic-carpet-ship {
    position: absolute;
    top: clamp(84px, 18vh, 210px);
    left: 0;
    width: min(260px, 29vw);
    min-width: 190px;
    opacity: 0;
    transform: translate3d(120vw, 0, 0) rotate(-3deg);
    transform-origin: center center;
    filter: drop-shadow(0 12px 18px rgba(42, 32, 24, 0.18));
    will-change: transform, opacity;
  }
  .magic-carpet-flyover.active .magic-carpet-ship {
    animation: magicCarpetFly 14s linear 1 forwards;
    opacity: 1;
  }
  .magic-carpet-flyover.variant-white.active .magic-carpet-ship {
    animation: magicCarpetFlyReverse 14s linear 1 forwards;
  }
  .magic-carpet-flyover .variant-white-cat,
  .magic-carpet-flyover .variant-white-rug,
  .magic-carpet-flyover .magic-carpet-zs { display: none; }
  .magic-carpet-flyover.variant-white .variant-black-cat,
  .magic-carpet-flyover.variant-white .variant-black-rug,
  .magic-carpet-flyover.variant-white .magic-carpet-trail { display: none; }
  .magic-carpet-flyover.variant-white .variant-white-cat,
  .magic-carpet-flyover.variant-white .variant-white-rug,
  .magic-carpet-flyover.variant-white .magic-carpet-zs { display: inline; }
  .magic-carpet-flyover.active .magic-carpet-wobble {
    transform-origin: center center;
    animation: magicCarpetWobble 1s ease-in-out infinite alternate;
  }
  .magic-carpet-flyover.active .magic-carpet-rug-a {
    animation: magicCarpetMorphA 1.15s ease-in-out infinite alternate;
  }
  .magic-carpet-flyover.active .magic-carpet-rug-b {
    animation: magicCarpetMorphB 1.15s ease-in-out infinite alternate;
  }
  .magic-carpet-flyover.active .magic-carpet-trail circle,
  .magic-carpet-flyover.active .magic-carpet-trail path {
    animation: magicCarpetTrailPulse 1.6s ease-in-out infinite;
  }
  .magic-carpet-flyover.active .magic-carpet-trail .d2 { animation-delay: 0.18s; }
  .magic-carpet-flyover.active .magic-carpet-trail .d3 { animation-delay: 0.34s; }
  .magic-carpet-flyover.active .magic-carpet-trail .d4 { animation-delay: 0.5s; }

  @keyframes magicCarpetFly {
    0% { transform: translate3d(118vw, 10px, 0) rotate(-4deg); opacity: 0; }
    5% { opacity: 1; }
    22% { transform: translate3d(82vw, -6px, 0) rotate(2deg); }
    48% { transform: translate3d(40vw, 12px, 0) rotate(-1.5deg); }
    74% { transform: translate3d(-1vw, -10px, 0) rotate(1deg); }
    95% { opacity: 1; }
    100% { transform: translate3d(-32vw, 8px, 0) rotate(-3deg); opacity: 0; }
  }
  @keyframes magicCarpetFlyReverse {
    0% { transform: translate3d(-34vw, 8px, 0) rotate(3deg); opacity: 0; }
    5% { opacity: 1; }
    22% { transform: translate3d(0vw, -6px, 0) rotate(-1deg); }
    48% { transform: translate3d(40vw, 10px, 0) rotate(1.5deg); }
    74% { transform: translate3d(82vw, -8px, 0) rotate(-2deg); }
    95% { opacity: 1; }
    100% { transform: translate3d(118vw, 8px, 0) rotate(4deg); opacity: 0; }
  }
  @keyframes magicCarpetWobble {
    0% { transform: translateY(-2px) scaleX(1) scaleY(1); }
    100% { transform: translateY(3px) scaleX(1.03) scaleY(0.98); }
  }
  @keyframes magicCarpetMorphA {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(1px); }
  }
  @keyframes magicCarpetMorphB {
    0% { opacity: 0; transform: translateY(-1px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  @keyframes magicCarpetTrailPulse {
    0%, 100% { opacity: 0.2; transform: translateX(0) scale(0.96); }
    50% { opacity: 0.55; transform: translateX(-3px) scale(1.04); }
  }
  .magic-carpet-zs text {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    fill: rgba(0,0,0,0.92);
  }
  .magic-carpet-zs text.up { animation: magicCarpetZFloatUp 1.7s ease-in-out infinite; }
  .magic-carpet-zs text.down { animation: magicCarpetZFloatDown 1.7s ease-in-out infinite; }
  .magic-carpet-zs text.z2 { animation-delay: 0.22s; }
  .magic-carpet-zs text.z3 { animation-delay: 0.44s; }
  .magic-carpet-zs text.z4 { animation-delay: 0.66s; }
  @keyframes magicCarpetZFloatUp {
    0%, 100% { opacity: 0.20; transform: translateY(1px); }
    50% { opacity: 0.96; transform: translateY(-5px); }
  }
  @keyframes magicCarpetZFloatDown {
    0%, 100% { opacity: 0.26; transform: translateY(-1px); }
    50% { opacity: 0.96; transform: translateY(4px); }
  }

  
  .reveal { transform: none; opacity: 1; transition: none; }
  .panel.is-active .reveal { transform: none; opacity: 1; }
  .reveal.d2 { transition-delay: 0.15s; }
  .reveal.d3 { transition-delay: 0.3s; }
  .reveal.d4 { transition-delay: 0.45s; }
  .reveal.d5 { transition-delay: 0.6s; }

  
  .toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--wine); color: var(--bone); padding: 14px 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  
  .majlis-game-section .head .note { font-size: clamp(10px, 0.75vw, 12px) !important; line-height: 1.45 !important; max-width: 620px !important; letter-spacing: 0.12em !important; }
  .majlis-game-section .game-toolbar { gap: 6px !important; padding: 6px !important; background: rgba(255,255,255,0.94) !important; }
  .majlis-game-section .mini-btn,
  .majlis-game-section .btn-game,
  .majlis-game-section .game-fab,
  .majlis-game-section .game-sidebar-tabs button,
  .majlis-game-section .game-editor-tabs button,
  .majlis-game-section .game-mini-grid button,
  .majlis-game-section .game-actions button,
  .majlis-game-section .mini-actions button {
    background: #540D00 !important;
    color: #FFFFFF !important;
    border-color: #540D00 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    font-weight: 600 !important;
  }
  .majlis-game-section .mini-btn.primary,
  .majlis-game-section .game-sidebar-tabs button.active,
  .majlis-game-section .game-editor-tabs button.active,
  .majlis-game-section .game-mini-grid button.active {
    background: #8B2418 !important;
    color: #FFFFFF !important;
    border-color: #8B2418 !important;
    box-shadow: none !important;
  }
  .majlis-game-section .game-sidebar,
  .majlis-game-section .game-float-panel,
  .majlis-game-section .game-panel {
    color: #000000 !important;
  }
  .majlis-game-section .game-sidebar label,
  .majlis-game-section .game-sidebar h4,
  .majlis-game-section .game-note,
  .majlis-game-section .tool-field input,
  .majlis-game-section .tool-field select,
  .majlis-game-section .tool-field textarea {
    color: #000000 !important;
    opacity: 1 !important;
  }
  .majlis-game-section .game-disclaimer { font-size: 8.2px !important; line-height: 1.35 !important; letter-spacing: 0.11em !important; }
  .majlis-game-section .game-disclaimer .normal { font-size: 10.5px !important; line-height: 1.35 !important; }
  
  .rug-preview.core > .layer,
  .rug-zoom.core > .layer,
  .rug-big.core::before,
  .corner-inspector.wool .ci-rug::before { background: none !important; background-image: none !important; }
  .rug-preview.core,
  .rug-zoom.core { background-image: none !important; }

  
  @media (max-width: 1480px), (max-height: 940px) {
    :root { --pad: clamp(22px, 3vw, 52px); }
    .panel { padding-top: clamp(72px, 7vh, 90px); padding-bottom: clamp(72px, 7vh, 90px); }
    .overview .head { margin-bottom: clamp(22px, 3vh, 40px); }
    .col-card { padding: clamp(20px, 2vw, 28px); gap: 12px; }
    .col-card h3 { font-size: clamp(26px, 3vw, 42px); }
    .col-card .desc { font-size: clamp(13px, 1.05vw, 15px); line-height: 1.45; }
    .hero-collection { padding-top: clamp(72px, 7vh, 100px); padding-bottom: clamp(72px, 7vh, 100px); }
    .hero-grid { gap: clamp(28px, 4vw, 60px); }
    .hero-collection h2 { font-size: clamp(44px, 6.4vw, 98px); }
    .hero-collection .blurb { font-size: clamp(15px, 1.2vw, 19px); line-height: 1.45; }
    .hero-collection .specs { margin-top: clamp(20px, 3vh, 32px); gap: 16px 24px; }
    .builder .head { margin-bottom: clamp(16px, 2.2vh, 24px); }
    .builder .head h2 { font-size: clamp(32px, 4vw, 54px); }
    .builder .head .note { max-width: 42ch; text-align: right; }
    .builder-grid { --builder-pane-height: clamp(520px, calc(100vh - 230px), 860px); }
    .builder-controls h4 { margin: 16px 0 9px; }
    .color-grid { max-height: min(126px, 16vh); }
    .pile-opt, .shape-opt { padding: 10px 12px; }
    .pile-opt .ph-mm { font-size: 22px; }
    .preview-summary { gap: 10px; padding-top: 12px; }
    .preview-summary .v { font-size: 16px; }
    .game-panel.game-panel-floating { max-height: min(42%, 260px); }
    .game-tray { max-height: 220px; overflow-y: auto; }
    .preview-pane { height: auto; min-height: 0; }
    .preview-stage { min-height: 360px; }
    .game-launcher { order: 2; margin-top: 0; }
    .preview-summary { order: 3; }
    .inquire-row { order: 4; }
  }

  @media (max-width: 1180px) {
    .scroll-shell { height: auto; }
    .sticky { position: static; height: auto; overflow: visible; }
    .track { display: block; height: auto; transform: none !important; }
    .panel { width: 100%; flex: none; height: auto; min-height: 100vh; overflow: visible; }
    .builder-grid { grid-template-columns: 1fr; --builder-pane-height: auto; }
    .builder-controls, .preview-pane { height: auto; min-height: 0; }
    .builder-controls { overflow: visible; padding-right: 0; }
    .preview-pane { min-height: 640px; }
    .preview-stage { min-height: 420px; }
    .preview-stage.in-game { min-height: 580px; }
    .col-grid { grid-template-columns: 1fr; }
    .col-card { aspect-ratio: auto; min-height: 260px; }
  }

  
  @media (max-width: 880px) {
    .scroll-shell { height: auto; }
    .sticky { position: static; height: auto; overflow: visible; }
    .track { display: block; height: auto; transform: none !important; }
    .panel { width: 100%; flex: none; height: auto; min-height: 100vh; padding: 120px 24px 100px; }
    .story-grid, .hero-grid, .builder-grid { grid-template-columns: 1fr; gap: 40px; }
    .builder-controls, .preview-pane { height: auto; min-height: 0; }
    .builder-controls { overflow: visible; padding-right: 0; }
    .col-grid { grid-template-columns: 1fr; }
    .col-card { aspect-ratio: auto; min-height: 320px; }
    .nav-jumps { display: none; }
    .bottom-bar .progress-track { display: none; }
    .story .stats { grid-template-columns: repeat(2, 1fr); }
    .framed-designs { grid-template-columns: repeat(2, 1fr); }
    .color-grid { grid-template-columns: repeat(8, minmax(18px, 1fr)); max-height: 132px; }
    .swatch-strip { grid-template-columns: repeat(6, 1fr); }
    .cover-foot { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .cover-foot .tag.right { text-align: center; margin-left: 0; }
    .cover-foot .tag, .cover-foot .crest { margin: 0 auto; }
    .editions-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .contact-grid { grid-template-columns: 1fr; gap: 28px; }
    .editions .head { flex-direction: column; gap: 18px; align-items: flex-start; }
    .editions .head .note { text-align: left; }
    .process-step { grid-template-columns: 40px 1fr; row-gap: 4px; }
    .process-step .desc { grid-column: 2; }
    .process-step .label { grid-column: 2; }
    .preview-summary { grid-template-columns: repeat(2, 1fr); }
    .preview-pane { min-height: 0; }
    .preview-stage { min-height: 360px; }
    .preview-stage.in-game { min-height: 520px; }
    .game-launcher { flex-direction: column; align-items: stretch; }
    .btn-game { width: 100%; justify-content: center; }
    .game-panel.game-panel-floating { max-height: 270px; }
    .pile-picker, .shape-picker { grid-template-columns: 1fr; }
    .zoom-modal { padding: 40px 20px 100px; }
    .zoom-modal .caption { left: 20px; right: 20px; top: 20px; flex-direction: column; gap: 4px; }
  }

  
  .majlis-game-section .game-toolbar,
  .majlis-game-section .game-sidebar { color: var(--ink); }
  .majlis-game-section .game-toolbar .btn-game,
  .majlis-game-section .game-toolbar .mini-btn,
  .majlis-game-section .game-sidebar-tabs button,
  .majlis-game-section .game-editor-tabs button,
  .majlis-game-section .game-mini-grid button,
  .majlis-game-section .game-actions button,
  .majlis-game-section #gameShareDesignCode,
  .majlis-game-section #gameShareDesign,
  .majlis-game-section #saveGameNotes,
  .majlis-game-section #copyGameNotes,
  .majlis-game-section .game-fab,
  .majlis-game-section .mini-actions button {
    background: #540D00 !important;
    color: #FFFFFF !important;
    border-color: #540D00 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    box-shadow: 0 8px 18px rgba(42, 32, 24, 0.16);
  }
  .majlis-game-section .game-toolbar .btn-game:hover,
  .majlis-game-section .game-toolbar .mini-btn:hover,
  .majlis-game-section .game-sidebar-tabs button:hover,
  .majlis-game-section .game-editor-tabs button:hover,
  .majlis-game-section .game-mini-grid button:hover,
  .majlis-game-section .game-actions button:hover,
  .majlis-game-section .game-fab:hover,
  .majlis-game-section .mini-actions button:hover,
  .majlis-game-section .game-toolbar .mini-btn.active,
  .majlis-game-section .game-sidebar-tabs button.active,
  .majlis-game-section .game-editor-tabs button.active,
  .majlis-game-section .game-mini-grid button.active {
    background: #8B2418 !important;
    color: #FFFFFF !important;
    border-color: #8B2418 !important;
    box-shadow: none !important;
  }
  .majlis-game-section .game-swatch-grid button {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
  }
  .majlis-game-section .game-swatch-grid button.active {
    outline: 2px solid #40D0D0 !important;
    outline-offset: 2px;
    border-color: #540D00 !important;
  }
  .majlis-game-section .game-sidebar label,
  .majlis-game-section .game-sidebar h4,
  .majlis-game-section .tool-label,
  .majlis-game-section .game-note {
    color: #2A2018 !important;
  }

  
  .majlis-game-section .game-toolbar .mini-btn,
  .majlis-game-section .btn-game,
  .majlis-game-section .game-fab,
  .majlis-game-section .game-sidebar-tabs button,
  .majlis-game-section .game-editor-tabs button,
  .majlis-game-section .game-mini-grid button,
  .majlis-game-section .game-actions button,
  .majlis-game-section .mini-actions button,
  .majlis-game-section .design-code-actions button {
    background: #6B1A14 !important;
    color: #F0E8D5 !important;
    border-color: #6B1A14 !important;
    opacity: 1 !important;
  }
  .majlis-game-section .game-toolbar .mini-btn:hover,
  .majlis-game-section .btn-game:hover,
  .majlis-game-section .game-fab:hover,
  .majlis-game-section .game-sidebar-tabs button:hover,
  .majlis-game-section .game-editor-tabs button:hover,
  .majlis-game-section .game-mini-grid button:hover,
  .majlis-game-section .game-actions button:hover,
  .majlis-game-section .mini-actions button:hover {
    background: #540D00 !important;
    color: #FFFFFF !important;
    border-color: #540D00 !important;
    box-shadow: none !important;
  }
  .majlis-game-section .game-toolbar .mini-btn.active,
  .majlis-game-section .game-toolbar .mini-btn.primary,
  .majlis-game-section .game-sidebar-tabs button.active,
  .majlis-game-section .game-editor-tabs button.active,
  .majlis-game-section .game-mini-grid button.active,
  .majlis-game-section .mini-actions button.primary {
    background: #8B2418 !important;
    color: #FFFFFF !important;
    border-color: #8B2418 !important;
    box-shadow: none !important;
  }
  #gamePileButtons {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  #gamePileButtons button { min-width: 0; white-space: nowrap; }
  @media (max-width: 520px) {
    #gamePileButtons { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  }

  
  .quote-modal .ap-panel {
    width: min(840px, 94vw) !important;
    background: #FAF6EE !important;
    border: 1px solid rgba(42,32,24,0.16) !important;
    box-shadow: 0 30px 70px rgba(42,32,24,0.22) !important;
  }
  .quote-modal .ap-title,
  .inquiry-quote-form .form-section-title {
    color: #050505 !important;
    letter-spacing: .24em !important;
  }
  .quote-form,
  .inquiry-quote-form {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,246,238,0.96)) !important;
    border: 1px solid rgba(42,32,24,0.16) !important;
    box-shadow: 0 22px 52px rgba(42,32,24,0.12) !important;
    padding: clamp(22px, 2.6vw, 36px) !important;
    gap: 18px !important;
  }
  .inquiry-quote-form { position: relative; overflow: hidden; }
  .inquiry-quote-form::before,
  .quote-form::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #40D0D0, rgba(64,208,208,0.18), #050505);
    margin: calc(clamp(22px, 2.6vw, 36px) * -1) calc(clamp(22px, 2.6vw, 36px) * -1) 4px;
  }
  .quote-form .form-row,
  .trade-inquiry-form .form-row {
    gap: 14px !important;
  }
  .quote-form .field,
  .trade-inquiry-form .field {
    display: grid;
    gap: 7px;
  }
  .quote-form label,
  .trade-inquiry-form label,
  .tool-field label {
    font-family: var(--mono) !important;
    font-size: 9px !important;
    letter-spacing: .20em !important;
    text-transform: uppercase !important;
    opacity: .72 !important;
  }
  .quote-form input,
  .quote-form select,
  .quote-form textarea,
  .trade-inquiry-form input,
  .trade-inquiry-form select,
  .trade-inquiry-form textarea {
    border: 1px solid rgba(42,32,24,0.18) !important;
    background: rgba(255,255,255,0.92) !important;
    min-height: 46px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  }
  .quote-form input:focus,
  .quote-form select:focus,
  .quote-form textarea:focus,
  .trade-inquiry-form input:focus,
  .trade-inquiry-form select:focus,
  .trade-inquiry-form textarea:focus {
    border-color: #40D0D0 !important;
    box-shadow: 0 0 0 3px rgba(64,208,208,0.14), inset 0 1px 0 rgba(255,255,255,0.75) !important;
  }
  .quote-options {
    padding: 14px;
    background: rgba(240,232,213,0.44);
    border: 1px solid rgba(42,32,24,0.10);
  }
  .quote-options label {
    min-height: 54px;
    align-items: center !important;
    background: #fff !important;
  }
  .optional-trade-box {
    border-color: rgba(64,208,208,.50) !important;
    background: linear-gradient(180deg, rgba(64,208,208,.09), rgba(255,255,255,.86)) !important;
  }
  .inquiry-intro-card {
    background: linear-gradient(180deg, #ffffff, #FAF6EE) !important;
    box-shadow: 0 22px 48px rgba(42,32,24,0.10) !important;
  }
  .inquiry-steps div {
    background: rgba(255,255,255,0.62);
    padding: 14px !important;
    border: 1px solid rgba(42,32,24,0.10) !important;
  }
  .wall-toggle-button {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--wine);
    background: var(--wine);
    color: var(--bone);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .20em;
    text-transform: uppercase;
    padding: 12px 13px;
    cursor: pointer;
  }
  .wall-toggle-button[aria-pressed="false"] { background: #fff; color: var(--ink); border-color: rgba(42,32,24,.18); }
  .wall-toggle-button:disabled { opacity: .45; cursor: not-allowed; }

  
  .magic-carpet-flyover { display: none !important; }

  
  :root {
    --majlis-type-heading: var(--serif);
    --majlis-type-subhead: var(--sans);
    --majlis-type-body: var(--sans);
    --majlis-type-small: var(--mono);
    --majlis-body-size: clamp(14px, 0.92vw, 17px);
    --majlis-body-line: 1.56;
    --majlis-subhead-size: clamp(13px, 0.86vw, 16px);
    --majlis-small-size: clamp(8.5px, 0.6vw, 10.5px);
  }

  .panel h1,
  .panel h2,
  .panel h3,
  .cover h1,
  .story h2,
  .overview .head h2,
  .hero-collection h2,
  .editions .head h2,
  .builder .head h2 {
    font-family: var(--majlis-type-heading) !important;
  }

  .panel p,
  .panel .desc,
  .panel .blurb,
  .panel .note:not(.builder-intro-note),
  .panel .collab,
  .panel .body-copy,
  .story p,
  .editions .head .note,
  .process-step .desc,
  .terms-grid p,
  .faq-answer,
  .contact-copy {
    font-family: var(--majlis-type-body) !important;
    font-size: var(--majlis-body-size);
    line-height: var(--majlis-body-line);
    letter-spacing: 0.01em;
  }

  .panel .k,
  .panel .label,
  .process-step .label,
  .builder-controls h4,
  .tabs .tab,
  .btn,
  .top-nav,
  .bottom-bar,
  .builder-note-eyebrow,
  .cover .meta-row,
  .overview .head .note,
  .hero-collection .top {
    font-family: var(--majlis-type-small) !important;
  }

  .story-grid,
  .hero-grid,
  .editions .head,
  .overview .head,
  .builder .head,
  .builder-grid {
    width: 100%;
    max-width: none;
  }

  .builder {
    padding-top: clamp(64px, 6.5vh, 86px);
    overflow-y: hidden;
  }

  .builder .head {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(620px, 1.35fr);
    column-gap: clamp(42px, 7vw, 140px);
    align-items: start;
    margin-bottom: clamp(18px, 2.1vh, 30px);
  }

  .builder .head h2 {
    margin: 0;
    max-width: none;
    font-size: clamp(46px, 4.35vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.025em;
  }

  .builder .head .builder-intro-note {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: clamp(18px, 2.2vw, 36px);
    align-items: start;
    max-width: none;
    width: 100%;
    justify-self: stretch;
    opacity: 1;
    color: rgba(42,32,24,0.72);
    text-transform: none;
    letter-spacing: 0;
  }

  .builder .head .builder-note-eyebrow {
    display: block;
    font-size: var(--majlis-small-size);
    line-height: 1.45;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(84,13,0,0.72);
  }

  .builder .head .note .builder-material-inline-note {
    display: block;
    margin-top: 0;
    max-width: none;
    font-family: var(--majlis-type-body) !important;
    font-size: var(--majlis-body-size);
    line-height: var(--majlis-body-line);
    letter-spacing: 0.01em;
    text-transform: none;
    color: rgba(42,32,24,0.78);
  }

  @media (max-width: 1180px), (max-height: 780px) {
    .builder .head {
      grid-template-columns: 1fr;
      gap: 14px;
    }
    .builder .head .builder-intro-note {
      grid-template-columns: 0.9fr 1.1fr;
    }
    .builder .head h2 {
      font-size: clamp(36px, 5vw, 56px);
    }
  }

  @media (max-width: 860px) {
    .builder .head .builder-intro-note {
      grid-template-columns: 1fr;
    }
  }


/* v316 clean: faceted non-FRAMED shape and folded Reveal support */
#shapePicker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sh-icon.faceted i {
  position: absolute;
  inset: 0;
  clip-path: polygon(16% 0, 84% 0, 100% 16%, 100% 84%, 84% 100%, 16% 100%, 0 84%, 0 16%);
  border: 2px solid currentColor;
  background: transparent;
}
.rug-preview.faceted-shape,
.rug-zoom.faceted-shape {
  clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0 88%, 0 12%);
}
body.collection-framed [data-shape="faceted"],
body.collection-framed [data-game-shape="faceted"] {
  display: none !important;
}
@media (max-width: 880px) {
  #shapePicker { grid-template-columns: 1fr; }
}
