/* AZUI2 16/11/2026 - trang khach «Thiết kế hộp bánh» ; token rieng --az-* (khong khung AZDev), sang + toi, dien thoai truoc */
:root {
  --az-bg: #f6f5f2; --az-surface: #ffffff; --az-text: #1d1d1f; --az-text-muted: #5f6368; --az-border: #d9d6cf;
  --az-primary: #9a3412; --az-primary-text: #ffffff; --az-focus: #c2410c; --az-danger-text: #b42318; --az-success-text: #1e6b3a;
  --az-radius: 12px; --az-gap: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --az-bg: #141414; --az-surface: #1f1f1f; --az-text: #ececec; --az-text-muted: #a8a8a8; --az-border: #3a3a3a;
    --az-primary: #f08a4b; --az-primary-text: #1a0d05; --az-focus: #f6a26c; --az-danger-text: #ff8a80; --az-success-text: #7fd39b; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--az-bg); color: var(--az-text); }
body { padding-bottom: 84px; line-height: 1.5; }
.hb-top { display: flex; align-items: center; justify-content: space-between; gap: var(--az-gap); padding: 16px; max-width: 760px; margin: 0 auto; }
.hb-top h1 { font-size: 1.35rem; margin: 0; }
.hb-main { max-width: 760px; margin: 0 auto; padding: 0 16px 16px; display: grid; gap: var(--az-gap); }
.hb-card { background: var(--az-surface); border: 1px solid var(--az-border); border-radius: var(--az-radius); padding: 16px; min-width: 0; }
.hb-card h2 { font-size: 1.05rem; margin: 0 0 8px; }
.hb-note { color: var(--az-text-muted); margin: 0; }
.hb-err { color: var(--az-danger-text); margin: 8px 0 0; }
.hb-ok { color: var(--az-success-text); }
.hb-help { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--az-border); background: var(--az-surface); color: var(--az-text); font-weight: 700; font-size: 1rem; cursor: pointer; }
.hb-help-pop { max-width: 760px; margin: 0 auto 12px; padding: 0 16px; }
.hb-help-pop p { margin: 0; padding: 12px; border-radius: var(--az-radius); background: var(--az-surface); border: 1px solid var(--az-border); }
.hb-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.hb-tpl { display: block; border: 1px solid var(--az-border); border-radius: 10px; padding: 10px; cursor: pointer; }
.hb-tpl input { margin: 0 6px 0 0; }
.hb-tpl:has(input:checked) { border-color: var(--az-primary); box-shadow: 0 0 0 2px var(--az-primary) inset; }
.hb-tpl small { display: block; color: var(--az-text-muted); }
.hb-field { display: grid; gap: 4px; margin: 0 0 10px; min-width: 0; }
.hb-field > span { font-size: .9rem; color: var(--az-text-muted); }
.hb-field input[type=text], .hb-field input[type=number], .hb-row-in { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--az-border); border-radius: 8px; background: var(--az-bg); color: var(--az-text); font: inherit; }
.hb-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hb-colors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hb-colors label { display: grid; gap: 4px; font-size: .85rem; color: var(--az-text-muted); }
.hb-colors input[type=color] { width: 100%; height: 40px; border: 1px solid var(--az-border); border-radius: 8px; background: none; padding: 2px; }
.hb-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hb-logo img { max-height: 56px; max-width: 120px; border: 1px solid var(--az-border); border-radius: 6px; background: #fff; }
.hb-check { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.hb-rows { display: grid; gap: 8px; }
.hb-rowitem { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 6px; align-items: center; }
.hb-btn { font: inherit; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--az-border); background: var(--az-surface); color: var(--az-text); cursor: pointer; }
.hb-btn[disabled] { opacity: .55; cursor: default; }
.hb-primary { background: var(--az-primary); color: var(--az-primary-text); border-color: var(--az-primary); font-weight: 600; }
.hb-small { padding: 6px 10px; font-size: .9rem; }
.hb-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--az-surface); border-top: 1px solid var(--az-border); }
.hb-bar-status { flex: 1; min-width: 0; font-size: .9rem; color: var(--az-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hb-share input { flex: 1 1 200px; min-width: 0; }
.hb-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.hb-files figure { margin: 0; border: 1px solid var(--az-border); border-radius: 10px; overflow: hidden; background: var(--az-bg); }
.hb-files img { display: block; width: 100%; height: auto; }
.hb-files figcaption { font-size: .8rem; padding: 6px 8px; color: var(--az-text-muted); overflow-wrap: anywhere; }
.hb-dl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hb-dl a { text-decoration: none; }
:focus-visible { outline: 3px solid var(--az-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
