
:root{
  --navy:#071a27;
  --navy2:#0b2534;
  --cream:#f4eadb;
  --gold:#d7a45d;
  --orange:#dc6544;
  --ink:#102734;
  --muted:#637079;
  --line:rgba(16,39,52,.16);
  --glass:rgba(5,18,27,.84);
}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0}
body{
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:#fff;
  background:#061521;
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
a{color:inherit}

/* ---------- CLIENT VIEWER ---------- */
.viewer-page{
  position:relative;
  width:100%;
  height:100vh;
  min-height:720px;
  overflow:hidden;
  background:#061521;
}
.stage-bg{
  position:absolute;
  inset:0 0 0 max(0px,calc(27.8vw - clamp(220px,11vw,380px)));
  background-image:
    linear-gradient(90deg,rgba(3,14,21,.12),rgba(3,14,21,0) 24%),
    url('/assets/studio-bg-responsive-v2.png?v=305');
  background-repeat:no-repeat;
  background-size:100% 100%;
  background-position:right center;
  image-rendering:auto;
}
.story-panel{
  position:absolute;
  z-index:20;
  left:0;
  top:0;
  height:100%;
  width:34vw;
  min-width:520px;
  pointer-events:none;
}
.story-panel-bg{
  position:absolute;
  top:0;
  bottom:0;
  left:-12px;
  width:calc(100% + 12px);
  height:100%;
  object-fit:fill;
  object-position:left center;
  image-rendering:auto;
}
.story-content{
  position:relative;
  z-index:2;
  width:27.2vw;
  min-width:430px;
  height:100%;
  padding:40px 34px 34px 30px;
  color:var(--ink);
  display:flex;
  flex-direction:column;
}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:52px;
}
.brand-cube{width:34px;height:34px;flex:0 0 34px}
.brand-name{font-size:21px;font-weight:900;letter-spacing:.06em;line-height:1}
.brand-sub{font-size:9px;font-weight:800;letter-spacing:.14em;margin-top:5px}
.story-eyebrow{
  color:var(--orange);
  font-size:clamp(17px,1.03vw,21px);
  font-weight:900;
  letter-spacing:.12em;
  margin:0 0 20px;
}
.story-title{
  margin:0 0 28px;
  font-size:clamp(33px,2.2vw,48px);
  line-height:.98;
  letter-spacing:-.025em;
  font-weight:950;
}
.story-title .accent{color:var(--orange)}
.feature-list{
  border-top:1px solid var(--line);
  margin-top:4px;
}
.feature{
  padding:15px 0 13px;
  border-bottom:1px solid var(--line);
}
.feature-title{
  font-size:13px;
  font-weight:950;
  letter-spacing:.05em;
  margin-bottom:5px;
}
.feature-text{
  font-size:12px;
  line-height:1.42;
  color:#53616a;
  max-width:360px;
}
.story-note{
  margin-top:auto;
  padding-top:18px;
  font-size:10px;
  color:#727b80;
  line-height:1.4;
}

.stage{
  position:absolute;
  z-index:5;
  left:27.8vw;
  right:0;
  top:0;
  bottom:0;
  overflow:hidden;
}
#threeCanvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  touch-action:none;
}
.workshop-title{
  position:absolute;
  z-index:7;
  left:50%;
  top:22px;
  transform:translateX(-50%);
  text-align:center;
  color:#efd2a5;
  pointer-events:none;
  text-shadow:0 2px 18px rgba(0,0,0,.34);
}
.workshop-small{
  font-family:Georgia,serif;
  letter-spacing:.62em;
  font-size:12px;
  margin-left:.62em;
}
.workshop-big{
  font-family:Georgia,serif;
  font-size:42px;
  letter-spacing:.12em;
  line-height:1.02;
  margin-top:3px;
}
.loading{
  position:absolute;
  z-index:8;
  left:50%;
  top:48%;
  transform:translate(-50%,-50%);
  background:rgba(5,19,28,.78);
  border:1px solid rgba(239,210,165,.2);
  border-radius:16px;
  padding:14px 18px;
  font-weight:800;
  letter-spacing:.06em;
  font-size:12px;
  backdrop-filter:blur(8px);
}
.loading-progress{
  margin-top:8px;
  width:190px;
  height:4px;
  border-radius:10px;
  background:rgba(255,255,255,.12);
  overflow:hidden;
}
.loading-progress>i{display:block;width:0;height:100%;background:#df6a46;transition:width .2s}
.variant-tabs{
  position:absolute;
  z-index:9;
  left:50%;
  bottom:128px;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  max-width:min(760px,70%);
  flex-wrap:wrap;
  justify-content:center;
}
.variant-tab{
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  background:rgba(6,21,31,.80);
  border-radius:999px;
  padding:9px 16px;
  font-size:12px;
  font-weight:800;
  backdrop-filter:blur(8px);
}
.variant-tab.active{
  background:#db6645;
  border-color:#e8896b;
}
.variant-tab.liked:after{
  content:" ♥";
  color:#ffd4c7;
}
.variant-tab:disabled{
  cursor:not-allowed;
  color:rgba(255,255,255,.48);
  background:rgba(6,21,31,.52);
  border-style:dashed;
}
.view-controls{
  position:absolute;
  z-index:10;
  left:50%;
  bottom:69px;
  transform:translateX(-50%);
  display:flex;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
  border-radius:13px;
  background:rgba(5,18,27,.84);
  box-shadow:0 12px 34px rgba(0,0,0,.22);
  backdrop-filter:blur(12px);
}
.view-controls button{
  border:0;
  border-right:1px solid rgba(255,255,255,.12);
  color:#fff;
  background:transparent;
  padding:12px 17px;
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
}
.view-controls button:last-child{border-right:0}
.view-controls button.active{background:#db6645}
.split-line{
  position:absolute;
  z-index:6;
  top:122px;
  bottom:145px;
  left:50%;
  width:2px;
  transform:translateX(-1px);
  background:rgba(255,244,225,.92);
  box-shadow:0 0 12px rgba(255,255,255,.28);
  pointer-events:none;
}
.split-handle{
  position:absolute;
  z-index:11;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid #d7a45d;
  background:#0a2632;
  display:grid;
  place-items:center;
  font-weight:900;
  color:#fff;
  cursor:ew-resize;
  box-shadow:0 7px 24px rgba(0,0,0,.34);
}
.viewer-hint{
  position:absolute;
  z-index:8;
  left:50%;
  bottom:42px;
  transform:translateX(-50%);
  font-size:10px;
  color:rgba(255,255,255,.72);
  letter-spacing:.02em;
}
.approval-card{
  position:absolute;
  z-index:12;
  right:18px;
  bottom:18px;
  width:270px;
  background:rgba(5,18,27,.89);
  border:1px solid rgba(239,210,165,.18);
  border-radius:15px;
  padding:13px;
  backdrop-filter:blur(12px);
  box-shadow:0 12px 34px rgba(0,0,0,.25);
}
.approval-title{
  color:#efd2a5;
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  margin-bottom:8px;
}
.approval-current{
  font-size:12px;
  font-weight:800;
  margin-bottom:9px;
}
.approval-card textarea{
  width:100%;
  height:48px;
  resize:none;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.13);
  background:rgba(255,255,255,.06);
  color:#fff;
  padding:8px 9px;
  font-size:11px;
  outline:none;
}
.approval-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
.approval-actions button,.like-btn{
  border:0;
  border-radius:9px;
  padding:9px 8px;
  font-weight:850;
  font-size:10px;
}
.like-btn{width:100%;background:#db6645;color:#fff;margin-bottom:8px}
.approve-btn{background:#e8d2ad;color:#142832}
.correction-btn{background:#243b48;color:#fff}
.status-toast{
  position:absolute;
  z-index:30;
  right:18px;
  top:18px;
  background:#163343;
  color:#fff;
  border:1px solid rgba(255,255,255,.15);
  border-radius:10px;
  padding:10px 13px;
  font-size:11px;
  opacity:0;
  transform:translateY(-8px);
  transition:.25s;
  pointer-events:none;
}
.status-toast.show{opacity:1;transform:translateY(0)}

/* ---------- ADMIN ---------- */
.admin-page{
  min-height:100vh;
  background:#0b1115;
  color:#eef2f3;
}
.admin-wrap{max-width:1180px;margin:0 auto;padding:28px 22px 80px}
.admin-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  margin-bottom:26px;
}
.admin-header h1{margin:0;font-size:28px}
.admin-header p{margin:5px 0 0;color:#8f9aa0;font-size:12px}
.admin-badge{
  padding:8px 12px;border-radius:999px;background:#15242c;color:#d7a45d;
  font-size:11px;font-weight:800
}
.admin-grid{display:grid;grid-template-columns:360px 1fr;gap:18px}
.card{
  background:#111a20;
  border:1px solid #22313a;
  border-radius:15px;
  padding:17px;
}
.card h2{margin:0 0 15px;font-size:16px}
.form-row{margin-bottom:12px}
.form-row label{display:block;font-size:11px;color:#9ba7ad;margin-bottom:5px}
.form-row input,.form-row select{
  width:100%;border:1px solid #2a3a44;background:#0b1318;color:#fff;border-radius:9px;
  padding:10px 11px;outline:none
}
.primary{
  border:0;border-radius:9px;padding:11px 14px;background:#db6645;color:#fff;font-weight:850
}
.secondary{
  border:1px solid #31434e;border-radius:9px;padding:9px 11px;background:#17252d;color:#fff;font-weight:800
}
.danger{border:1px solid #68362e;background:#2f1714;color:#ffc5b8}
.project-card{
  background:#111a20;border:1px solid #22313a;border-radius:15px;padding:16px;margin-bottom:12px
}
.client-directory{min-width:0}
.client-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}
.client-toolbar h2{margin:0 0 5px}
.client-stats{font-size:11px;color:#8d9aa0}
.client-filters{display:flex;gap:8px;align-items:center}
.client-filters input,.client-filters select{
  border:1px solid #2a3a44;background:#0b1318;color:#fff;border-radius:9px;padding:9px 10px;outline:none
}
.client-filters input{width:220px}
.project-top{display:flex;justify-content:space-between;gap:12px;align-items:start}
.client-name{font-size:11px;color:#d7a45d;font-weight:900;letter-spacing:.07em;text-transform:uppercase;margin-bottom:4px}
.project-name{font-size:16px;font-weight:900}
.project-meta{font-size:11px;color:#8d9aa0;margin-top:4px}
.link-expiry{display:inline-flex;margin-top:8px;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:850}
.link-expiry.active{background:#153527;color:#aee6bf}
.link-expiry.warning{background:#403419;color:#f2d48b}
.link-expiry.expired{background:#3c1f1d;color:#ffb5a8}
.project-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.secondary:disabled{opacity:.42;cursor:not-allowed}
.variant-admin{
  margin-top:12px;padding:11px;border-radius:11px;background:#0c1419;border:1px solid #1e2d35
}
.variant-admin-head{display:flex;justify-content:space-between;gap:10px;align-items:center}
.variant-admin-title{font-size:12px;font-weight:850}
.variant-status{font-size:10px;color:#9aa7ad}
.upload-line{display:flex;gap:8px;align-items:center;margin-top:9px}
.upload-line input{font-size:10px;max-width:230px}
.size-line{font-size:10px;color:#83939c;margin-top:6px}
.progress{height:4px;background:#26353e;border-radius:6px;overflow:hidden;margin-top:7px}
.progress i{display:block;height:100%;width:0;background:#db6645}
.login-box{
  width:min(390px,92vw);margin:14vh auto 0;background:#111a20;border:1px solid #263842;
  border-radius:16px;padding:22px
}
.login-box h1{margin:0 0 6px}
.login-box p{color:#87959d;font-size:12px}
.login-box input{width:100%;margin:9px 0 10px;padding:11px;border-radius:9px;border:1px solid #32434d;background:#091116;color:#fff}
.copy-field{font-size:10px;color:#9aa7ad;word-break:break-all;margin-top:6px}
.empty{color:#849198;font-size:12px;padding:18px 4px}

/* responsive */
@media(max-width:1100px){
  .story-panel{min-width:440px;width:38vw}
  .story-content{min-width:365px;width:31vw;padding-left:24px}
  .stage{left:31vw}
  .stage-bg{left:max(0px,calc(31vw - clamp(160px,14vw,250px)))}
  .approval-card{width:240px}
}
@media(min-width:2200px){
  .stage-bg{
    background-size:100% 100%;
    background-position:right center;
  }
}
@media(max-width:780px){
  .viewer-page{min-height:100vh;overflow:auto;background:#061521}
  .stage-bg{position:fixed;inset:220px 0 0;background-size:cover;background-position:82% bottom}
  .story-panel{position:relative;width:100%;height:220px;min-width:0}
  .story-panel-bg{display:none}
  .story-panel{background:#f4eadb}
  .story-content{width:100%;min-width:0;height:auto;padding:14px 18px}
  .brand{margin-bottom:10px}.brand-cube{width:24px;height:24px;flex-basis:24px}
  .brand-name{font-size:17px}.brand-sub{font-size:7px}
  .story-eyebrow{font-size:12px;margin-bottom:7px}
  .story-title{font-size:26px;margin-bottom:8px}
  .feature-list{display:none}.story-note{display:none}
  .stage{position:relative;left:0;height:calc(100vh - 220px);min-height:600px}
  .workshop-title{top:12px}.workshop-big{font-size:25px}.workshop-small{font-size:8px}
  .approval-card{position:absolute;right:8px;left:8px;bottom:8px;width:auto}
  .variant-tabs{bottom:271px;max-width:calc(100% - 24px);width:max-content;flex-wrap:nowrap;gap:4px}
  .variant-tab{padding:7px 10px;font-size:10px}
  .view-controls{bottom:223px;max-width:95%}
  .view-controls button{padding:10px 10px;font-size:10px}
  .viewer-hint{display:none}
  .split-line{top:75px;bottom:320px}
  .admin-grid{grid-template-columns:1fr}
  .client-toolbar{align-items:stretch;flex-direction:column}
  .client-filters{flex-direction:column;align-items:stretch}
  .client-filters input{width:100%}
}
