/* Somjade Astrobook - Brown / Gold / White theme */
:root{
  --bg: #fffdf8;
  --card: #ffffff;
  --text: #3d342f;
  --muted: #7a6b63;
  --border: #eadfce;
  --gold: #b8860b;
  --gold2:#d4af37;
  --brown:#5b4639;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-size: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, #fff3d6 0%, rgba(255,243,214,0) 55%),
              radial-gradient(900px 500px at 85% 20%, #fff0c9 0%, rgba(255,240,201,0) 60%),
              var(--bg);
  color:var(--text);
}

a{color:var(--brown);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1100px;margin:0 auto;padding:18px}
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin:6px 0 14px;
}
.brand{
  display:flex;gap:12px;align-items:center;
}
.brand .mark{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(145deg, #f2d27a, #b8860b);
  box-shadow: 0 8px 20px rgba(184,134,11,.25);
}
.brand h1{margin:0;font-size:18px;letter-spacing:.2px}
.brand .sub{color:var(--muted);font-size:12px;margin-top:2px}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;
  border:1px solid var(--border);background:rgba(255,255,255,.7);
  backdrop-filter: blur(6px);
  color:var(--muted);font-size:12px;
}
.grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:16px;
}
@media (max-width: 900px){
  .grid{grid-template-columns:1fr}
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .pad{padding:16px}
.hr{height:1px;background:var(--border);margin:12px 0}
.hero{
  display:grid;grid-template-columns: 1fr;
}
.bookWrap{
  display:flex;gap:14px;align-items:flex-start;
}
.bookImg{
  width:100%;
  border-radius: 18px;
  border:1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  background:#fff;
}
.bookPh{
  width:100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 2px dashed #e6d7bf;
  display:flex;align-items:center;justify-content:center;
  color:#9a8b82;background: #fffaf0;
  font-weight:600;
}
.heroTitle{margin:0;font-size:22px}
.priceRow{
  display:flex;align-items:baseline;gap:10px;margin:10px 0 0;
  flex-wrap:wrap;
}
.price{
  font-size:30px;font-weight:800;color:var(--brown);
}
.unit{color:var(--muted);font-size:13px}
.note{
  border:1px solid #e8dcc7;
  border-left:4px solid #b8860b;
  background:#fffdf6;
  padding:10px 12px;border-radius:12px;
  margin-top:12px;color:#5d4f47;
}
.formRow{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 650px){.formRow{grid-template-columns:1fr}}
label{display:block;font-size:12px;color:var(--muted);margin:0 0 6px}
input[type="text"], input[type="tel"], input[type="number"], input[type="datetime-local"], select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  outline:none;
}
textarea{min-height:110px;resize:vertical}
input:focus, textarea:focus{border-color:#d8bf85;box-shadow:0 0 0 4px rgba(212,175,55,.18)}
.small{font-size:13px;color:var(--muted)}
.qtyPick{
  display:flex;gap:8px;flex-wrap:wrap;
}
.qtyBtn{
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;border-radius:999px;
  cursor:pointer;
  font-weight:600;color:#5a4a41;
}
.qtyBtn.active{border-color:#d8bf85;background:#fff7e1}
.summary{
  display:grid;gap:10px;
}
.sumLine{display:flex;justify-content:space-between;gap:10px}
.sumLine b{font-size:14px}
.sumTotal{
  padding:12px;border-radius:14px;
  background: linear-gradient(145deg, rgba(212,175,55,.22), rgba(184,134,11,.08));
  border:1px solid #ead6a8;
}
.sumTotal .grand{font-size:20px;font-weight:900;color:var(--brown)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  width:100%;
  padding:12px 14px;
  border-radius: 14px;
  border:1px solid #d8bf85;
  background: linear-gradient(145deg, #f2d27a, #b8860b);
  color:#2b1f16;
  font-weight:800;
  cursor:pointer;
}
.btn:disabled{
  opacity:.65;cursor:not-allowed;
}
.btn.secondary{
  background:#fff;border-color:var(--border);
  color:var(--brown);font-weight:700;
}
.inlineBtn{width:auto}
.bankBox{
  display:flex;gap:12px;align-items:flex-start;justify-content:space-between;
}
.qr{
  width:140px;height:auto;border-radius:12px;border:1px solid var(--border);background:#fff;
}
@media (max-width: 900px){
  .qr{width:120px}
}
.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;
  font-size:12px;font-weight:700;
  border:1px solid var(--border);
  background:#fff;
}
.badge-warn{background:#fff7e1;border-color:#ead6a8}
.badge-ok{background:#eaf8ef;border-color:#bfe6cb}
.badge-info{background:#eaf4ff;border-color:#c9def7}
.badge-muted{background:#f3f1ee;border-color:#e5ddd6;color:#7a6b63}
.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius: 14px;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
  font-size:13px;
}
.table th{background:#fffaf0;color:#6b5a51;font-size:12px;text-align:left}
.table tr:last-child td{border-bottom:none}
.footer{
  margin:18px 0 8px;color:var(--muted);font-size:12px;text-align:center;
}
.hiddenTrap{
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.err{
  background:#fff3f3;border:1px solid #f1c3c3;color:#7a2323;
  padding:10px 12px;border-radius:12px;margin-bottom:12px;
}
.ok{
  background:#eefaf1;border:1px solid #bfe6cb;color:#1e5a2b;
  padding:10px 12px;border-radius:12px;margin-bottom:12px;
}
.copyRow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.copyCode{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background:#fffaf0;border:1px solid var(--border);padding:8px 10px;border-radius:12px;
  font-weight:800;color:var(--brown);
}


/* Improve readability on mobile */
@media (max-width: 650px){
  body{font-size:17px;}
  .brand h1{font-size:19px;}
  .heroTitle{font-size:23px;}
  .price{font-size:32px;}
  .qtyBtn{padding:12px 14px;font-size:16px;}
  label{font-size:13px;}
  input[type="text"], input[type="tel"], input[type="number"], input[type="datetime-local"], select, textarea{
    font-size:16px; /* prevent iOS zoom + easier reading */
  }
  .btn{font-size:16px;padding:14px 14px;}
}

/* Bigger, nicer file input */
input[type="file"]{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  background:#fff;
  font-size:16px;
}
input[type="file"]::file-selector-button{
  margin-right:10px;
  border:1px solid #ead6a8;
  border-radius:12px;
  padding:10px 12px;
  background:#fff7e1;
  font-weight:800;
  color:var(--brown);
  cursor:pointer;
}
input[type="file"]::file-selector-button:hover{
  filter:brightness(.98);
}


/* QR placeholder */
.qrPh{
  width:140px;
  height:140px;
  border-radius:12px;
  border:2px dashed #e6d7bf;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#9a8b82;
  background:#fffaf0;
  padding:10px;
  font-weight:700;
  font-size:12px;
}
@media (max-width: 900px){
  .qrPh{width:120px;height:120px;}
}

.noticeBox{
  border:1px solid #e7d9b6;
  background:#fff9ea;
  border-left:4px solid #c9a24a;
  padding:12px 14px;
  border-radius:10px;
  margin:12px 0 14px;
}
.noticeTitle{
  font-weight:700;
  margin-bottom:4px;
}
.noticeBody{
  line-height:1.45;
}

