/* YIRINATEK storefront look for the 3D viewer: Poppins, near-black text, brand red accent.
   Loaded after style.css; overrides only, so upstream viewer styles stay untouched. */
@font-face{font-family:Poppins;src:url(assets/fonts/poppins-400.ttf) format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:Poppins;src:url(assets/fonts/poppins-500.ttf) format("truetype");font-weight:500;font-display:swap}
@font-face{font-family:Poppins;src:url(assets/fonts/poppins-600.ttf) format("truetype");font-weight:600;font-display:swap}

:root{--yiri-ink:#1F2328;--yiri-muted:#6B6F73;--yiri-line:#E6E6E6;--yiri-accent:#D04540;--yiri-accent-hover:#B83A35;--yiri-soft:#F5F5F5}

body,button,input,select{font-family:Poppins,"Segoe UI","Microsoft YaHei",sans-serif}
body{background:#fff;color:var(--yiri-ink)}

/* Header: site logo instead of the typed wordmark */
header{background:#fff;border-bottom:1px solid var(--yiri-line)}
header .yiri-logo{display:flex;align-items:center;line-height:0}
header .yiri-logo img{height:30px;width:auto}
header>span{color:var(--yiri-muted);letter-spacing:1px}

/* Panel typography */
aside{background:#fff}
h2,.caption h1{color:var(--yiri-ink);font-weight:600;letter-spacing:-.3px}
.intro,.caption p,.hint,output,.caption span,.eyebrow,.note{color:var(--yiri-muted)}
.eyebrow,.caption span{letter-spacing:2px}

/* Controls: pill buttons like the storefront */
button{border-radius:999px;border-color:#D9D9D9;color:var(--yiri-ink)}
button:hover{background:var(--yiri-soft)}
.active{background:var(--yiri-ink)!important;color:#fff;border-color:var(--yiri-ink)}
.finish-control button{background:#fff}
.finish-control button[aria-pressed=true]{border-color:var(--yiri-ink);box-shadow:none}
input[type=range]{accent-color:var(--yiri-ink)}
select{border-radius:999px;border:1px solid #D9D9D9;color:var(--yiri-ink)}
.switch{background:var(--yiri-ink)}
.switch[aria-pressed=false]{background:#C9C9C9}
.reset{color:var(--yiri-muted)}
.line{border-color:var(--yiri-line)}

/* Primary action uses the brand red, as on the product page */
.wall-launch{background:var(--yiri-accent)!important;border-color:var(--yiri-accent)!important;color:#fff!important;font-weight:500}
.wall-launch:hover{background:var(--yiri-accent-hover)!important}

footer{color:var(--yiri-muted);border-top:1px solid var(--yiri-line)}

/* Shopper-facing panel: controls only, no marketing copy or tuning sliders */
.eyebrow,aside h2,.intro,.note,footer,header>span,.caption span,.caption p{display:none!important}
.control:has(#frontFill){display:none!important}
main{min-height:calc(100vh - 76px)}

/* Embedded on the product page: the storefront header already shows the logo, and the
   viewer fills exactly the frame the host gives it (no scrolling inside the frame). */
.yiri-embed header .yiri-logo{display:none}
.yiri-embed body{height:100vh;overflow:hidden}
.yiri-embed header{height:60px}
.yiri-embed main{height:calc(100vh - 60px);min-height:0}
.yiri-embed #stage{min-height:0;height:100%}
.yiri-embed aside{overflow-y:auto;padding:24px 26px 20px}
.yiri-embed aside .control{margin:20px 0}

/* Embedded on phones: everything in one screen. Stage fills the space above a compact
   control block; marketing labels and the door-angle slider give way to buttons. */
@media (max-width:760px){
  .yiri-embed body{height:100vh;overflow:hidden}
  .yiri-embed header{height:48px;padding:0 12px}
  .yiri-embed main{display:flex;flex-direction:column;height:calc(100vh - 48px);min-height:0}
  .yiri-embed #stage{flex:1 1 auto;min-height:0;height:auto}
  /* Square canvas on phones (opt-in with ?sq=1 from the product page): full width, height =
     width; the host frame grows to fit. */
  .yiri-embed.yiri-square #stage{flex:0 0 100vw;width:100%;height:100vw;min-height:0;max-height:none}
  .yiri-embed.yiri-square main{height:auto}
  .yiri-embed.yiri-square body{height:auto;overflow:visible}
  .yiri-embed .hint{bottom:10px;left:12px;font-size:11px}
  .yiri-embed aside{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px 12px}
  .yiri-embed aside>*{margin:0!important}
  .yiri-embed .finish-control{order:1;grid-column:1/-1}
  .yiri-embed .finish-control>span{display:none}
  .yiri-embed .finish-control{display:block}
  .yiri-embed .finish-control>div{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;gap:6px}
  .yiri-embed .finish-control>div::-webkit-scrollbar{display:none}
  .yiri-embed .finish-control button{flex:none;padding:8px 12px}
  .yiri-embed #designControl{order:2;grid-column:1/-1}
  .yiri-embed #designControl .label{display:none}
  .yiri-embed #designControl select{width:100%;height:40px;padding:0 14px}
  .yiri-embed .control:has(#door){order:3;grid-column:1/-1}
  .yiri-embed .control:has(#door) .label,.yiri-embed #door{display:none}
  .yiri-embed .control:has(#door) .buttons{margin:0}
  .yiri-embed .control:has(#door) .buttons button{padding:9px 10px}
  .yiri-embed .control.line{order:4;grid-column:1/-1;padding:8px 0}
  .yiri-embed .wall-launch{order:5;padding:11px 10px;font-size:14px}
  .yiri-embed #reset{order:5;border:1px solid #D9D9D9;padding:11px 10px}
}

/* Download confirmation and progress (gate.js) */
.yiri-gate{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(240,240,238,.92);transition:opacity .35s ease}
.yiri-gate.is-done{opacity:0;pointer-events:none}
.yiri-gate__card{max-width:340px;padding:22px 22px 20px;border-radius:14px;background:#fff;text-align:center;box-shadow:0 6px 24px rgba(31,35,40,.12)}
.yiri-gate__title{margin:0 0 6px;font-size:16px;font-weight:600;color:var(--yiri-ink)}
.yiri-gate__text{margin:0 0 16px;font-size:13px;line-height:1.6;color:var(--yiri-muted)}
.yiri-gate__text strong{color:var(--yiri-ink)}
.yiri-gate__btn{width:100%;padding:12px 16px;border:0;background:var(--yiri-accent);color:#fff;font-weight:500}
.yiri-gate__btn:hover{background:var(--yiri-accent-hover)}
.yiri-gate__progress{width:min(320px,80%);text-align:center}
.yiri-gate__bar{height:6px;border-radius:999px;background:#DADAD7;overflow:hidden}
.yiri-gate__bar span{display:block;width:0;height:100%;border-radius:inherit;background:var(--yiri-accent);transition:width .2s ease}
.yiri-gate__count{margin:10px 0 0;font-size:12px;color:var(--yiri-muted);font-variant-numeric:tabular-nums}

/* Fit My Wall: visible but not available yet */
.yiri-wall-beta,.yiri-wall-beta:hover{background:#EDEDED!important;border-color:#EDEDED!important;color:#9A9A9A!important;cursor:not-allowed;opacity:1}
.yiri-beta{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:999px;background:#fff;color:var(--yiri-muted);font-size:10px;font-weight:600;letter-spacing:.5px;vertical-align:1px}

/* Full-screen overlay on the product page (opt-in with ?ov=1): the model picker floats as a
   pill over the top-left of the canvas, so the canvas gets the full frame height. */
.yiri-ov header{position:absolute;top:10px;left:10px;z-index:20;height:auto!important;padding:0!important;border:0;background:transparent}
.yiri-ov header .model-nav{margin:0}
.yiri-ov .model-trigger{min-height:36px;padding:7px 14px;border:1px solid rgba(31,35,40,.12);border-radius:999px;background:rgba(255,255,255,.88);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 2px 8px rgba(31,35,40,.10);font-size:13px}
.yiri-ov .model-menu{position:fixed;top:56px;left:8px;right:8px;border-radius:14px}
.yiri-ov.yiri-embed main{height:100vh}

/* Overlay panel rows (ov-controls.js): label left, control right. */
.yiri-ov .finish-control,.yiri-ov #designControl,.yiri-ov .control:has(#door){display:none!important}
.yiri-ov .yiri-row{display:flex;align-items:center;justify-content:space-between;gap:12px;grid-column:1/-1;margin:0}
.yiri-ov .yiri-row--finish{order:1}.yiri-ov .yiri-row--design{order:2}.yiri-ov .yiri-row--doors{order:3}
.yiri-ov .yiri-row__label{font-size:14px;color:var(--yiri-ink);white-space:nowrap}
.yiri-ov .yiri-row #doorDesign{width:auto;max-width:62%;height:40px;padding:0 14px}
.yiri-dd{position:relative}
.yiri-dd__btn{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px 0 10px;background:#fff;font-size:14px}
.yiri-dd__btn svg{width:16px;height:16px;color:var(--yiri-muted)}
.yiri-dd__list{position:absolute;right:0;bottom:calc(100% + 6px);z-index:30;min-width:180px;margin:0;padding:6px;list-style:none;border-radius:14px;background:#fff;box-shadow:0 8px 28px rgba(31,35,40,.18)}
.yiri-dd__list li{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;font-size:14px;cursor:pointer}
.yiri-dd__list li:hover,.yiri-dd__list li[aria-selected=true]{background:var(--yiri-soft)}
.yiri-ball{display:inline-block;width:18px;height:18px;flex:none;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}
.yiri-ov .control.line{order:4}
.yiri-ov aside .yiri-row{margin:0 0 16px}
.yiri-ov.yiri-embed aside{overflow:visible}
