:root{
  --bg:#eeeeee;
  --panel:#ffffff;
  --panel-soft:#f6f6f6;
  --line:#d8d8d8;
  --text:#1e1e1e;
  --muted:#666666;
  --header:#2f2f2f;
  --header-soft:#3d3d3d;
  --gold:#bca165;
  --gold-dark:#a88d52;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif}
body{min-height:100vh}

.page{
  max-width:1400px;
  margin:0 auto;
  padding:24px;
}

.topbar{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  box-shadow:var(--shadow);
}

.brand{
  display:flex;
  align-items:center;
  gap:16px;
}

.brand-logo{
  width:64px;
  height:64px;
  object-fit:contain;
  background:#111;
  border-radius:14px;
  padding:6px;
}

.brand-title{
  font-size:30px;
  font-weight:800;
  letter-spacing:.02em;
}

.brand-subtitle{
  font-size:14px;
  color:var(--muted);
  margin-top:4px;
}

.topbar-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.mini-nav{
  margin:14px 0 20px;
  background:var(--header);
  color:#fff;
  border-radius:12px;
  padding:10px 16px;
  display:flex;
  gap:12px;
  align-items:center;
  font-size:13px;
}

.quick-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:18px;
  margin-bottom:20px;
}

.quick-card,.panel-card,.workspace-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.quick-card{
  padding:18px;
}

.quick-card h3,
.panel-card h3{
  margin:0 0 10px;
  font-size:20px;
}

.quick-card p,
.panel-card p{
  margin:0 0 12px;
  font-size:14px;
  color:var(--muted);
  line-height:1.5;
}

.workspace-card{
  padding:20px;
  margin-bottom:20px;
}

.workspace-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:18px;
}

.workspace-head h2{
  margin:0 0 6px;
  font-size:28px;
}

.workspace-head p{
  margin:0;
  color:var(--muted);
}

.status-box{
  background:var(--panel-soft);
  border:1px solid var(--line);
  border-radius:999px;
  padding:12px 16px;
  font-size:13px;
  color:var(--header);
  white-space:nowrap;
}

.canvas-wrap{
  background:#fafafa;
  border:1px dashed #c7c7c7;
  border-radius:24px;
  min-height:600px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
}

.empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  color:var(--muted);
  text-align:center;
  padding:32px;
}

#previewImage{
  max-width:100%;
  max-height:760px;
  display:none;
}

.control-grid{
  display:grid;
  grid-template-columns:1.15fr 1.4fr 1fr;
  gap:18px;
}

.panel-card{
  padding:18px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:14px;
}

label{
  font-size:13px;
  font-weight:700;
}

input[type="number"],select{
  height:46px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:0 14px;
  background:#fff;
  color:var(--text);
  font-size:15px;
}

.range-field input[type="range"]{
  width:100%;
}

.switch-row{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin:8px 0 16px;
}

.summary-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:16px 0 18px;
}

.summary-list div{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  background:var(--panel-soft);
  border:1px solid var(--line);
  border-radius:12px;
}

.summary-list span{
  color:var(--muted);
}

.cta-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.info-box{
  margin-top:12px;
  border:1px solid var(--line);
  background:var(--panel-soft);
  border-radius:14px;
  padding:14px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.info-box.subtle{
  margin-top:16px;
}

.file-btn,
.primary-btn,
.ghost-btn{
  appearance:none;
  border:none;
  cursor:pointer;
  border-radius:12px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  font-weight:700;
  text-decoration:none;
  transition:.18s ease;
}

.file-btn input{
  display:none;
}

.primary-btn{
  background:var(--gold);
  color:#fff;
}

.primary-btn:hover{
  background:var(--gold-dark);
}

.ghost-btn{
  background:#fff;
  color:var(--header);
  border:1px solid #bdbdbd;
}

.ghost-btn:hover,
.file-btn:hover{
  background:#f4f4f4;
}

.file-btn{
  background:var(--header);
  color:#fff;
}

.full{
  width:100%;
}

.file-meta{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}

.pill-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  height:38px;
  border-radius:999px;
  border:1px solid #bdbdbd;
  background:#fff;
  padding:0 16px;
  cursor:pointer;
  font-weight:700;
}

.pill.active{
  background:var(--header);
  color:#fff;
  border-color:var(--header);
}

@media (max-width: 1180px){
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .control-grid{grid-template-columns:1fr}
  .workspace-head{flex-direction:column}
}

@media (max-width: 760px){
  .page{padding:14px}
  .topbar{flex-direction:column;align-items:flex-start}
  .quick-grid{grid-template-columns:1fr}
  .brand-title{font-size:24px}
  .canvas-wrap{min-height:420px}
  .mini-nav{overflow:auto}
}
