/* hk.css · HotelKit shared styles · version 1.1.0 · phone first */
:root {
  --brand: #1F6F6B; --brand-ink: #fff; --accent: #C99A3B;
  --bg: #F6F4EF; --card: #fff; --ink: #1D2321; --muted: #6B7470; --line: #E4E0D8;
  --ok: #2E7D4F; --warn: #B7791F; --bad: #B83A3A; --info: #2F6690;
  --radius: 14px; --tabbar: 64px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body { font-size: 16px; line-height: 1.45; padding-bottom: calc(var(--tabbar) + 28px); }
body.no-tabbar { padding-bottom: 40px; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
[hidden] { display: none !important; }

/* ---------- top */
.test-banner { position: sticky; top: 0; z-index: 30; background: repeating-linear-gradient(45deg, #F2C94C, #F2C94C 12px, #F5D46B 12px, #F5D46B 24px);
  color: #3B2F00; text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .06em; padding: 6px 10px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; max-width: 980px; margin: 0 auto; }
.topbar .logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; box-shadow: var(--shadow); flex: none; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar .biz { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar h1 { font-size: 21px; margin: 0; line-height: 1.2; }
.wrap { max-width: 980px; margin: 0 auto; padding: 8px 16px 16px; }
.narrow { max-width: 440px; margin: 0 auto; }

/* ---------- cards and lists */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
.card h2 { font-size: 17px; margin: 0 0 8px; }
.card h3 { font-size: 15px; margin: 14px 0 6px; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.item { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  border: 0; width: 100%; text-align: left; cursor: pointer; min-height: 56px; }
.item:active { transform: scale(.995); }
.item .t { font-weight: 700; }
.item .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.off { opacity: .55; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 6px; }

/* ---------- pills, badges */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #EEE; color: #444; white-space: nowrap; }
.pill.ok { background: #E3F2E8; color: var(--ok); } .pill.warn { background: #FBF0DC; color: #8A5A00; }
.pill.bad { background: #F8E1E1; color: var(--bad); } .pill.info { background: #E2ECF5; color: var(--info); }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; min-height: 48px;
  font-weight: 800; cursor: pointer; background: var(--brand); color: var(--brand-ink); text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.soft { background: #ECEAE4; color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .ic { width: 20px; height: 20px; }
.linkbtn { background: none; border: 0; color: var(--brand); font-weight: 700; padding: 10px; cursor: pointer; min-height: 44px; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

/* ---------- forms */
.field { margin: 12px 0; }
.field > label, .field > .label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; min-height: 48px; font-size: 16px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.input[readonly] { background: #F3F1EC; color: var(--muted); }
textarea.input { min-height: 90px; resize: vertical; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-wrap button { position: absolute; right: 6px; top: 6px; height: 36px; border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; min-height: 40px; font-weight: 700; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip .n { margin-left: 6px; font-size: 12px; opacity: .8; }
.picker { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; min-height: 48px; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.picker .ph { color: var(--muted); }
.toggle, .field > label.toggle { display: flex; margin-bottom: 0; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
.toggle input { display: none; }
.toggle .sw { display: block; width: 52px; height: 30px; border-radius: 999px; background: #CFCAC0; position: relative; flex: none; transition: background .15s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle input:checked + .sw { background: var(--brand); }
.toggle input:checked + .sw::after { left: 25px; }
.seg { display: flex; background: #ECEAE4; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 10px 8px; font-weight: 800; cursor: pointer; min-height: 42px; font-size: 14px; }
.seg button.on { background: #fff; box-shadow: var(--shadow); color: var(--brand); }
.search { position: relative; }
.search .input { padding-left: 42px; }
.search .ic { position: absolute; left: 13px; top: 14px; width: 20px; height: 20px; color: var(--muted); }
.msg { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 14.5px; }
.msg.bad { background: #F8E1E1; color: #7A1F1F; } .msg.ok { background: #E3F2E8; color: #1E5434; }
.msg.info { background: #E2ECF5; color: #1D4466; } .msg.warn { background: #FBF0DC; color: #6B4600; }
.code-big { font-size: 40px; font-weight: 800; letter-spacing: .18em; text-align: center; padding: 14px; background: #F3F1EC; border-radius: 12px; font-variant-numeric: tabular-nums; user-select: all; }

/* ---------- tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 14px; min-height: 124px; display: flex; flex-direction: column;
  gap: 8px; text-decoration: none; color: inherit; border: 0; text-align: left; cursor: pointer; }
.tile .ico { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.tile .ico svg { width: 24px; height: 24px; }
.tile .t { font-weight: 800; font-size: 15.5px; line-height: 1.2; }
.tile .d { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tile .badge { position: absolute; top: 12px; right: 12px; }

/* ---------- tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar); background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 25;
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px;
  font-weight: 700; color: var(--muted); cursor: pointer; position: relative; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--brand); }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }
@media (min-width: 900px) {
  .tabbar { top: 0; bottom: auto; left: 0; width: 92px; height: 100vh; flex-direction: column; justify-content: flex-start; padding-top: 80px; border-top: 0; border-right: 1px solid var(--line); }
  .tabbar button { flex: none; height: 72px; }
  body.has-side { padding-left: 92px; padding-bottom: 40px; }
}

/* ---------- sheet (slides up from the bottom) */
.sheet-bg { position: fixed; inset: 0; background: rgba(20,24,22,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 8px 16px 24px;
  animation: up .18s ease-out; }
@media (min-width: 720px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; max-height: 86vh; } }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #CFCAC0; margin: 4px auto 10px; }
.sheet .head { display: flex; align-items: center; gap: 8px; position: sticky; top: -8px; background: var(--bg); padding: 6px 0 8px; z-index: 2; }
.sheet .head h2 { flex: 1; margin: 0; font-size: 19px; }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #ECEAE4; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.iconbtn svg { width: 22px; height: 22px; }

/* ---------- toast, version, misc */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 22px); background: #1D2321; color: #fff; padding: 12px 18px;
  border-radius: 12px; z-index: 60; max-width: 92vw; font-weight: 700; box-shadow: var(--shadow); font-size: 14.5px; }
.toast.bad { background: var(--bad); }
.version { position: fixed; right: 8px; bottom: calc(var(--tabbar) + 4px); font-size: 10.5px; color: #9AA19D; z-index: 20; pointer-events: none;
  background: rgba(246,244,239,.85); padding: 1px 6px; border-radius: 6px; }
body.no-tabbar .version { bottom: 6px; }
@media (min-width: 900px) { body.has-side .version { bottom: 6px; } }
.spinner { width: 28px; height: 28px; border: 3px solid #DDD7CC; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.logline { font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.logline:last-child { border-bottom: 0; }
.logline .when { color: var(--muted); font-size: 12px; }
pre.json { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: #F3F1EC; border-radius: 8px; padding: 8px; margin: 6px 0 0; }
.hero { text-align: center; padding: 26px 0 6px; }
.hero img { width: 76px; height: 76px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); object-fit: contain; }
.hero h1 { font-size: 24px; margin: 12px 0 2px; }
.ic { width: 20px; height: 20px; flex: none; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th, table.grid td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.grid th { color: var(--muted); font-weight: 700; }

/* ---------- photos, steppers (1.1) */
.photos { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #ECEAE4; display: block; box-shadow: var(--shadow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .pdf { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); }
.thumb button { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20,24,22,.75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .input { min-width: 0; flex: 1; }
.stepper .iconbtn { font-size: 24px; font-weight: 800; }
.big-num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kv2 { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.cols2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 720px) { .cols2 { grid-template-columns: 1fr 1fr; } }
