:root{
  --bg:#f6f7fb;
  --panel: rgba(255,255,255,.78);
  --text:#0f172a;
  --muted:#475569;
  --brand:#e61e64;
  --line: rgba(15,23,42,.10);
  --radius:16px;
  --shadow: 0 12px 30px rgba(2,6,23,.10);
  --headerH:64px;
  --footerH:72px;
  --max: 1280px;
}
body.theme-dark{
  --bg:#0b0d12;
  --panel: rgba(17,22,34,.75);
  --text:#e9ecf1;
  --muted:#a7afbf;
  --line:rgba(255,255,255,.08);
  --shadow: 0 12px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  overflow-x:hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(230,30,100,.22), transparent 55%),
              radial-gradient(900px 500px at 80% 10%, rgba(72,86,255,.18), transparent 60%),
              var(--bg);
  color:var(--text);
}
button, input, select{font:inherit}
.container{max-width: var(--max); margin:0 auto; padding: 12px;}
.header{
  position: sticky; top:0; z-index:10; height: var(--headerH);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner{height:100%; display:flex; align-items:center; justify-content:space-between; gap:12px;}
.brand{display:flex; align-items:center; gap:10px; min-width: unset;}
.brand img{height:30px; width:auto; max-width: 150px;}
.actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end;}
.langs{display:flex; gap:6px; padding:6px; border:1px solid var(--line); background: rgba(255,255,255,.04); border-radius:999px;}
.langs button{border:0; background:transparent; color:var(--muted); padding:6px 10px; border-radius:999px; cursor:pointer;}
.langs button.active{color:var(--text); background: rgba(230,30,100,.18); outline:1px solid rgba(230,30,100,.35);}
.icon-btn{border:1px solid var(--line); background: rgba(255,255,255,.04); color:var(--text); width:42px; height:42px; border-radius:12px; cursor:pointer; display:grid; place-items:center;}
.icon-btn:hover{background: rgba(255,255,255,.07);}

.main{padding-bottom: 18px;}
.grid{display:grid; grid-template-columns: 1.3fr .9fr; gap:12px; align-items:start;}
.card{background: var(--panel); border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);}
.card-inner{padding:14px;}
.canvas-wrap{position:relative; overflow:hidden; min-height: 520px;}
#standCanvas{width:100%; height:520px; display:block; touch-action:none;}
.canvas-overlay{position:absolute; left:12px; bottom:12px; display:flex; gap:8px; align-items:center; padding:8px 10px; border-radius:999px; background: rgba(0,0,0,.35); border:1px solid var(--line); color: var(--muted); font-size:12px; pointer-events:none;}
.badge{color:var(--text); background: rgba(230,30,100,.18); border:1px solid rgba(230,30,100,.35); padding:3px 8px; border-radius:999px;}

.h-title{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; padding-bottom:10px; border-bottom:1px solid var(--line); margin-bottom:12px;}
.h-title h2{margin:0; font-size:16px;}
.small{color:var(--muted); font-size:12px;}

.form{display:flex; flex-direction:column; gap:12px;}
.row{display:grid; grid-template-columns: 1fr 1fr; gap:10px;}
.label{font-size:12px; color: var(--muted); margin-bottom:6px;}
.input, select{width:100%; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); outline:none;}
.options{display:grid; grid-template-columns:1fr; gap:8px;}
.opt{display:flex; gap:10px; padding:10px 12px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.03); cursor:pointer;}
.opt input{margin-top:4px}
.opt.active{border-color: rgba(230,30,100,.45); background: rgba(230,30,100,.10);}

.toggle{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.03);}
.toggle input{transform: scale(1.1)}
.hidden{display:none !important}

.panel-grid{display:grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap:6px;}
.panel{border:1px solid var(--line); border-radius:10px; padding:8px 6px; text-align:center; font-size:12px; color:var(--muted); cursor:pointer; background: rgba(255,255,255,.03); user-select:none;}
.panel.on{color:var(--text); background: rgba(230,30,100,.16); border-color: rgba(230,30,100,.40);}
.hint{font-size:12px; color: var(--muted); margin-top:6px;}

.summary-box{position: sticky; top: calc(var(--headerH) + 12px);}
.kv{display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--line); color: var(--muted); font-size:13px;}
.kv strong{color: var(--text); font-weight:700}
.kv:last-child{border-bottom:0}
.total{margin-top:10px; padding:12px; border-radius:14px; border:1px solid rgba(230,30,100,.35); background: rgba(230,30,100,.10); display:flex; justify-content:space-between; align-items:center;}
.total strong{font-size:18px;}

.footer{
  position: fixed; left:0; right:0; bottom:0;
  height: var(--footerH); z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-top: 1px solid var(--line);
}
.footer-inner{height:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;}
.navbtn{display:flex; align-items:center; justify-content:center; gap:10px; padding:12px 14px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); cursor:pointer; min-width:120px;}
.navbtn.primary{border-color: rgba(230,30,100,.40); background: rgba(230,30,100,.16);}
.navbtn:disabled{opacity:.45; cursor:not-allowed}
.step-ind{color: var(--muted); font-size: 13px;}

.menu-drawer{position: fixed; top:0; right:0; height:100%; width:min(360px, 92vw); background: color-mix(in srgb, var(--bg) 85%, #111 15%); backdrop-filter: blur(16px); border-left:1px solid var(--line); z-index:30; transform: translateX(110%); transition: transform .22s ease;}
.menu-drawer.open{transform: translateX(0)}
.drawer-inner{padding:18px}
.drawer-list{display:flex; flex-direction:column; gap:10px}
.drawer-item{padding:12px; border:1px solid var(--line); border-radius:14px; background: rgba(255,255,255,.03); color: var(--text);}
.backdrop{position: fixed; inset:0; background: rgba(0,0,0,.35); z-index:25; opacity:0; pointer-events:none; transition: opacity .22s ease;}
.backdrop.show{opacity:1; pointer-events:auto}

@media (max-width: 980px){
  .brand img{height:32px;}
  .langs button{padding:6px 8px;}
  .icon-btn{width:40px;height:40px;}
  #standCanvas{height:420px;}
  .canvas-wrap{min-height:420px;}
  .grid{grid-template-columns: 1fr;}
  .summary-box{position: relative; top:0;}
  .navbtn{min-width:110px;}
}

.langdrop{position:relative;}
.langdrop-btn{
  display:flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
}
.langdrop-menu{
  position:absolute; right:0; top: calc(100% + 8px);
  min-width: 140px;
  border:1px solid var(--line);
  background: var(--panel);
  border-radius:14px;
  box-shadow: var(--shadow);
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
  z-index: 50;
}
.langdrop-menu button{
  width:100%;
  display:flex; align-items:center; gap:10px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
}
.langdrop-menu button:hover{ background: rgba(255,255,255,.06); }
.flag{font-size:16px; line-height:1;}

.brand .title{font-size:14px; line-height:1.1;}
