/* ===== Housey · base styles =================================================
   Layout + components. All visual properties are CSS variables (--hsy-*),
   themed per artboard. See themes.css for the three palettes.
========================================================================== */

.hsy-app {
  --hsy-pad: 28px;
  --hsy-side-w: 260px;
  --hsy-r-sm: 6px;
  --hsy-r:    10px;
  --hsy-r-lg: 16px;

  font-family: var(--hsy-font-body, 'Plus Jakarta Sans', system-ui, sans-serif);
  color: var(--hsy-ink);
  background: var(--hsy-bg);
  display: flex;
  height: 100%;
  width: 100%;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.hsy-app.density-compact { font-size: 13px; }
.hsy-app *,
.hsy-app *::before,
.hsy-app *::after { box-sizing: border-box; }

/* Modals get portalled to <body>, escaping `.hsy-app *`. Re-apply box-sizing
   so 100%-width inputs don't overflow their parent by padding+border. */
[data-modal] *,
[data-modal] *::before,
[data-modal] *::after { box-sizing: border-box; }

.hsy-mono   { font-family: var(--hsy-font-mono, 'JetBrains Mono', ui-monospace, monospace); font-feature-settings: 'tnum'; }
.hsy-muted  { color: var(--hsy-muted); }

/* ── Sidebar ────────────────────────────────────────────────────────── */
.hsy-sidebar {
  width: var(--hsy-side-w);
  flex: 0 0 auto;
  background: var(--hsy-side-bg);
  border-right: 1px solid var(--hsy-line);
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.hsy-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 18px;
}
.hsy-brand-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hsy-accent);
  color: var(--hsy-on-accent);
  border-radius: var(--hsy-r-sm);
}
.hsy-brand-mark svg { display: block; }
.hsy-brand-settings {
  margin-left: auto;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--hsy-muted);
  border-radius: var(--hsy-r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.hsy-brand-settings:hover { color: var(--hsy-ink); background: var(--hsy-soft, rgba(255,255,255,0.04)); }
.hsy-brand-settings.is-on { color: var(--hsy-ink); border-color: var(--hsy-line); background: var(--hsy-soft, rgba(255,255,255,0.04)); }
.hsy-brand-name {
  font-family: var(--hsy-font-display, inherit);
  font-size: 22px;
  font-weight: var(--hsy-brand-w, 600);
  letter-spacing: var(--hsy-brand-tracking, -0.01em);
}

.hsy-side-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--hsy-muted);
  padding: 14px 10px 6px;
}
.hsy-side-section-label--with-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hsy-side-add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hsy-muted);
  border-radius: var(--hsy-r-sm, 6px);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.hsy-side-add:hover { background: var(--hsy-hover); color: var(--hsy-ink); }

.hsy-houses { display: flex; flex-direction: column; gap: 2px; }
.hsy-house-pill {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: var(--hsy-r);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background .12s;
}
.hsy-house-pill:hover { background: var(--hsy-hover); }
.hsy-house-pill.is-on { background: var(--hsy-active); }
.hsy-house-swatch {
  width: 28px; height: 28px;
  border-radius: var(--hsy-r-sm);
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,0.08);
}
.hsy-house-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hsy-house-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsy-house-sub  { font-size: 11px; color: var(--hsy-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsy-house-add { color: var(--hsy-muted); font-size: 13px; font-weight: 500; }
.hsy-house-add:hover { color: var(--hsy-ink); }

.hsy-archive {
  margin-top: 8px;
  border-top: 1px dashed var(--hsy-line);
  padding-top: 8px;
}
.hsy-archive-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--hsy-muted);
  cursor: pointer;
  border-radius: var(--hsy-r);
  list-style: none;
}
.hsy-archive-summary::-webkit-details-marker { display: none; }
.hsy-archive-summary:hover { background: var(--hsy-hover); color: var(--hsy-ink); }
.hsy-archive-count {
  font-size: 11px;
  padding: 1px 7px;
  background: var(--hsy-bar-bg);
  border-radius: 999px;
}
.hsy-house-archived { opacity: 0.65; }
.hsy-house-archived:hover { opacity: 1; }
.hsy-house-archived .hsy-row-act { margin-left: auto; opacity: 1; }

.hsy-nav { display: flex; flex-direction: column; gap: 2px; }
.hsy-nav-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: 0; background: transparent;
  border-radius: var(--hsy-r);
  cursor: pointer; color: var(--hsy-muted);
  font: inherit; text-align: left;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.hsy-nav-btn:hover { background: var(--hsy-hover); color: var(--hsy-ink); }
.hsy-nav-btn.is-on { background: var(--hsy-active); color: var(--hsy-ink); }

/* Collapsible nav group (e.g. Maintenance) */
.hsy-nav-group { width: 100%; }
.hsy-nav-summary { list-style: none; }
.hsy-nav-summary::-webkit-details-marker { display: none; }
.hsy-nav-caret { display: flex; transition: transform .15s; }
.hsy-nav-group[open] > .hsy-nav-summary .hsy-nav-caret { transform: rotate(180deg); }
.hsy-nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 2px 14px;
  padding-left: 10px; border-left: 1px solid var(--hsy-line); }
.hsy-nav-sub .hsy-nav-btn { padding: 7px 10px; font-size: 13px; }
.hsy-nav-ico { display: flex; }
.hsy-nav-label { flex: 1; }
.hsy-nav-count {
  font-family: var(--hsy-font-mono);
  font-size: 11px;
  padding: 2px 7px;
  background: var(--hsy-accent-soft);
  color: var(--hsy-accent-ink);
  border-radius: 999px;
}
.hsy-nav-count--alert {
  background: oklch(0.62 0.18 25);
  color: #fff;
}

.hsy-side-foot {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid var(--hsy-line);
}
.hsy-foot-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

/* ── Main column ────────────────────────────────────────────────────── */
.hsy-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--hsy-bg);
}
.hsy-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--hsy-pad);
  border-bottom: 1px solid var(--hsy-line);
  gap: 16px;
}
.hsy-crumbs {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px;
  color: var(--hsy-muted);
}
.hsy-crumb-sep { opacity: 0.5; }
.hsy-crumb-current {
  font-family: var(--hsy-font-display, inherit);
  font-size: 20px;
  color: var(--hsy-ink);
  font-weight: var(--hsy-h-w, 600);
  letter-spacing: var(--hsy-h-tracking, -0.01em);
}
.hsy-top-meta { display: flex; align-items: center; gap: 12px; }
.hsy-pillars { display: flex; gap: 6px; }
.hsy-pill {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--hsy-accent-soft);
  color: var(--hsy-accent-ink);
  border-radius: 999px;
  font-weight: 500;
}

.hsy-content {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: var(--hsy-pad);
}

/* ── Screen scaffolding ─────────────────────────────────────────────── */
.hsy-screen { display: flex; flex-direction: column; gap: 22px; }
.hsy-screen-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px;
}
.hsy-eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--hsy-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.hsy-h1 {
  font-family: var(--hsy-font-display, inherit);
  font-size: 36px;
  font-weight: var(--hsy-h-w, 600);
  letter-spacing: var(--hsy-h-tracking, -0.02em);
  margin: 0;
  line-height: 1.05;
}
.hsy-h2 {
  font-family: var(--hsy-font-display, inherit);
  font-size: 26px;
  font-weight: var(--hsy-h-w, 600);
  letter-spacing: var(--hsy-h-tracking, -0.015em);
  margin: 0;
  line-height: 1.1;
}
.hsy-h3 {
  font-family: var(--hsy-font-display, inherit);
  font-size: 18px;
  font-weight: var(--hsy-h-w, 600);
  margin: 0;
  letter-spacing: var(--hsy-h-tracking, -0.005em);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.hsy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: var(--hsy-r);
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  color: var(--hsy-ink);
  font: inherit; font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.hsy-btn:hover { background: var(--hsy-hover); }
.hsy-btn:active { transform: translateY(1px); }
.hsy-btn-primary {
  background: var(--hsy-accent);
  color: var(--hsy-on-accent);
  border-color: var(--hsy-accent);
  box-shadow: 0 2px 8px rgba(194, 94, 58, 0.32);
}
.hsy-btn-primary:hover { background: var(--hsy-accent-hover); border-color: var(--hsy-accent-hover); }
.hsy-btn-ghost {
  background: var(--hsy-surface);
  color: var(--hsy-ink);
  border-color: var(--hsy-line);
}
.hsy-btn-ghost:hover {
  background: var(--hsy-hover);
  border-color: var(--hsy-line-strong);
}
.hsy-btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: var(--hsy-r);
  border: 1px solid var(--hsy-warn);
  background: var(--hsy-warn);
  color: #fff;
  font: inherit; font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.hsy-btn-danger:hover {
  background: oklch(0.55 0.18 30);
  color: #fff;
  border-color: oklch(0.55 0.18 30);
}
.hsy-btn-danger:active { transform: translateY(1px); }
/* Ghost-delete / text button: tertiary text-only "Delete X" used on the LEFT
   of modal footers. .hsy-btn-text is the spec name; .hsy-btn-ghost-delete is
   retained as an alias for existing templates. */
.hsy-btn-ghost-delete,
.hsy-btn-text {
  background: transparent;
  color: var(--hsy-warn);
  border-color: transparent;
  padding: 9px 10px;
}
.hsy-btn-ghost-delete:hover,
.hsy-btn-text:hover {
  background: rgba(216, 99, 58, 0.08);
  color: var(--hsy-warn);
  border-color: transparent;
}

/* Buttons sitting on top of a photo need a backdrop for legibility */
.hsy-detail-head .hsy-btn-ghost,
.hsy-card-actions .hsy-btn-ghost {
  background: rgba(255,255,255,0.92);
  color: var(--hsy-ink);
  border-color: rgba(255,255,255,0.92);
}
.hsy-detail-head .hsy-btn-ghost:hover,
.hsy-card-actions .hsy-btn-ghost:hover { background: #fff; }
.hsy-detail-head .hsy-btn-danger,
.hsy-card-actions .hsy-btn-danger {
  background: rgba(255,255,255,0.92);
  color: var(--hsy-warn);
  border-color: rgba(255,255,255,0.92);
}
.hsy-detail-head .hsy-btn-danger:hover,
.hsy-card-actions .hsy-btn-danger:hover {
  background: var(--hsy-warn);
  color: #fff;
  border-color: var(--hsy-warn);
}

.hsy-btn-icon {
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
}

.hsy-detail-actions {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; gap: 8px;
  z-index: 2;
}

.hsy-card-actions {
  position: absolute;
  top: 8px; right: 8px;
  display: flex; gap: 6px;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s;
}
.hsy-room-card:hover .hsy-card-actions,
.hsy-room-card:focus-within .hsy-card-actions { opacity: 1; }

/* Inline row actions (items, shopping, tasks) */
.hsy-row-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  opacity: 0;
  transition: opacity .12s;
}
.hsy-item-actionable:hover .hsy-row-actions,
.hsy-shop-row-actionable:hover .hsy-row-actions,
.hsy-task-actionable:hover .hsy-row-actions,
.hsy-side-card:hover .hsy-row-actions { opacity: 1; }
.hsy-row-act {
  width: 22px; height: 22px;
  border-radius: 4px;
  border: 1px solid var(--hsy-line);
  background: transparent;
  color: var(--hsy-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid; place-items: center;
  transition: background .12s, color .12s, border-color .12s;
}
.hsy-row-act:hover {
  background: var(--hsy-hover);
  color: var(--hsy-ink);
  border-color: var(--hsy-line-strong);
}
.hsy-row-act-danger:hover {
  background: var(--hsy-warn);
  color: #fff;
  border-color: var(--hsy-warn);
}

/* extend item grid to include actions column */
.hsy-item.hsy-item-actionable {
  grid-template-columns: 24px 1fr auto auto auto;
}
.hsy-shop-row.hsy-shop-row-actionable {
  grid-template-columns: 36px minmax(0,1fr) 56px 78px 60px 80px 86px 108px;
}
.hsy-task.hsy-task-actionable { position: relative; padding-right: 90px; padding-bottom: 28px; }
.hsy-task-actions {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 3;
}
.hsy-task-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.5;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}
.hsy-task-badge svg { flex: 0 0 auto; }
.hsy-task-badge-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hsy-task-badge--room {
  top: 8px; right: 8px;
  background: var(--hsy-accent-soft);
  color: var(--hsy-accent-ink);
  transition: opacity .12s;
}
.hsy-task-badge--assignee {
  bottom: 8px; right: 8px;
  background: var(--hsy-bar-bg);
  color: var(--hsy-muted);
  border: 1px solid var(--hsy-line);
}
.hsy-task-actionable:hover .hsy-task-badge--room { opacity: 0; }
.hsy-task-desc {
  font-size: 12px;
  color: var(--hsy-muted);
  margin-top: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hsy-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 6px;
  border: 0; background: transparent;
  border-radius: var(--hsy-r);
  cursor: pointer; font: inherit;
  color: var(--hsy-muted);
  align-self: flex-start;
  transition: background .12s, color .12s;
}
.hsy-back:hover { background: var(--hsy-hover); color: var(--hsy-ink); }

/* ── Stat row ───────────────────────────────────────────────────────── */
.hsy-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.hsy-stat {
  background: var(--hsy-surface);
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.hsy-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hsy-muted);
  font-weight: 600;
}
.hsy-stat-value {
  font-family: var(--hsy-font-display, inherit);
  font-size: 30px;
  font-weight: var(--hsy-h-w, 600);
  letter-spacing: var(--hsy-h-tracking, -0.015em);
  line-height: 1;
}
.hsy-stat-sub {
  font-size: 12px;
  color: var(--hsy-muted);
  margin-bottom: 6px;
}
.hsy-stat-sub[data-tone="warn"] { color: var(--hsy-warn); }
.hsy-stat-sub[data-tone="good"] { color: var(--hsy-good); }

/* ── Progress bar ───────────────────────────────────────────────────── */
.hsy-bar {
  width: 100%;
  height: 6px;
  background: var(--hsy-bar-bg);
  border-radius: 999px;
  overflow: hidden;
}
.hsy-bar-fill {
  height: 100%;
  background: var(--hsy-accent);
  border-radius: 999px;
  transition: width .3s cubic-bezier(.2,.7,.3,1);
}
.hsy-bar[data-tone="warn"] .hsy-bar-fill { background: var(--hsy-warn); }
.hsy-bar[data-tone="good"] .hsy-bar-fill { background: var(--hsy-good); }

/* ── Rooms grid ─────────────────────────────────────────────────────── */
.hsy-rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.hsy-room-card {
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  border-radius: var(--hsy-r-lg);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .12s;
}
.hsy-room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hsy-shadow-hover);
  border-color: var(--hsy-line-strong);
}
.hsy-room-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.hsy-room-meta {
  display: flex; align-items: center; justify-content: space-between;
}
.hsy-room-pct {
  font-family: var(--hsy-font-mono);
  font-size: 12px;
  color: var(--hsy-muted);
  font-weight: 600;
}
.hsy-room-name {
  font-family: var(--hsy-font-display, inherit);
  font-size: 19px;
  font-weight: var(--hsy-h-w, 600);
  letter-spacing: var(--hsy-h-tracking, -0.005em);
  line-height: 1.1;
}
.hsy-room-foot {
  display: flex; justify-content: space-between;
  font-size: 12px;
  color: var(--hsy-muted);
  margin-top: 2px;
}
.hsy-room-card-add {
  border-style: dashed;
  background: transparent;
  display: grid; place-items: center;
  min-height: 200px;
  color: var(--hsy-muted);
}
.hsy-room-card-add:hover { color: var(--hsy-ink); border-color: var(--hsy-line-strong); }
.hsy-add-inner { display: flex; align-items: center; gap: 6px; font-weight: 500; }

/* ── Tags ───────────────────────────────────────────────────────────── */
.hsy-tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--hsy-accent-soft);
  color: var(--hsy-accent-ink);
}
.hsy-tag-quiet {
  background: transparent;
  border: 1px solid var(--hsy-line);
  color: var(--hsy-muted);
}
.hsy-tag-on-photo {
  background: rgba(255,255,255,0.92);
  color: var(--hsy-accent-ink);
}

/* ── Photo placeholder ──────────────────────────────────────────────── */
.hsy-photo {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #ddd;
}
.hsy-photo-stripe {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.07) 0 14px,
    rgba(0,0,0,0.04) 14px 28px
  );
  mix-blend-mode: overlay;
}
.hsy-photo-label {
  position: absolute;
  bottom: 8px; left: 10px;
  font-family: var(--hsy-font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.28);
  padding: 3px 7px;
  border-radius: 4px;
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}

/* ── Room detail ────────────────────────────────────────────────────── */
.hsy-detail-head {
  position: relative;
  border-radius: var(--hsy-r-lg);
  overflow: hidden;
}
.hsy-detail-overlay {
  position: absolute;
  inset: auto 24px 24px 24px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
  display: flex; flex-direction: column; gap: 6px;
}
.hsy-detail-overlay .hsy-h1 { color: #fff; }
.hsy-detail-stats {
  display: flex; gap: 6px; align-items: baseline;
  font-size: 13px;
  opacity: 0.95;
}

.hsy-detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.hsy-detail-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hsy-detail-tasks { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.hsy-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}

.hsy-add-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--hsy-surface);
  border: 1px dashed var(--hsy-line);
  border-radius: var(--hsy-r);
  color: var(--hsy-muted);
}
.hsy-add-input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--hsy-ink);
  outline: none;
}
.hsy-add-input::placeholder { color: var(--hsy-muted); }

.hsy-cat-block {
  background: var(--hsy-surface);
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r-lg);
  padding: 6px 12px;
}
.hsy-cat-head {
  display: flex; justify-content: space-between;
  padding: 10px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--hsy-muted);
  border-bottom: 1px solid var(--hsy-line);
}

.hsy-item {
  display: grid;
  grid-template-columns: 24px 1fr minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--hsy-line);
  cursor: pointer;
  transition: opacity .15s;
}
.hsy-item-name-btn:hover { color: var(--hsy-accent); }
.hsy-item-url a { color: var(--hsy-muted); }
.hsy-item-url a:hover { color: var(--hsy-accent); }
.hsy-item:last-child { border-bottom: 0; }
.hsy-item.is-done { color: var(--hsy-muted); }
.hsy-item.is-done .hsy-item-name { text-decoration: line-through; }
.hsy-item-name { font-size: 14px; }
.hsy-item-qty { font-size: 12px; color: var(--hsy-muted); }
.hsy-item-price { font-size: 13px; font-weight: 600; }

.hsy-check {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--hsy-line-strong);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  color: var(--hsy-on-accent);
}
.hsy-item.is-done .hsy-check,
.hsy-shop-row.is-done .hsy-check {
  background: var(--hsy-accent);
  border-color: var(--hsy-accent);
}

/* ── Side cards ─────────────────────────────────────────────────────── */
.hsy-side-card {
  background: var(--hsy-surface);
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.hsy-side-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--hsy-muted);
  margin-bottom: 8px;
}
.hsy-side-body { font-size: 13px; line-height: 1.5; }
.hsy-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.hsy-ref-add {
  background: transparent;
  border: 1px dashed var(--hsy-line);
  border-radius: var(--hsy-r);
  cursor: pointer;
  color: var(--hsy-muted);
  display: grid; place-items: center;
  aspect-ratio: 1/1;
}
.hsy-ref-add:hover { color: var(--hsy-ink); border-color: var(--hsy-line-strong); }

/* ── Tasks board ────────────────────────────────────────────────────── */
.hsy-task-add {
  display: flex; gap: 8px;
  align-items: stretch;
}
.hsy-task-add .hsy-add-input {
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  border-radius: var(--hsy-r);
  padding: 8px 12px;
  width: 280px;
}
.hsy-select {
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  border-radius: var(--hsy-r);
  padding: 0 12px;
  font: inherit;
  color: inherit;
  outline: none;
  cursor: pointer;
}

.hsy-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}
.hsy-col {
  background: var(--hsy-col-bg);
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r-lg);
  padding: 12px;
  min-height: 320px;
  display: flex; flex-direction: column;
  gap: 10px;
  transition: background .12s, border-color .12s;
}
.hsy-col.is-over {
  border-color: var(--hsy-accent);
  background: var(--hsy-accent-soft);
}
.hsy-col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 4px 8px;
  border-bottom: 1px dashed var(--hsy-line);
}
.hsy-col-dot { width: 9px; height: 9px; border-radius: 50%; }
.hsy-col-dot-todo  { background: var(--hsy-muted); }
.hsy-col-dot-doing { background: var(--hsy-accent); }
.hsy-col-dot-done  { background: var(--hsy-good); }
.hsy-col-label { font-weight: 600; font-size: 13px; flex: 1; }
.hsy-col-count { font-size: 12px; color: var(--hsy-muted); }
.hsy-col-body { display: flex; flex-direction: column; gap: 8px; }
.hsy-col-empty {
  padding: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--hsy-muted);
  border: 1px dashed var(--hsy-line);
  border-radius: var(--hsy-r);
}

.hsy-task {
  display: flex; gap: 8px;
  align-items: center;
  padding: 10px 10px 10px 6px;
  background: var(--hsy-surface);
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r);
  cursor: grab;
  user-select: none;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.hsy-task:hover {
  border-color: var(--hsy-line-strong);
  box-shadow: var(--hsy-shadow-hover);
}
.hsy-task:active { cursor: grabbing; }
.hsy-task.is-dragging { opacity: 0.55; }
.sortable-fallback {
  transition: none !important;
  pointer-events: none !important;
  opacity: 0.9 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.sortable-fallback, .sortable-fallback * { transition: none !important; animation: none !important; }
.hsy-task-grip {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  color: var(--hsy-muted);
  opacity: 0.4;
}
.hsy-task-body { padding-left: 22px; }
.hsy-task-actionable .hsy-task-body { transform: translateY(9px); }
.hsy-task:hover .hsy-task-grip { opacity: 0.8; }
.hsy-task-body { flex: 1; min-width: 0; }
.hsy-task-title { font-weight: 500; font-size: 14px; line-height: 1.3; }
.hsy-task-actionable .hsy-task-title { cursor: pointer; display: inline; }

/* ── Shopping list ──────────────────────────────────────────────────── */
.hsy-seg {
  display: flex;
  background: var(--hsy-surface);
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r);
  padding: 3px;
  gap: 2px;
}
.hsy-seg-btn {
  border: 0; background: transparent;
  padding: 6px 12px;
  border-radius: calc(var(--hsy-r) - 4px);
  font: inherit; font-weight: 500;
  cursor: pointer;
  color: var(--hsy-muted);
  font-size: 13px;
  transition: background .12s, color .12s;
}
.hsy-seg-btn:hover { color: var(--hsy-ink); }
.hsy-seg-btn.is-on {
  background: var(--hsy-active);
  color: var(--hsy-ink);
}

.hsy-shop-block {
  background: var(--hsy-surface);
  border: 1px solid #efe6d9;
  border-radius: 18px;
  overflow-x: auto;
}
/* Inner track keeps the grid columns from collapsing; block scrolls it. */
.hsy-shop-table { min-width: 860px; }
.hsy-shop-cat-head { padding: 12px 20px; }
.hsy-shop-row {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 56px 78px 60px 80px 86px 108px;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #f3ece0;
}
.hsy-shop-row-actionable:hover { background: #fbf6ef; }
.hsy-pack-row {
  display: grid;
  grid-template-columns: 24px 1fr 50px 60px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hsy-line);
  cursor: pointer;
}
.hsy-pack-row:last-child { border-bottom: 0; }
.hsy-pack-row.is-done { color: var(--hsy-muted); }
.hsy-pack-row.is-done .hsy-pack-name > div:first-child { text-decoration: line-through; }
.hsy-pack-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hsy-pack-name > div { font-size: 14px; }
.hsy-pack-qty { text-align: right; font-size: 13px; }
.hsy-pack-actions { display: inline-flex; justify-content: flex-end; gap: 4px; }
.hsy-pack-row:hover .hsy-row-actions, .hsy-pack-row:hover .hsy-pack-actions { opacity: 1; }
.hsy-pack-actions { opacity: 0.5; transition: opacity .15s; }
.hsy-shop-head-row {
  padding: 13px 20px;
  border-bottom: 1px solid #efe6d9;
}
.hsy-shop-col-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #a0917c;
  font-weight: 600;
}
.hsy-shop-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.hsy-shop-select,
.hsy-shop-select-all {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1px solid var(--hsy-line-strong);
  background: var(--hsy-surface);
  cursor: pointer;
  margin: 0;
  display: inline-grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.hsy-shop-select:checked,
.hsy-shop-select-all:checked,
.hsy-shop-select-all:indeterminate {
  background: var(--hsy-accent);
  border-color: var(--hsy-accent);
}
.hsy-shop-select:checked::after,
.hsy-shop-select-all:checked::after {
  content: "✓";
  color: var(--hsy-on-accent, #fff);
  font-size: 13px; font-weight: 700; line-height: 1;
}
.hsy-shop-select-all:indeterminate::after {
  content: "–";
  color: var(--hsy-on-accent, #fff);
  font-size: 14px; font-weight: 700; line-height: 1;
}
.hsy-row-act-text {
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  color: #5a4f42;
  font-size: 13px; font-weight: 600;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.hsy-row-act-text:hover {
  background: #fbf6ef;
  color: var(--hsy-ink);
  border-color: var(--hsy-line-strong);
}
.hsy-row-act-text svg { color: #a0917c; }
.hsy-menu { position: relative; display: inline-block; }
.hsy-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hsy-menu-trigger svg { opacity: 0.7; transition: transform .12s; }
.hsy-menu.is-open .hsy-menu-trigger svg { transform: rotate(180deg); }
.hsy-menu-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 150px;
  padding: 4px;
  background: var(--hsy-surface);
  border: 1px solid var(--hsy-line-strong);
  border-radius: var(--hsy-r-md, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hsy-menu-list[hidden] { display: none; }
.hsy-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--hsy-ink);
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.hsy-menu-item:hover { background: var(--hsy-hover); }
.hsy-menu-item-danger { color: var(--hsy-danger, #e5484d); }
.hsy-menu-item-danger:hover { background: rgba(229, 72, 77, 0.12); color: var(--hsy-danger, #e5484d); }
.hsy-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid var(--hsy-line-strong);
  border-radius: var(--hsy-r-md, 8px);
  background: var(--hsy-surface);
}
.hsy-bulk-bar[hidden] { display: none; }
.hsy-bulk-count { font-size: 13px; color: var(--hsy-muted); }
.hsy-btn--sm { padding: 5px 12px; font-size: 13px; }
.hsy-shop-link, .hsy-shop-notes { display: inline-flex; align-items: center; justify-content: center; min-width: 0; }
.hsy-shop-link-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  color: #7a6f60;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.hsy-shop-link-btn:hover {
  background: #fbf6ef;
  color: var(--hsy-accent);
  border-color: var(--hsy-line-strong);
}
.hsy-shop-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsy-shop-url a { font-size: 12px; color: var(--hsy-muted); text-decoration: underline; }
.hsy-shop-url a:hover { color: var(--hsy-accent); }
.hsy-shop-link-preview {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none !important;
  max-width: 100%; min-width: 0;
}
.hsy-shop-link-thumb {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 4px; overflow: hidden;
  background: var(--hsy-line);
  display: inline-flex; align-items: center; justify-content: center;
}
.hsy-shop-link-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hsy-shop-link-text {
  font-size: 12px; color: var(--hsy-muted);
  text-decoration: underline;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.hsy-shop-link-preview:hover .hsy-shop-link-text { color: var(--hsy-accent); }
.hsy-shop-name-btn {
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
}
.hsy-shop-name-btn:hover { color: var(--hsy-accent); }
.hsy-shop-row:last-child { border-bottom: 0; }
.hsy-shop-row.is-done { color: var(--hsy-muted); }
.hsy-shop-row.is-done .hsy-shop-name-text > div:first-child { text-decoration: line-through; }
.hsy-shop-name { display: flex; flex-direction: row; align-items: center; gap: 14px; min-width: 0; }
.hsy-shop-name-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 0 0 auto; }
.hsy-shop-thumbs { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; }
.hsy-shop-name > div { font-size: 14.5px; font-weight: 600; }
.hsy-shop-row-actionable .hsy-shop-name > div:first-child { cursor: pointer; }
.hsy-shop-room {
  border: 0; background: transparent;
  font: inherit; font-size: 11px;
  color: var(--hsy-muted);
  cursor: pointer; padding: 0;
  text-align: left;
}
.hsy-shop-room:hover { color: var(--hsy-accent); }
.hsy-shop-room-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 999px;
  line-height: 1.5;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  background: #eef3ec;
  color: var(--hsy-good);
  transition: filter .12s;
}
.hsy-shop-room-badge svg { flex: 0 0 auto; }
.hsy-shop-room-badge-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hsy-shop-room-badge:hover { filter: brightness(0.96); }
.hsy-shop-row.is-done .hsy-shop-room-badge,
.hsy-shop-row.is-done .hsy-shop-room-tag,
.hsy-shop-row.is-done .hsy-shop-owner-chip { opacity: 0.6; }
.hsy-shop-room-badge.is-empty {
  background: var(--hsy-bar-bg);
  color: var(--hsy-muted);
  border: 1px solid var(--hsy-line);
  font-weight: 500;
}

/* metadata row under item name: room (place) + owner (person), side by side */
.hsy-shop-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }

/* ROOM — outlined "place" tag with a map-pin */
.hsy-shop-room-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--hsy-line-strong);
  border-radius: 7px;
  background: var(--hsy-surface);
  font-size: 12px; font-weight: 500;
  color: var(--hsy-muted);
  line-height: 1.4; max-width: 100%;
  transition: filter .12s, border-color .12s;
}
.hsy-shop-room-tag svg { flex: 0 0 auto; color: var(--hsy-muted); }
.hsy-shop-room-tag-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.hsy-shop-room-tag:hover { border-color: var(--hsy-line-strong); filter: brightness(0.97); color: var(--hsy-ink); }

/* OWNER — filled "person" pill with circular avatar initial */
.hsy-shop-owner-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px 3px 3px;
  border-radius: 999px;
  background: var(--hsy-accent-soft);
  font-size: 12px; font-weight: 600;
  color: var(--hsy-accent-ink);
  max-width: 100%;
}
.hsy-shop-owner-avatar {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--hsy-accent);
  color: var(--hsy-on-accent);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.hsy-shop-owner-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsy-shop-qty { font-size: 14px; color: #5a4f42; text-align: center; }
.hsy-shop-each { font-size: 14px; color: #5a4f42; text-align: right; }
.hsy-shop-total { font-size: 15px; font-weight: 700; color: var(--hsy-ink); text-align: right; }

.hsy-shop-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.hsy-shop-controls {
  display: flex; align-items: center;
  gap: 10px;
}
.hsy-shop-controls .hsy-add-row { flex: 1; min-width: 0; }
#shopping-body .hsy-shop-controls { margin-bottom: 14px; }

/* ── Shopping: summary cards (3-up + budget) ────────────────────────── */
.hsy-stat-row--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.hsy-stat-row--3 .hsy-stat {
  border-radius: 18px;
  padding: 22px 24px;
  gap: 0;
}
.hsy-stat-row--3 .hsy-stat-value { font-size: 38px; margin-top: 8px; }
.hsy-stat-row--3 .hsy-stat-sub { margin-top: 2px; }
.hsy-stat--budget { justify-content: center; }
.hsy-stat-budget-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px;
}
.hsy-stat-budget-frac { font-size: 13px; color: var(--hsy-muted); }

/* ── Shopping: segmented filter ─────────────────────────────────────── */
.hsy-seg {
  display: inline-flex; gap: 3px;
  padding: 3px;
  background: var(--hsy-bar-bg);
  border-radius: 12px;
  flex: 0 0 auto;
}
.hsy-seg-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: var(--hsy-muted);
  font: 600 13.5px var(--hsy-font-body, inherit);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.hsy-seg-btn:hover { color: var(--hsy-ink); }
.hsy-seg-btn.is-active {
  background: var(--hsy-surface);
  color: var(--hsy-ink);
  box-shadow: 0 1px 3px rgba(74,48,20,.12);
}
.hsy-seg-count { opacity: .7; font-weight: 600; }

/* ── Shopping: add-item "Enter" hint chip ───────────────────────────── */
.hsy-enter-chip {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 600;
  color: var(--hsy-muted);
  border: 1px solid var(--hsy-line);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

/* ── Shopping: "Showing N of M" footer ──────────────────────────────── */
.hsy-shop-foot {
  margin-top: 14px;
  font-size: 13px;
  color: var(--hsy-muted);
}

/* ── Shopping: add-item + search as solid pills (per design) ─────────── */
#shopping-body .hsy-add-row {
  border-style: solid;
  border-radius: 12px;
  min-height: 44px;
}
#shopping-body .hsy-add-row svg { color: var(--hsy-accent); }
#shopping-body .hsy-search-input {
  border-style: solid;
  border-radius: 12px;
  min-height: 44px;
}

.hsy-tools-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hsy-tools-row .hsy-add-row { flex: 1; min-width: 0; margin-bottom: 0; }
.hsy-search-input {
  flex: 0 0 220px;
  padding: 10px 12px;
  background: var(--hsy-surface);
  border: 1px dashed var(--hsy-line);
  border-radius: var(--hsy-r);
  color: var(--hsy-ink);
  font: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.hsy-search-input::placeholder { color: var(--hsy-muted); }
.hsy-search-input:focus { border-style: solid; border-color: var(--hsy-accent, var(--hsy-ink)); }
.hsy-board-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  margin-bottom: 6px;
}
.hsy-shop-row.hsy-shop-add-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--hsy-line);
  background: transparent;
}
.hsy-shop-add-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hsy-inline-input {
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  border-radius: var(--hsy-r);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  color: inherit;
  width: 100%;
  outline: none;
  min-width: 0;
}
.hsy-inline-input:focus { border-color: var(--hsy-accent); }
.hsy-inline-input-sub { font-size: 11px; padding: 4px 6px; color: var(--hsy-muted); }
.hsy-inline-input-num { text-align: right; }
.hsy-btn-sm { padding: 4px 8px; font-size: 12px; }
.hsy-shop-empty {
  padding: 48px 20px;
  text-align: center;
  font-size: 14.5px;
  color: #a99e8d;
}

/* ── Item options (draft mode, lives inside edit modal) ──────────── */
.hsy-modal-options {
  display: flex; flex-direction: column; gap: 8px;
}
.hsy-modal-options-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 2px;
}
.hsy-opt-empty {
  padding: 12px; border: 1px dashed var(--hsy-line);
  border-radius: var(--hsy-r-sm);
  text-align: center; font-size: 12px;
  color: var(--hsy-muted);
}
.hsy-opt-count {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: var(--hsy-col-bg);
  color: var(--hsy-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  margin-left: 6px;
}
.hsy-opt-list {
  display: flex; flex-direction: column; gap: 6px;
}
.hsy-opt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--hsy-line);
  border-radius: 14px;
  background: var(--hsy-surface);
}
/* Selected option — terracotta ring + tint (accent resolves per active theme). */
.hsy-opt--option.is-primary {
  border: 1.5px solid var(--hsy-accent);
  background: var(--hsy-accent-soft);
  box-shadow: 0 0 0 3px var(--hsy-accent-soft);
}
.hsy-opt-thumb {
  width: 52px; height: 52px; flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--hsy-line);
  background: var(--hsy-bg);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--hsy-muted);
}
.hsy-opt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hsy-opt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hsy-opt-title {
  font-size: 14.5px; font-weight: 600; color: var(--hsy-ink);
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.hsy-opt-title > span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.hsy-opt-url {
  font-size: 12.5px; color: var(--hsy-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.hsy-opt-url a { color: inherit; text-decoration: none; }
.hsy-opt-url a:hover { text-decoration: underline; }
.hsy-opt-rating {
  font-size: 12.5px; color: var(--hsy-ink);
  white-space: nowrap; margin-top: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
.hsy-opt-rating .hsy-star { color: #E0982F; }
.hsy-opt-price { font-size: 15px; font-weight: 700; color: var(--hsy-ink); white-space: nowrap; }
.hsy-opt-qty {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  color: var(--hsy-muted);
  padding: 1px 6px; border-radius: 999px;
  background: var(--hsy-bg);
  border: 1px solid var(--hsy-line);
}
/* Right-hand column: price/actions on top, stepper (bundle) below. */
.hsy-opt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.hsy-opt-side-top { display: flex; align-items: center; gap: 8px; }
.hsy-opt-actions { display: inline-flex; gap: 6px; align-items: center; }
.hsy-opt-view {
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--hsy-accent-ink, var(--hsy-accent)); text-decoration: none;
}
.hsy-opt-view:hover { text-decoration: underline; }
.hsy-opt-pill {
  font-size: 10px; padding: 2px 6px; border-radius: 999px;
  background: var(--hsy-accent); color: var(--hsy-on-accent, #fff);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
/* Single-select radio for option cards. */
.hsy-opt-radio {
  flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 999px;
  border: 1.5px solid var(--hsy-line-strong);
  background: var(--hsy-surface);
  padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
button.hsy-opt-radio:hover { border-color: var(--hsy-accent); }
.hsy-opt-radio.is-on { border-color: var(--hsy-accent); cursor: default; }
.hsy-opt-radio.is-on::after {
  content: ""; width: 10px; height: 10px; border-radius: 999px;
  background: var(--hsy-accent);
}
.hsy-opt-add {
  display: flex; gap: 6px; align-items: center;
  padding: 4px 0 0 0;
}
.hsy-opt-add input {
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r-sm);
  background: var(--hsy-bg);
  color: var(--hsy-ink);
}
.hsy-opt-edit {
  display: none;
  flex: 0 0 100%;
  gap: 6px; align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--hsy-line);
}
.hsy-opt.is-editing .hsy-opt-edit { display: flex; }
.hsy-opt-edit input { flex: 1; font-size: 12px; padding: 8px 10px;
  border: 1px solid var(--hsy-line); border-radius: 9px;
  background: var(--hsy-surface); color: var(--hsy-ink);
}
.hsy-opt-edit input.hsy-opt-qty-input { flex: 0 0 64px; width: 64px; text-align: center; }
.hsy-opt-edit input.hsy-opt-price-input { flex: 0 0 80px; width: 80px; text-align: right; }
.hsy-draft-badge {
  display: inline-block;
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(245,179,1,0.15);
  color: #d6900b;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  margin-left: 6px;
}

/* ── Item modal tabs (Options / Bundle) ────────────────────────────── */
.hsy-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--hsy-line);
  margin-bottom: 8px;
}
.hsy-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600;
  color: var(--hsy-ink);
  padding: 11px 4px;
  border-bottom: 2.5px solid transparent;
  border-radius: 2px;
  margin-bottom: -1px; margin-right: 18px;
  display: inline-flex; align-items: center; gap: 8px;
}
.hsy-tab:last-child { margin-right: 0; }
.hsy-tab:not(.is-active) { color: var(--hsy-muted); }
.hsy-tab:hover { color: var(--hsy-ink); }
.hsy-tab.is-active { color: var(--hsy-ink); border-bottom-color: var(--hsy-accent); }
.hsy-tab .hsy-opt-count { margin-left: 0; }
.hsy-tab-count {
  font-size: 12px; font-weight: 600;
  padding: 1px 8px; border-radius: 999px;
  background: var(--hsy-bg); color: var(--hsy-muted);
}

/* ── Bundle ────────────────────────────────────────────────────────── */
.hsy-bundle-badge {
  display: inline-block;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--hsy-accent-soft);
  color: var(--hsy-accent-ink);
  font-weight: 600; letter-spacing: 0.02em;
  margin-left: 6px;
}
.hsy-shop-thumb-link { display: block; flex: 0 0 auto; line-height: 0; }
.hsy-shop-thumb {
  display: block; width: 42px; height: 42px;
  border-radius: 10px; object-fit: cover;
  border: 1px solid var(--hsy-line);
  background: var(--hsy-bar-bg);
}
.hsy-shop-thumb-link:hover .hsy-shop-thumb { outline: 2px solid var(--hsy-accent); outline-offset: 1px; }
.hsy-bundle-open { white-space: nowrap; }
.hsy-opt.is-bought { opacity: 0.55; }
.hsy-opt.is-bought .hsy-opt-title { text-decoration: line-through; }

/* Bundle "got it" checkbox — custom box, fills with accent + ✓ when checked. */
.hsy-bundle-check {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
}
.hsy-bundle-check input {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; cursor: pointer;
}
.hsy-bundle-box {
  width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--hsy-line-strong);
  background: var(--hsy-surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; line-height: 1;
  color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.hsy-bundle-check input:checked + .hsy-bundle-box {
  background: var(--hsy-accent); border-color: var(--hsy-accent);
  color: var(--hsy-on-accent, #fff);
}

/* Quantity stepper inside a purchase-list card. */
.hsy-stepper-mini {
  display: inline-flex; align-items: center;
  border: 1px solid var(--hsy-line);
  border-radius: 9px; overflow: hidden;
  background: var(--hsy-surface);
}
.hsy-stepper-btn {
  width: 28px; height: 30px;
  border: none; background: var(--hsy-bg);
  color: var(--hsy-muted); font-size: 16px; line-height: 1;
  cursor: pointer;
}
.hsy-stepper-btn:hover { background: var(--hsy-active); color: var(--hsy-ink); }
.hsy-stepper-num { min-width: 30px; text-align: center; font-size: 14px; font-weight: 600; }

/* Subtotal in the purchase-list sub-header. */
.hsy-field-label--accent { color: var(--hsy-accent-ink, var(--hsy-accent)); }
.hsy-opt-subtotal { margin-left: auto; font-size: 13px; color: var(--hsy-muted); }
.hsy-opt-subtotal-value { font-size: 13px; font-weight: 600; color: var(--hsy-ink); }

@media (max-width: 640px) {
  .hsy-opt-thumb { width: 44px; height: 44px; }
  .hsy-opt-wrap { padding-left: 12px; }
}

/* ── Modal (Studio spec) ───────────────────────────────────────────── */
/* Anatomy: .hsy-modal is the fixed scrim wrapper; .hsy-modal-card is the
   dialog panel. Sizes via .hsy-modal-card--narrow / --wide. */
.hsy-modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(74, 48, 20, 0.30);
  backdrop-filter: blur(2px);
  z-index: 9999;
  padding: 24px;
}
.hsy-modal.is-open {
  display: flex;
  animation: hsy-scrim-in .14s ease-out;
}
@keyframes hsy-scrim-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hsy-modal-confirm { z-index: 10001; }

.hsy-modal-card {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  background: var(--hsy-surface);
  color: var(--hsy-ink);
  border: 1px solid var(--hsy-line);
  border-radius: 18px;
  box-shadow:
    0 6px 18px rgba(74, 48, 20, 0.08),
    0 30px 70px -24px rgba(74, 48, 20, 0.40);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: hsy-modal-in .18s cubic-bezier(.2, .8, .3, 1);
}
.hsy-modal-card--narrow { max-width: 380px; }
.hsy-modal-card--wide   { max-width: 520px; }
.hsy-modal-card--xwide  { max-width: 860px; }
/* Back-compat: existing confirm modal CSS used a child selector */
.hsy-modal-confirm .hsy-modal-card { max-width: 380px; }

/* ── Two-column item modal (details left, tabs/panels right) ────────── */
.hsy-modal-card--split { max-width: 1140px; }
/* id-scoped so it beats the later base `.hsy-modal-body` flex-direction/padding. */
#hsy-modal-item-edit .hsy-modal-body--split {
  padding: 0;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
}
.hsy-modal-split-left {
  flex: 0 0 41%;
  max-width: 41%;
  min-width: 0;
  overflow-y: auto;
  padding: 22px 24px;
  border-right: 1px solid var(--hsy-line);
  background: var(--hsy-hover);
  display: flex; flex-direction: column;
  gap: 18px;
}
.hsy-modal-split-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column;
  min-height: 0;
}
.hsy-modal-split-right > [data-options-field] {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.hsy-modal-split-right .hsy-tabs {
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 24px 0;
}
.hsy-modal-split-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 22px;
}
/* Packing items have no purchase-list/options — collapse to one column. */
.hsy-modal-body--split.is-solo .hsy-modal-split-right { display: none; }
.hsy-modal-body--split.is-solo .hsy-modal-split-left {
  flex-basis: 100%;
  max-width: 100%;
  border-right: none;
  background: var(--hsy-surface);
}
@media (max-width: 820px) {
  #hsy-modal-item-edit .hsy-modal-body--split {
    flex-direction: column;
    overflow-y: auto;
  }
  .hsy-modal-split-left {
    flex: 0 0 auto;
    max-width: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--hsy-line);
  }
  .hsy-modal-split-right { overflow: visible; }
  .hsy-modal-split-panels { overflow: visible; }
}

@keyframes hsy-modal-in {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.hsy-modal-head {
  padding: 20px 22px 4px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.hsy-modal-close-x {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; margin: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--hsy-muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.hsy-modal-close-x:hover {
  background: var(--hsy-bg);
  border-color: var(--hsy-line);
  color: var(--hsy-ink);
}
.hsy-modal-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--hsy-muted);
  margin: 0 0 2px;
}
.hsy-modal-title {
  font-family: var(--hsy-font-display, 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--hsy-ink);
  margin: 0;
}
.hsy-modal-subtitle {
  margin: 6px 0 0;
  color: var(--hsy-muted);
  font-size: 13px;
  line-height: 1.45;
}
.hsy-confirm-extra {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hsy-ink);
  cursor: pointer;
}
.hsy-confirm-extra input { margin-top: 2px; flex: 0 0 auto; }

.hsy-modal-body {
  padding: 16px 22px 20px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 14px;
}

.hsy-modal-foot {
  padding: 14px 18px 14px 22px;
  border-top: 1px solid var(--hsy-line);
  background: #fcf8f2;
  display: flex; align-items: center; gap: 8px;
}
.hsy-modal-foot--bare {
  border-top: 0;
  background: transparent;
  padding-top: 4px;
}
/* Confirm modal foot: spec drops separator + fill so the loud red button
   doesn't sit on a contrasting strip. */
.hsy-modal-confirm .hsy-modal-foot {
  border-top: 0;
  background: transparent;
  padding-top: 4px;
}
.hsy-foot-left { margin-right: auto; }

/* ── Form rows + labels ────────────────────────────────────────────── */
/* .hsy-field is the existing label-wrapper variant; .hsy-row is the spec's
   div-wrapper variant. Both share styling. */
.hsy-field,
.hsy-row {
  display: flex; flex-direction: column;
  gap: 6px;
}
.hsy-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hsy-row-grid--qty {
  grid-template-columns: 110px 1fr;
}
.hsy-field-label,
.hsy-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--hsy-muted);
  display: flex; align-items: baseline; gap: 6px;
}
.hsy-label-hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 11px;
  color: var(--hsy-muted);
  opacity: 0.7;
}

/* ── Inputs ────────────────────────────────────────────────────────── */
.hsy-input,
input.hsy-input,
select.hsy-input,
textarea.hsy-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  color: var(--hsy-ink);
  border-radius: 11px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.hsy-input::placeholder { color: var(--hsy-muted); opacity: 0.8; }
.hsy-input:hover:not(:focus) { border-color: var(--hsy-line-strong); }
.hsy-input:focus {
  border-color: var(--hsy-accent);
  box-shadow: 0 0 0 3px var(--hsy-accent-soft);
}
.hsy-input:disabled {
  background: var(--hsy-bg);
  color: var(--hsy-muted);
  cursor: not-allowed;
}

textarea.hsy-input {
  resize: vertical;
  min-height: 64px;
  line-height: 1.5;
  padding: 10px 12px;
}

/* Selects get a custom chevron */
select.hsy-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

/* Status select with leading colored dot (Edit task modal) */
.hsy-status-select { position: relative; }
.hsy-status-dot {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px;
  border-radius: 999px;
  background: #b7ac9b;
  pointer-events: none;
}
.hsy-status-dot[data-status="todo"]  { background: #b7ac9b; }
.hsy-status-dot[data-status="doing"] { background: #e0982f; }
.hsy-status-dot[data-status="blocked"] { background: #c0392b; }
.hsy-status-dot[data-status="done"]  { background: #5e9c6b; }
.hsy-input--with-dot { padding-left: 34px; }

/* Numeric inputs — mono numerals, no native spinner */
.hsy-input--num {
  font-family: var(--hsy-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-feature-settings: 'tnum';
  font-size: 13px;
}
.hsy-input--num::-webkit-outer-spin-button,
.hsy-input--num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.hsy-input--num[type="number"] { -moz-appearance: textfield; }

/* File input — slim themed style matching other inputs */
.hsy-input--file {
  padding: 6px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.hsy-input--file::-webkit-file-upload-button,
.hsy-input--file::file-selector-button {
  border: 1px solid var(--hsy-line);
  background: var(--hsy-bg);
  color: var(--hsy-ink);
  border-radius: 5px;
  padding: 5px 10px;
  margin-right: 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* Photo edit row in Edit Room modal */
.hsy-photo-edit {
  display: flex; gap: 12px; align-items: flex-start;
}
.hsy-photo-edit-preview {
  flex: 0 0 96px;
  width: 96px; height: 72px;
  border: 1px solid var(--hsy-line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--hsy-bg);
  display: grid; place-items: center;
}
.hsy-photo-edit-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.hsy-photo-edit-empty {
  font-size: 11px;
  color: var(--hsy-muted);
  text-align: center;
  padding: 0 6px;
}
.hsy-photo-edit-actions {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}

/* Chunky inline +/- stepper */
.hsy-stepper {
  position: relative;
  display: flex;
}
.hsy-stepper > .hsy-input { padding-right: 36px; }
.hsy-stepper-btns {
  position: absolute;
  top: 1px; right: 1px; bottom: 1px;
  width: 28px;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--hsy-line);
  border-radius: 0 5px 5px 0;
  overflow: hidden;
}
.hsy-stepper-btns button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--hsy-muted);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 0;
  transition: background .12s, color .12s;
}
.hsy-stepper-btns button:hover {
  background: var(--hsy-hover);
  color: var(--hsy-ink);
}
.hsy-stepper-btns button + button { border-top: 1px solid var(--hsy-line); }

/* Leading-symbol input (currency) */
.hsy-input-affix {
  position: relative;
  display: flex; align-items: center;
}
.hsy-input-affix > .hsy-prefix {
  position: absolute; left: 12px;
  font-family: var(--hsy-font-mono, 'JetBrains Mono', ui-monospace, monospace);
  color: var(--hsy-muted);
  font-size: 13px;
  pointer-events: none;
}
.hsy-input-affix > .hsy-input { padding-left: 26px; }

/* Categories management screen */
.hsy-cat-manage { margin-top: 8px; }
.hsy-cat-manage-row {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hsy-line);
}
.hsy-cat-manage-row:last-child { border-bottom: 0; }
.hsy-cat-manage-name { font-size: 14px; font-weight: 500; }
.hsy-cat-manage-actions { display: inline-flex; gap: 6px; }

/* ── Mobile hamburger + backdrop (hidden on desktop) ────────────────── */
.hsy-hamburger {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: var(--hsy-r);
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.hsy-hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--hsy-ink);
  border-radius: 2px;
  transition: transform .18s, opacity .18s;
}
.hsy-side-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.42);
  z-index: 90;
}
.hsy-app.is-side-open .hsy-side-backdrop { display: block; }

/* ── Tablet (≤960px) ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hsy-app { --hsy-pad: 20px; --hsy-side-w: 220px; }
  .hsy-stat-row { grid-template-columns: repeat(2, 1fr); }
  .hsy-rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .hsy-board { grid-template-columns: repeat(2, 1fr); }
  .hsy-detail-body { grid-template-columns: 1fr; }
  .hsy-ref-grid { grid-template-columns: 1fr; }
  .hsy-h1 { font-size: 30px; }
  .hsy-h2 { font-size: 22px; }
}

/* ── Phone (≤640px) ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Drop compact density — give content room to breathe */
  .hsy-app, .hsy-app.density-compact { font-size: 14px; }
  .hsy-app { --hsy-pad: 14px; }

  /* Drawer sidebar */
  .hsy-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(82vw, 320px);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.2,.8,.3,1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  }
  .hsy-app.is-side-open .hsy-sidebar { transform: none; }

  .hsy-main { width: 100%; }
  .hsy-hamburger { display: inline-flex; margin-right: 4px; }

  /* Topbar shrinks, hides house meta pills */
  .hsy-topbar { padding: 12px var(--hsy-pad); gap: 10px; }
  .hsy-crumb-current { font-size: 17px; }
  .hsy-top-meta { display: none; }

  /* Screen head wraps; smaller headings */
  .hsy-screen-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .hsy-screen-head > div:last-child { flex-wrap: wrap; }
  .hsy-screen { gap: 16px; }
  .hsy-h1 { font-size: 26px; }
  .hsy-h2 { font-size: 20px; }
  .hsy-h3 { font-size: 16px; }

  /* Stats: 1-col on narrow phones, 2-col stays for ≥420 via min/max */
  .hsy-stat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hsy-stat { padding: 12px; border-radius: var(--hsy-r); }
  .hsy-stat-value { font-size: 22px; }

  /* Rooms: 1-col cards */
  .hsy-rooms-grid { grid-template-columns: 1fr; gap: 12px; }
  .hsy-room-card-add { min-height: 80px; }

  /* Force action affordances visible (no hover on touch) */
  .hsy-card-actions,
  .hsy-row-actions { opacity: 1; }
  .hsy-task-actionable .hsy-task-badge--room { /* keep visible since hover-hide breaks on touch */
    opacity: 1 !important;
  }

  /* 44px tap targets */
  .hsy-row-act { width: 36px; height: 36px; font-size: 16px; }
  .hsy-check { width: 28px; height: 28px; border-radius: 6px; }
  .hsy-side-add { width: 36px; height: 36px; }
  .hsy-btn { padding: 10px 14px; }
  .hsy-btn-icon { padding: 6px 10px; min-width: 36px; min-height: 36px; }
  .hsy-seg-btn { padding: 9px 14px; font-size: 14px; }

  /* Inputs: 16px to disable iOS focus zoom */
  .hsy-input, input.hsy-input, select.hsy-input, textarea.hsy-input,
  .hsy-search-input, .hsy-add-input, .hsy-inline-input { font-size: 16px; }
  .hsy-input--num, .hsy-inline-input-num { font-size: 16px; }

  /* Shopping toolbar — stack vertically */
  .hsy-shop-controls,
  .hsy-tools-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .hsy-shop-controls .hsy-add-row,
  .hsy-tools-row .hsy-add-row { flex: 1 1 auto; }
  .hsy-search-input { flex: 1 1 auto; }
  .hsy-seg { width: 100%; }
  .hsy-seg-btn { flex: 1; text-align: center; }

  /* Shopping rows: drop the 7-col grid, switch to flexible card layout */
  .hsy-shop-block { padding: 4px 12px; }
  .hsy-shop-row,
  .hsy-shop-row.hsy-shop-row-actionable {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    grid-template-areas:
      "check name  actions"
      ".     url   url"
      ".     qty   total";
    gap: 4px 10px;
    padding: 12px 0;
    align-items: center;
  }
  .hsy-shop-row > .hsy-check { grid-area: check; }
  .hsy-shop-row > .hsy-shop-name { grid-area: name; align-self: center; }
  .hsy-shop-row > .hsy-shop-url { grid-area: url; align-self: start; }
  .hsy-shop-row > .hsy-shop-qty { grid-area: qty; justify-self: start; text-align: left; }
  .hsy-shop-row > .hsy-shop-each { display: none; }
  .hsy-shop-row > .hsy-shop-total { grid-area: total; justify-self: end; text-align: right; font-size: 15px; }
  .hsy-shop-row > .hsy-shop-actions { grid-area: actions; justify-self: end; }
  /* Hide table column headers entirely on mobile */
  .hsy-shop-row.hsy-shop-head-row { display: none; }

  /* Add-row form: keep flex, taller tap */
  .hsy-add-row { padding: 6px 12px; }
  .hsy-add-input { font-size: 16px; padding: 8px 0; }

  /* Generic item rows */
  .hsy-item,
  .hsy-item.hsy-item-actionable {
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
    padding: 12px 4px;
  }
  .hsy-item-qty, .hsy-item-price { font-size: 13px; }

  /* Tasks board: 1-col on mobile. Grip stays visible — SortableJS handles touch. */
  .hsy-board { grid-template-columns: 1fr; gap: 10px; }
  .hsy-col { min-height: 0; padding: 10px; }
  .hsy-task-body { padding-left: 22px; }
  .hsy-task-actionable .hsy-task-body { transform: none; }
  .hsy-task.hsy-task-actionable { padding-right: 14px; padding-bottom: 10px; }
  .hsy-task-actions {
    position: static;
    margin-left: auto;
  }
  .hsy-task-badge--room,
  .hsy-task-badge--assignee { position: static; max-width: none; }
  .hsy-task {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hsy-task-body { width: 100%; }

  /* Room detail head: hide overlay (crumb shows room name), stack actions */
  .hsy-detail-overlay { display: none; }
  .hsy-detail-actions {
    position: static;
    flex-wrap: wrap;
    padding: 8px 0 0;
  }
  .hsy-detail-head { display: flex; flex-direction: column; gap: 0; }

  /* Modals: full-bleed friendly sizing */
  .hsy-modal { padding: 12px; }
  .hsy-modal-card,
  .hsy-modal-card--narrow,
  .hsy-modal-card--wide { max-width: 100%; max-height: calc(100vh - 24px); }
  .hsy-modal-head { padding: 18px 18px 4px; }
  .hsy-modal-body { padding: 14px 18px 16px; }
  .hsy-modal-foot { padding: 12px 14px 12px 18px; flex-wrap: wrap; }
  .hsy-modal-title { font-size: 19px; }
  .hsy-row-grid { grid-template-columns: 1fr; }
  .hsy-row-grid--qty { grid-template-columns: 1fr 1fr; }

  /* Photo edit row stacks */
  .hsy-photo-edit { flex-direction: column; }
  .hsy-photo-edit-preview { width: 100%; height: auto; aspect-ratio: 4/3; flex-basis: auto; }

  /* Categories management — drop fixed cols */
  .hsy-cat-manage-row { grid-template-columns: 1fr auto; gap: 10px; }
}

/* ── Settings page ───────────────────────────────────────────────────── */
.hsy-settings-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hsy-settings-card {
  border: 1px solid var(--hsy-line);
  border-radius: var(--hsy-r);
  padding: 18px 18px 16px;
  background: var(--hsy-card, transparent);
}
.hsy-settings-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.hsy-settings-card-title {
  font-weight: 600; font-size: 16px;
}
.hsy-settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.hsy-settings-form .hsy-field { display: flex; flex-direction: column; gap: 4px; }
.hsy-settings-form .hsy-field-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hsy-muted); font-weight: 600; }
.hsy-settings-form-actions {
  grid-column: 1 / -1;
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 4px;
}
.hsy-settings-help { margin-top: 14px; font-size: 12px; color: var(--hsy-muted); }
.hsy-settings-help summary { cursor: pointer; user-select: none; }
@media (max-width: 760px) {
  .hsy-settings-form { grid-template-columns: 1fr; }
}

/* ── Calendar ────────────────────────────────────────────────────────── */
.hsy-cal-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.hsy-cal-title { font-weight: 600; font-size: 18px; min-width: 200px; }
.hsy-cal-nav { display: flex; gap: 6px; }
.hsy-cal-legend { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hsy-cal-swatch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hsy-muted); }
.hsy-cal-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.hsy-cal-dot.is-airbnb { background: #E0656B; }
.hsy-cal-dot.is-vrbo { background: #5378DA; }
.hsy-cal-dot.is-booking { background: #2E8B63; }
.hsy-cal-dot.is-direct { background: #76798A; }

.hsy-cal-dot.is-other { background: #76798A; }

/* ── Booking Timeline (Gantt) ─────────────────────────────────────────────
   Channel colors are design tokens. The card uses warm-cream surfaces that
   match theme-studio; values are pinned to the spec rather than var()s so the
   timeline reads identically across themes. */
.hsy-tl-card {
  background: #FBF6EC;
  border: 1px solid #E8DECB;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(70,45,10,.07), 0 16px 40px rgba(70,45,10,.05);
  overflow: hidden;
}

/* Header */
.hsy-tl-head { padding: 22px 26px 18px; border-bottom: 1px solid #EEE4D2; }
.hsy-tl-head-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.hsy-tl-head-row2 { align-items: center; margin-top: 16px; }
.hsy-tl-eyebrow {
  font: 700 11px/1 var(--hsy-font-body); letter-spacing: .16em;
  color: #A89E8C; text-transform: uppercase;
}
.hsy-tl-title-row { display: flex; align-items: baseline; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.hsy-tl-title { font: 700 26px/1 var(--hsy-font-body); color: #211E1A; letter-spacing: -0.02em; }
.hsy-tl-range { font: 500 14px/1 var(--hsy-font-body); color: #8A8275; }
.hsy-tl-nav { display: inline-flex; align-items: center; gap: 5px; }
.hsy-tl-navbtn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid #E4DAC6;
  background: #FFFDF9; color: #6B6354; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: all .12s;
}
.hsy-tl-navbtn:hover { border-color: #d8ccb0; }
.hsy-tl-navtoday { width: auto; padding: 0 13px; font: 600 13px var(--hsy-font-body); color: #3A352D; }

/* Channel chips */
.hsy-tl-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hsy-tl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 9px; font: 600 12.5px var(--hsy-font-body);
  cursor: pointer; text-decoration: none; user-select: none; transition: all .12s;
}
.hsy-tl-chip.is-on { border: 1px solid #E2D8C4; background: #FFFDF9; color: #2A2620; }
.hsy-tl-chip.is-off { border: 1px solid #ECE4D4; background: transparent; color: #AEA593; }
.hsy-tl-chip-dot { width: 10px; height: 10px; border-radius: 3px; background: #D2C9B6; }

/* KPIs */
.hsy-tl-kpis { display: flex; gap: 26px; flex-wrap: wrap; }
.hsy-tl-kpi { display: flex; flex-direction: column; gap: 2px; }
.hsy-tl-kpi-label {
  font: 600 10px var(--hsy-font-body); letter-spacing: .1em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-tl-kpi-value { font: 800 18px var(--hsy-font-body); color: #211E1A; font-variant-numeric: tabular-nums; }

/* View / Range segmented pill controls */
.hsy-tl-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hsy-tl-ctl { display: flex; align-items: center; gap: 7px; }
.hsy-tl-ctl-cap {
  font: 700 10px var(--hsy-font-body); letter-spacing: .1em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-tl-seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: #F1E8D7; border-radius: 12px;
}
.hsy-tl-seg-btn {
  padding: 7px 14px; border-radius: 9px; border: none;
  font: 600 13px var(--hsy-font-body); color: #6B6354;
  background: transparent; cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: all .12s;
}
.hsy-tl-seg-btn:hover { color: #2A2620; }
.hsy-tl-seg-btn.is-active { background: #2A2620; color: #FBF7EF; font-weight: 700; }

/* Body */
.hsy-tl-body { padding: 6px 26px 22px; }
.hsy-tl-label-col { width: 208px; flex: none; }
.hsy-tl-axis { display: flex; align-items: stretch; }
.hsy-tl-track-head { flex: 1; display: flex; }
.hsy-tl-daycell {
  flex: 1; text-align: center; padding: 7px 0 9px;
  border-right: 1px solid #EFE6D5;
}
.hsy-tl-daycell.is-weekend { background: #F2EAD9; }
.hsy-tl-daycell.is-band { background: #F4ECDD; }
.hsy-tl-daycell.is-today { background: #FBE7DF; }
.hsy-tl-daycell.is-month1 { border-left: 2px solid #E4D8C0; }
.hsy-tl-dow { font: 600 10px var(--hsy-font-body); letter-spacing: .06em; color: #A89E8C; }
.hsy-tl-dom { font: 700 14px var(--hsy-font-body); color: #3A352D; margin-top: 2px; }
.hsy-tl-daycell.is-today .hsy-tl-dow,
.hsy-tl-daycell.is-today .hsy-tl-dom { color: #C2613E; }

/* Property lane */
.hsy-tl-lane { display: flex; align-items: stretch; border-top: 1px solid #EEE4D2; }
.hsy-tl-label {
  padding: 0 14px 0 4px; display: flex; flex-direction: column;
  justify-content: center; gap: 4px;
}
.hsy-tl-prop-name { font: 700 16px var(--hsy-font-body); color: #211E1A; }
.hsy-tl-prop-sub { font: 500 12px var(--hsy-font-body); color: #9A9082; }
.hsy-tl-prop-total { font: 700 12px var(--hsy-font-body); color: #3B6B4A; font-variant-numeric: tabular-nums; }
.hsy-tl-prop-nts { color: #A89E8C; font-weight: 500; }
.hsy-tl-track { flex: 1; position: relative; }
.hsy-tl-grid { position: absolute; inset: 0; display: flex; }
.hsy-tl-gridcell { flex: 1; border-right: 1px solid #EFE6D5;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; overflow: hidden; }
/* Synced nightly rate printed on an OPEN night (day mode + Hospitable view). Sits
   above the bar layer in the grid; bars cover booked nights so prices show only on
   genuinely open ones. .is-past greys nights before today. */
.hsy-tl-cellprice {
  font: 600 9.5px var(--hsy-font-body); font-variant-numeric: tabular-nums;
  white-space: nowrap; color: #A2998A; pointer-events: none;
}
.hsy-tl-cellprice.is-past { color: #CCC2AE; }
.hsy-tl-gridcell.is-weekend { background: #F4ECDD; }
.hsy-tl-gridcell.is-band { background: rgba(120, 100, 60, .05); }
.hsy-tl-gridcell.is-today { background: #FBE7DF; }
.hsy-tl-gridcell.is-month1 { border-left: 2px solid #E4D8C0; }
/* Vertical today marker spanning every property lane. No z-index: it must paint
   in tree order (after the grid, before the bars) so bars sit on top and the line
   shows only as a tick in the gaps above/below each bar — a positive z-index would
   stripe it across the bar faces (CSS stacking paints z-index>0 after auto). */
.hsy-tl-todayline {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: rgba(194, 97, 62, .5); border-radius: 2px;
  pointer-events: none;
}

/* Booking bar */
.hsy-tl-bar {
  position: absolute; height: 48px; margin-left: 3px;
  display: flex; align-items: center; gap: 9px; padding: 0 13px;
  font: 600 13px var(--hsy-font-body); color: #fff;
  white-space: nowrap; overflow: hidden; text-decoration: none;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 11px;
  box-shadow: 0 1px 2px rgba(50,30,10,.20), inset 0 1px 0 rgba(255,255,255,.16);
  box-sizing: border-box; z-index: 1; transition: filter .12s;
}
a.hsy-tl-bar:hover { filter: brightness(1.06); }
.hsy-tl-bar-guest { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.hsy-tl-bar-money { font-weight: 800; font-variant-numeric: tabular-nums; }
.hsy-tl-bar.clip-l { border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
.hsy-tl-bar.clip-r { border-top-right-radius: 3px; border-bottom-right-radius: 3px; }

/* Confirmed fills (channel color) */
.hsy-tl-bar.is-airbnb  { background: #E0656B; }
.hsy-tl-bar.is-vrbo    { background: #5378DA; }
.hsy-tl-bar.is-booking { background: #2E8B63; }
.hsy-tl-bar.is-direct  { background: #76798A; }
.hsy-tl-bar.is-other   { background: #76798A; }

/* Pending: cream fill, dashed channel-colored border + text, no shadow */
.hsy-tl-bar.is-pending { background: #FFFDF9; box-shadow: none; }
.hsy-tl-bar.is-pending.is-airbnb  { border: 1.5px dashed #E0656B; color: #E0656B; }
.hsy-tl-bar.is-pending.is-vrbo    { border: 1.5px dashed #5378DA; color: #5378DA; }
.hsy-tl-bar.is-pending.is-booking { border: 1.5px dashed #2E8B63; color: #2E8B63; }
.hsy-tl-bar.is-pending.is-direct  { border: 1.5px dashed #76798A; color: #76798A; }
.hsy-tl-bar.is-pending.is-other   { border: 1.5px dashed #76798A; color: #76798A; }

/* Cleaning payout overlay — strip below each bar (matches bar left/width + 3px margin) */
.hsy-tl-clean {
  position: absolute; margin-left: 3px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; box-sizing: border-box;
  font: 700 9px var(--hsy-font-body); letter-spacing: .05em; text-transform: uppercase;
  color: #fff; white-space: nowrap; overflow: hidden;
  pointer-events: none; z-index: 1;
}
.hsy-tl-clean.is-paid     { background: #3B6B4A; }
.hsy-tl-clean.is-unpaid   { background: #C2613E; }
.hsy-tl-clean.is-upcoming { background: transparent; color: #8A8275; border: 1px dashed #CFC4AF; }

/* Cleaning overlay toggle + inline legend (in the chip row) */
.hsy-tl-clean-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 9px; cursor: pointer;
  font: 700 12.5px var(--hsy-font-body); white-space: nowrap; text-decoration: none;
  background: #FFFDF9; color: #6B6354; border: 1px solid #E2D8C4;
}
.hsy-tl-clean-toggle.is-on { background: #2A2620; color: #FBF7EF; border-color: #2A2620; }
.hsy-tl-clean-legend {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11.5px var(--hsy-font-body); color: #6B6354;
}
.hsy-tl-clean-sw { width: 16px; height: 5px; border-radius: 3px; display: inline-block; }
.hsy-tl-clean-sw + .hsy-tl-clean-sw { margin-left: 6px; }

/* On narrow viewports keep the axis usable by scrolling; pin the label column. */
@media (max-width: 900px) {
  .hsy-tl-body { overflow-x: auto; }
  .hsy-tl-axis, .hsy-tl-lane { min-width: 760px; }
  .hsy-tl-label-col { position: sticky; left: 0; z-index: 2; background: #FBF6EC; }
}

/* ── Upcoming bookings (list) ──────────────────────────────────────────────
   Sibling card to the timeline; shares the warm-cream tokens. Emphasizes
   checkout date (terracotta) and payout. Values pinned to spec, theme-stable. */
.hsy-ub-card {
  background: #FBF6EC;
  border: 1px solid #E8DECB;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(70,45,10,.07), 0 16px 40px rgba(70,45,10,.05);
  overflow: hidden;
}
.hsy-ub-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 24px 28px 20px; border-bottom: 1px solid #EEE4D2;
}
.hsy-ub-eyebrow {
  font: 700 11px/1 var(--hsy-font-body); letter-spacing: .16em;
  color: #A89E8C; text-transform: uppercase;
}
.hsy-ub-title-row { display: flex; align-items: baseline; gap: 13px; margin-top: 9px; flex-wrap: wrap; }
.hsy-ub-title { font: 700 26px/1 var(--hsy-font-body); color: #211E1A; letter-spacing: -0.02em; }
.hsy-ub-range { font: 500 14px/1 var(--hsy-font-body); color: #8A8275; }
.hsy-ub-stats { display: flex; gap: 30px; }
.hsy-ub-stat { display: flex; flex-direction: column; gap: 3px; }
.hsy-ub-stat-label {
  font: 600 10px/1 var(--hsy-font-body); letter-spacing: .1em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-ub-stat-value { font: 800 20px/1 var(--hsy-font-body); color: #211E1A; font-variant-numeric: tabular-nums; }
.hsy-ub-stat-value.is-income { color: #3B6B4A; }

.hsy-ub-body { padding: 18px 20px 22px; }
.hsy-ub-panel {
  background: #FFFDF9; border: 1px solid #EFE6D5;
  border-radius: 16px; overflow: hidden;
}
.hsy-ub-row {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px; text-decoration: none; color: inherit;
  transition: background .12s;
}
.hsy-ub-row + .hsy-ub-row { border-top: 1px solid #EFE6D5; }
a.hsy-ub-row:hover { background: #FBF7EF; }

.hsy-ub-channel { display: flex; align-items: center; gap: 9px; width: 128px; flex: none; }
.hsy-ub-channel .hsy-cal-dot { width: 11px; height: 11px; flex: none; }
.hsy-ub-channel-name { font: 600 13px var(--hsy-font-body); color: #3A352D; }

.hsy-ub-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hsy-ub-prop {
  font: 700 10.5px var(--hsy-font-body); letter-spacing: .07em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-ub-guest {
  font: 700 16px var(--hsy-font-body); color: #211E1A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hsy-ub-col { width: 110px; flex: none; display: flex; flex-direction: column; gap: 3px; }
.hsy-ub-dlabel {
  font: 600 9px var(--hsy-font-body); letter-spacing: .08em;
  text-transform: uppercase; color: #B0A793;
}
.hsy-ub-dlabel.is-out { color: #C2613E; }
.hsy-ub-dval { font: 600 13.5px var(--hsy-font-body); color: #3A352D; font-variant-numeric: tabular-nums; }
.hsy-ub-dval.is-out { font-weight: 700; color: #211E1A; }

.hsy-ub-nights-col { width: 96px; flex: none; }
.hsy-ub-nights {
  display: inline-flex; align-items: center; padding: 5px 11px;
  border-radius: 8px; background: #F1E8D7;
  font: 700 12px var(--hsy-font-body); color: #6B6354; font-variant-numeric: tabular-nums;
}

.hsy-ub-payout {
  width: 108px; flex: none; text-align: right;
  font: 800 17px var(--hsy-font-body); color: #211E1A; font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .hsy-ub-col, .hsy-ub-nights-col { width: auto; }
  .hsy-ub-row { flex-wrap: wrap; gap: 10px 18px; }
}

/* ── Channel rows ────────────────────────────────────────────────────── */
.hsy-channel-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 0; }
.hsy-channel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--hsy-line);
  border-radius: 8px;
  background: var(--hsy-card, transparent);
}
.hsy-channel-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hsy-channel-name { font-weight: 600; font-size: 14px; }
.hsy-channel-status {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(120,120,120,0.18); color: var(--hsy-muted); font-weight: 600;
  white-space: nowrap;
}
.hsy-channel-status.is-connected { background: rgba(26,135,85,0.22); color: #6fd29c; }
.hsy-channel-status.is-pending { background: rgba(180,140,40,0.22); color: #d8b162; }
.hsy-channel-status.is-error { background: rgba(220,80,80,0.22); color: #e08c8c; }
.hsy-channel-status.is-disabled { background: rgba(120,120,120,0.16); color: var(--hsy-muted); }
.hsy-channel-error { grid-column: 1 / -1; font-size: 11px; }
.hsy-channel-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 10px;
}

/* ── Calendar block as link ──────────────────────────────────────────── */
a.hsy-cal-block { text-decoration: none; display: block; }
a.hsy-cal-block:hover { filter: brightness(1.08); }
.hsy-booking-link { transition: background 0.12s; }
.hsy-booking-link:hover { background: rgba(255,255,255,0.04); }

/* ── Booking detail ──────────────────────────────────────────────────── */
.hsy-booking-detail {
  border: 1px solid var(--hsy-line);
  border-radius: 12px;
  background: var(--hsy-card, transparent);
  padding: 20px 22px;
  margin-top: 8px;
}
.hsy-booking-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hsy-line);
  margin-bottom: 18px;
}
.hsy-booking-head .hsy-cal-dot { width: 14px; height: 14px; border-radius: 4px; }
.hsy-booking-head-main { min-width: 0; }
.hsy-booking-guest { font-size: 18px; font-weight: 600; }
.hsy-booking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 24px;
}
.hsy-booking-field-wide { grid-column: 1 / -1; }
.hsy-booking-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--hsy-muted); margin-bottom: 4px;
}
.hsy-booking-value { font-size: 14px; word-break: break-word; }
.hsy-booking-value a { color: var(--hsy-accent, #6fa8ff); text-decoration: none; }
.hsy-booking-value a:hover { text-decoration: underline; }
.hsy-booking-foot {
  margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--hsy-line);
  display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px;
}
.hsy-booking-status {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(120,120,120,0.18); color: var(--hsy-muted); font-weight: 600;
  white-space: nowrap; display: inline-block;
}
.hsy-booking-status.is-new { background: rgba(26,135,85,0.22); color: #6fd29c; }
.hsy-booking-status.is-modified { background: rgba(180,140,40,0.22); color: #d8b162; }
.hsy-booking-status.is-cancelled { background: rgba(220,80,80,0.22); color: #e08c8c; }
.hsy-booking-status.is-unknown { background: rgba(120,120,120,0.18); color: var(--hsy-muted); }

/* ── Notice (used by availability + others) ──────────────────────────── */
.hsy-notice {
  border: 1px solid var(--hsy-line);
  border-radius: 8px;
  background: var(--hsy-card, rgba(255,255,255,0.02));
  padding: 12px 14px;
  font-size: 13px;
  color: var(--hsy-muted);
}
.hsy-notice a { color: var(--hsy-accent, #6fa8ff); text-decoration: none; }
.hsy-notice a:hover { text-decoration: underline; }

/* ── Availability / rates editor ─────────────────────────────────────── */
.hsy-avail-pager {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hsy-avail-pager .hsy-mono { margin: 0 4px; }
.hsy-avail-wrap { display: flex; flex-direction: column; gap: 14px; }
.hsy-avail-meta {
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--hsy-line);
  border-radius: 8px;
  background: var(--hsy-card, transparent);
}
.hsy-avail-tablewrap {
  border: 1px solid var(--hsy-line);
  border-radius: 8px;
  overflow: auto;
  max-height: 70vh;
  background: var(--hsy-card, transparent);
}
.hsy-avail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.hsy-avail-table thead th {
  position: sticky; top: 0;
  background: var(--hsy-card, var(--hsy-bg));
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hsy-muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hsy-line);
  white-space: nowrap;
}
.hsy-avail-th-date { min-width: 110px; }
.hsy-avail-th-status { width: 90px; text-align: right; }
.hsy-avail-row td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.hsy-avail-row.is-weekend { background: rgba(255,255,255,0.015); }
.hsy-avail-row.is-booked { background: rgba(255,255,255,0.04); }
.hsy-avail-date {
  display: flex; flex-direction: column; line-height: 1.15;
}
.hsy-avail-dow {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--hsy-muted);
}
.hsy-avail-day { font-weight: 600; font-family: var(--hsy-font-mono, ui-monospace, monospace); }
.hsy-avail-input {
  width: 72px;
  padding: 4px 8px;
  background: var(--hsy-bg);
  color: inherit;
  border: 1px solid var(--hsy-line);
  border-radius: 6px;
  font-family: var(--hsy-font-mono, ui-monospace, monospace);
  font-size: 13px;
}
.hsy-avail-input:focus { outline: none; border-color: var(--hsy-accent, #6fa8ff); }
.hsy-avail-rate { width: 84px; }
.hsy-avail-check { text-align: center; }
.hsy-avail-check input { cursor: pointer; }
.hsy-avail-booked {
  font-size: 13px;
  color: var(--hsy-muted);
  font-style: italic;
}
.hsy-avail-booked a {
  color: inherit;
  text-decoration: none;
  margin-left: 8px;
  font-style: normal;
}
.hsy-avail-booked a:hover { color: var(--hsy-accent, #6fa8ff); text-decoration: underline; }
.hsy-avail-booked .hsy-cal-dot { vertical-align: middle; width: 10px; height: 10px; }
.hsy-avail-status { text-align: right; white-space: nowrap; }
.hsy-avail-pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(120,120,120,0.18);
  color: var(--hsy-muted);
  font-weight: 600;
}
.hsy-avail-pill.is-synced { background: rgba(26,135,85,0.22); color: #6fd29c; }
.hsy-avail-pill.is-pending { background: rgba(180,140,40,0.22); color: #d8b162; }
.hsy-avail-pill.is-saving { background: rgba(120,140,200,0.22); color: #aac0ee; }
.hsy-avail-pill.is-error { background: rgba(220,80,80,0.22); color: #e08c8c; }


/* ── Inbox (warm two-pane redesign — shares the calendar's design tokens) ── */
/* Page-level controls strip above the card (Refresh + Channels/Hospitable). */
.hsy-ibx-top-actions { display: flex; align-items: center; gap: 8px; }

.hsy-ibx-card {
  background: #FBF6EC;
  border: 1px solid #E8DECB;
  border-radius: 22px;
  box-shadow: 0 1px 3px rgba(70,45,10,.07), 0 18px 46px rgba(70,45,10,.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 188px);
  min-height: 520px;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

/* Card header */
.hsy-ibx-head {
  padding: 20px 26px;
  border-bottom: 1px solid #EEE4D2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; flex: none;
}
.hsy-ibx-head-left { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hsy-ibx-eyebrow {
  font: 700 11px/1 var(--hsy-font-body); letter-spacing: .16em;
  color: #A89E8C; text-transform: uppercase;
}
.hsy-ibx-title { font: 700 25px/1 var(--hsy-font-body); color: #211E1A; margin-top: 7px; }

/* Segmented property switcher (All houses + one per property). */
.hsy-ibx-seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: #F1E8D7; border-radius: 12px; flex-wrap: wrap;
}
.hsy-ibx-seg-btn {
  padding: 7px 14px; border-radius: 9px; border: none; cursor: pointer;
  font: 500 13px var(--hsy-font-body); color: #6B6354; background: transparent;
  text-decoration: none; white-space: nowrap; transition: all .12s;
}
.hsy-ibx-seg-btn:hover { color: #2A2620; }
.hsy-ibx-seg-btn.is-active { background: #2A2620; color: #FBF7EF; font-weight: 700; }
.hsy-ibx-seg-btn.is-active:hover { color: #FBF7EF; }
.hsy-ibx-head-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hsy-ibx-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hsy-ibx-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 9px; font: 600 12.5px var(--hsy-font-body);
  cursor: pointer; text-decoration: none; user-select: none; transition: all .12s;
}
.hsy-ibx-chip.is-on { border: 1px solid #E2D8C4; background: #FFFDF9; color: #2A2620; }
.hsy-ibx-chip.is-off { border: 1px solid #ECE4D4; background: transparent; color: #AEA593; }
.hsy-ibx-chip-dot { width: 10px; height: 10px; border-radius: 3px; background: #D2C9B6; }

.hsy-ibx-empty { padding: 40px 26px; color: #8A8275; font: 500 14px var(--hsy-font-body); }

/* Body: list + thread */
.hsy-ibx-body { display: flex; flex: 1; min-height: 0; }

/* List column */
.hsy-ibx-list-col {
  width: 372px; flex: none;
  background: #FBF8F0; border-right: 1px solid #EEE4D2;
  display: flex; flex-direction: column; min-height: 0;
}
.hsy-ibx-search { padding: 16px 16px 12px; flex: none; position: relative; }
.hsy-ibx-search svg { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.hsy-ibx-search input {
  width: 100%; height: 42px; box-sizing: border-box;
  background: #FFFDF9; border: 1px solid #E8DECB; border-radius: 12px;
  padding: 0 14px 0 38px; font: 500 13.5px var(--hsy-font-body); color: #2A2620;
}
.hsy-ibx-search input::placeholder { color: #B6AD9A; }
.hsy-ibx-search input:focus { outline: none; border-color: #d8ccb0; }

.hsy-ibx-list { flex: 1; overflow-y: auto; padding: 0 12px 14px; }
.hsy-ibx-row {
  width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit;
  display: flex; align-items: center; gap: 13px; padding: 13px 14px 13px 12px;
  border-radius: 14px; margin-top: 4px;
  background: transparent; border: 1px solid transparent; border-left: 3px solid transparent;
  transition: background .12s;
}
.hsy-ibx-row:hover { background: #F6EEDD; }
.hsy-ibx-row.is-active {
  background: #FFFDF9; border: 1px solid #E7DCC6; border-left: 3px solid #C2613E;
  box-shadow: 0 1px 2px rgba(70,45,10,.06);
}

/* Row avatar: grey placeholder + initials, with a brand-colored channel badge
   overlaid bottom-right (swap the letter for a real channel logo when available). */
.hsy-ibx-avatar-wrap { position: relative; width: 42px; height: 42px; flex: none; }
.hsy-ibx-avatar {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font: 800 14px var(--hsy-font-body);
}
.hsy-ibx-avatar-wrap .hsy-ibx-avatar { background: #C9BFAC; color: #F4F0E8; }
.hsy-ibx-avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.hsy-ibx-chan-badge {
  position: absolute; right: -3px; bottom: -3px;
  width: 19px; height: 19px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font: 800 10px var(--hsy-font-body);
  border: 2px solid #FBF8F0; box-shadow: 0 1px 2px rgba(40,25,10,.2);
}
.hsy-ibx-row-body { flex: 1; min-width: 0; }
.hsy-ibx-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hsy-ibx-row-id { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.hsy-ibx-row-name { max-width: 100%; font: 700 14.5px var(--hsy-font-body); color: #211E1A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsy-ibx-row-meta { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.hsy-ibx-row-meta .hsy-ibx-badge { padding: 3px 8px; font-size: 10.5px; }
.hsy-ibx-row.is-unread .hsy-ibx-row-name { font-weight: 800; }
.hsy-ibx-prop {
  flex: none; padding: 2px 8px; border-radius: 7px; background: #F1E8D7;
  font: 700 10.5px var(--hsy-font-body); color: #6B6354; white-space: nowrap;
}
.hsy-ibx-row-end { display: flex; align-items: center; gap: 7px; flex: none; }
.hsy-ibx-row-when { font: 500 11.5px var(--hsy-font-body); color: #A89E8C; font-variant-numeric: tabular-nums; flex: none; }
.hsy-ibx-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: #F1E8D7; padding: 3px 8px; border-radius: 7px;
  font: 700 10.5px var(--hsy-font-body); color: #6B6354;
}
.hsy-ibx-tag-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.hsy-ibx-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: #C2613E; flex: none; }

/* Thread column */
.hsy-ibx-thread-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hsy-ibx-thread { display: none; flex: 1; min-height: 0; flex-direction: column; }
.hsy-ibx-thread.is-active { display: flex; }
.hsy-ibx-thread-head {
  padding: 16px 24px; border-bottom: 1px solid #EEE4D2; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hsy-ibx-thread-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hsy-ibx-thread-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hsy-ibx-thread-name { font: 700 18px/1.1 var(--hsy-font-body); color: #211E1A; }
.hsy-ibx-thread-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 600 12.5px var(--hsy-font-body); color: #7C7466; }

/* Check-in status pill next to the guest name. */
.hsy-ibx-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 4px 9px; border-radius: 8px; font: 700 11px var(--hsy-font-body); white-space: nowrap;
}
.hsy-ibx-badge-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.hsy-ibx-badge.is-staying { background: #E9F1EA; color: #3C7A57; }
.hsy-ibx-badge.is-staying .hsy-ibx-badge-dot { background: #4FA877; }
.hsy-ibx-badge.is-upcoming { background: #E8EEF7; color: #3E6CA8; }
.hsy-ibx-badge.is-upcoming .hsy-ibx-badge-dot { background: #5C8FD6; }
.hsy-ibx-badge.is-checkedout { background: #EDE9E1; color: #847C6D; }
.hsy-ibx-badge.is-checkedout .hsy-ibx-badge-dot { background: #B6AD9A; }
.hsy-ibx-badge.is-inquiry { background: #F6EEDD; color: #9A7B36; }
.hsy-ibx-badge.is-inquiry .hsy-ibx-badge-dot { background: #C79A3F; }
.hsy-ibx-badge.is-closed { background: #EDE9E1; color: #847C6D; }
.hsy-ibx-badge.is-closed .hsy-ibx-badge-dot { background: #B6AD9A; }

/* Right cluster of the thread head: stay/earnings meta + close control. */
.hsy-ibx-thread-right { display: flex; align-items: center; gap: 14px; flex: none; }
/* Close / reopen conversation control, sits at the head's right edge. */
.hsy-ibx-thread-close { flex: none; }
.hsy-ibx-close-btn {
  cursor: pointer; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #ECE4D4; background: #FFFDF9; color: #A89E8C;
}
.hsy-ibx-close-btn:hover { border-color: #E2D8C4; background: #F6EFE2; color: #5A5246; }
.hsy-ibx-close-btn.is-reopen { background: #E9F1EA; border-color: #CFE3D4; color: #3C7A57; }
.hsy-ibx-close-btn.is-reopen:hover { border-color: #B7D4BE; background: #DFEEE2; }

/* Smart-lock door code pill, parsed from the check-in message. */
.hsy-ibx-code-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 8px; background: #F1E8D7; white-space: nowrap;
}
.hsy-ibx-code-label { font: 700 10px var(--hsy-font-body); letter-spacing: .08em; text-transform: uppercase; color: #9A8E72; }
.hsy-ibx-code-val { font: 800 13px var(--hsy-font-body); letter-spacing: .12em; color: #5A5246; font-variant-numeric: tabular-nums; }

/* Right side: centered dates/nights, a hairline divider, then the earnings badge. */
.hsy-ibx-thread-meta { display: flex; align-items: center; gap: 14px; flex: none; }
.hsy-ibx-thread-stay { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.hsy-ibx-thread-dates { font: 700 12.5px var(--hsy-font-body); color: #3A352D; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hsy-ibx-thread-nights { font: 500 11.5px var(--hsy-font-body); color: #A89E8C; white-space: nowrap; }
.hsy-ibx-divider { width: 1px; height: 34px; background: #E6DCCB; flex: none; }
.hsy-ibx-earn {
  display: inline-flex; align-items: center; flex: none;
  padding: 7px 14px; border-radius: 11px; background: #E9F1EA; color: #3C7A57;
  font: 800 16px var(--hsy-font-body); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Message area */
.hsy-ibx-msgs {
  flex: 1; overflow-y: auto; padding: 22px 28px; background: #FCF9F2;
  display: flex; flex-direction: column; gap: 3px;
}
.hsy-ibx-daysep {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 10px;
}
.hsy-ibx-daysep::before, .hsy-ibx-daysep::after { content: ''; flex: 1; height: 1px; background: #ECE3D2; }
.hsy-ibx-daysep span {
  font: 700 10.5px var(--hsy-font-body); letter-spacing: .1em; text-transform: uppercase; color: #B0A793;
}

/* Message rows: side + group spacing. First-of-group gets a larger top gap. */
.hsy-ibx-msg-row { display: flex; margin-top: 2px; }
.hsy-ibx-msg-row.is-first { margin-top: 10px; }
.hsy-ibx-msg-row.is-in { justify-content: flex-start; }
.hsy-ibx-msg-row.is-out { justify-content: flex-end; }

/* Content-sized bubble; timestamp sits inline bottom-right, wraps under long text. */
.hsy-ibx-msg {
  max-width: 66%; width: fit-content; padding: 9px 14px 7px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end;
  column-gap: 10px; row-gap: 0;
}
.hsy-ibx-msg.is-in {
  background: #fff; border: 1px solid #ECE3D2; color: #2E2A22;
  border-radius: 6px 16px 16px 6px; box-shadow: 0 1px 2px rgba(70,45,10,.05);
}
.hsy-ibx-msg-row.is-first .hsy-ibx-msg.is-in { border-top-left-radius: 16px; }
.hsy-ibx-msg.is-out {
  background: #F4E4D7; color: #43352B; border: 1px solid #EAD2C0;
  border-radius: 16px 6px 6px 16px; box-shadow: 0 1px 2px rgba(120,70,35,.06);
}
.hsy-ibx-msg-row.is-first .hsy-ibx-msg.is-out { border-top-right-radius: 16px; }
.hsy-ibx-msg-text {
  font: 500 14px/1.45 var(--hsy-font-body); flex: 1 1 auto; min-width: 0;
  white-space: pre-line; word-break: break-word;
}
.hsy-ibx-msg-time {
  font: 500 10px var(--hsy-font-body); flex: 0 0 auto; position: relative; top: 2px;
  font-variant-numeric: tabular-nums; color: #BBB2A0;
}
.hsy-ibx-msg.is-out .hsy-ibx-msg-time { color: rgba(120,75,45,.5); }

/* Composer */
.hsy-ibx-compose { padding: 16px 24px 18px; border-top: 1px solid #EEE4D2; background: #FBF6EC; flex: none; }
.hsy-ibx-compose-row { display: flex; align-items: flex-end; gap: 12px; }
.hsy-ibx-compose-input {
  flex: 1; min-height: 48px; max-height: 140px; padding: 13px 16px;
  border: 1px solid #E2D8C4; border-radius: 14px; background: #FFFDF9;
  font: 500 14px/1.4 var(--hsy-font-body); color: #2A2620; resize: none; box-sizing: border-box;
}
.hsy-ibx-compose-input::placeholder { color: #B6AD9A; }
.hsy-ibx-compose-input:focus { outline: none; border-color: #d8ccb0; }
.hsy-ibx-send {
  height: 48px; padding: 0 20px; border: none; border-radius: 13px; cursor: pointer;
  font: 700 14px var(--hsy-font-body); color: #fff; background: #C2613E;
  box-shadow: 0 2px 6px rgba(160,70,30,.28);
  display: inline-flex; align-items: center; gap: 8px; flex: none; transition: filter .12s;
}
.hsy-ibx-send:hover { filter: brightness(1.05); }
.hsy-ibx-compose-help {
  display: flex; align-items: center; gap: 6px; margin-top: 9px;
  font: 500 11.5px var(--hsy-font-body); color: #9A9082;
}
.hsy-ibx-compose-disabled {
  padding: 16px 24px; border-top: 1px solid #EEE4D2;
  font: 500 12.5px var(--hsy-font-body); color: #9A9082; flex: none;
}

@media (max-width: 900px) {
  .hsy-ibx-list-col { width: 300px; }
}
@media (max-width: 720px) {
  .hsy-ibx-body { flex-direction: column; }
  .hsy-ibx-list-col { width: 100%; border-right: none; border-bottom: 1px solid #EEE4D2; max-height: 40vh; }
}

/* ── Edit-item modal: warm redesign (scoped so other modals are untouched) ─
   Colors come from the active theme's --hsy-* tokens; under the Hearth theme
   this renders as the terracotta/cream handoff design. */
#hsy-modal-item-edit .hsy-modal-card {
  max-width: 1140px;
  border: 1px solid var(--hsy-line);
  border-radius: 20px;
}
#hsy-modal-item-edit .hsy-modal-head { padding: 24px 26px 16px; }
#hsy-modal-item-edit .hsy-modal-title {
  font-family: var(--hsy-font-display, serif);
  font-size: 27px;
}
/* Two-column body manages its own per-column padding (see .hsy-modal-split-*). */
#hsy-modal-item-edit .hsy-modal-foot {
  padding: 16px 26px;
  background: var(--hsy-bg);
  border-top-color: var(--hsy-line);
}
/* Bigger, softer inputs to match the spec. */
#hsy-modal-item-edit .hsy-input { padding: 13px 14px; border-radius: 11px; font-size: 15px; }
#hsy-modal-item-edit textarea.hsy-input { min-height: 80px; }
/* Room + Link share a responsive 2-up grid that collapses when narrow. */
.hsy-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
/* Dashed roomy "add another" form — labeled link row + Qty / Unit price / Add row. */
.hsy-opt-add {
  display: block;
  margin-top: 14px;
  padding: 16px;
  border: 1.5px dashed var(--hsy-line-strong);
  border-radius: 14px;
  background: var(--hsy-bg);
}
.hsy-opt-add-label {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--hsy-muted);
  margin-bottom: 11px;
}
.hsy-opt-add-field { display: flex; flex-direction: column; gap: 6px; }
.hsy-opt-add-flabel { font-size: 12px; font-weight: 500; color: var(--hsy-muted); }
.hsy-opt-add .hsy-opt-add-field input {
  width: 100%; min-width: 0;
  padding: 11px 12px; font-size: 14px;
  border: 1px solid var(--hsy-line);
  border-radius: 10px;
  background: var(--hsy-surface);
  color: var(--hsy-ink);
}
.hsy-opt-add-row2 {
  display: flex; align-items: flex-end;
  gap: 14px; margin-top: 14px; flex-wrap: wrap;
}
.hsy-opt-add-field--qty { flex: 0 0 96px; width: 96px; }
.hsy-opt-add-field--price { flex: 0 0 140px; width: 140px; }
.hsy-opt-add .hsy-opt-add-field--qty input { text-align: center; }
.hsy-opt-add-btn {
  margin-left: auto;
  padding: 12px 22px;
  border: none; border-radius: 10px;
  background: var(--hsy-accent);
  color: var(--hsy-on-accent, #fff);
  font-weight: 600; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(194, 94, 58, 0.28);
}
.hsy-opt-add-btn:hover { background: var(--hsy-accent-hover); }
.hsy-opt-add .hsy-btn-ghost {
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--hsy-line);
  background: var(--hsy-surface);
  color: var(--hsy-muted); font-weight: 600; white-space: nowrap;
}
.hsy-opt-add .hsy-btn-ghost:hover { background: var(--hsy-accent-soft); }

/* ── Property switcher ─────────────────────────────────────────────── */
.hsy-switcher { position: relative; display: inline-block; }
.hsy-switcher-trigger {
  display: flex; align-items: center; gap: 14px;
  background: var(--hsy-surface); border: 1px solid var(--hsy-line);
  border-radius: 14px; padding: 11px 14px 11px 12px; min-width: 320px;
  box-shadow: 0 1px 2px rgba(28,26,23,.04); cursor: pointer; text-align: left;
  transition: border-color .12s, box-shadow .12s;
}
.hsy-switcher-trigger:hover,
.hsy-switcher.is-open .hsy-switcher-trigger { border-color: var(--hsy-line-strong); }
.hsy-switcher-thumb {
  flex: none; width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px; line-height: 1;
}
.hsy-switcher-thumb--sm { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
.hsy-switcher-thumb--all {
  background: var(--hsy-col-bg); color: var(--hsy-muted); font-size: 18px; font-weight: 700;
}
.hsy-switcher-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hsy-switcher-row1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hsy-switcher-name {
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--hsy-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hsy-switcher-pill {
  flex: none; font-size: 11px; font-weight: 600; color: var(--hsy-muted);
  background: var(--hsy-col-bg); padding: 2px 7px; border-radius: 20px;
}
.hsy-switcher-sub {
  font-size: 13px; color: var(--hsy-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.hsy-switcher-chev {
  flex: none; margin-left: 6px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid var(--hsy-muted); transition: transform .12s;
}
.hsy-switcher.is-open .hsy-switcher-chev { transform: rotate(180deg); }

.hsy-switcher-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: 380px;
  background: var(--hsy-surface); border: 1px solid var(--hsy-line); border-radius: 16px;
  box-shadow: 0 16px 40px -12px rgba(28,26,23,.22), 0 2px 6px rgba(28,26,23,.06);
  padding: 7px; animation: hsy-popIn .14s ease;
}
@keyframes hsy-popIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hsy-switcher-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hsy-muted); padding: 8px 12px 6px;
}
.hsy-switcher-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  border-radius: 11px; padding: 10px 12px; text-align: left;
  text-decoration: none; cursor: pointer; background: transparent; border: 0;
}
.hsy-switcher-item:hover { background: var(--hsy-hover); }
.hsy-switcher-item.is-current { background: var(--hsy-active, var(--hsy-hover)); }
.hsy-switcher-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hsy-switcher-item-name {
  font-weight: 600; font-size: 14.5px; color: var(--hsy-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hsy-switcher-item-sub {
  font-size: 12.5px; color: var(--hsy-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hsy-switcher-meta { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.hsy-switcher-meta-n { font-size: 13px; font-weight: 600; color: var(--hsy-ink); }
.hsy-switcher-meta-l { font-size: 11px; color: var(--hsy-muted); }
.hsy-switcher-check { flex: none; font-size: 15px; font-weight: 700; }
.hsy-switcher-divider { border-top: 1px solid var(--hsy-line); margin: 6px 4px 2px; }
.hsy-switcher-add {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: 11px; color: var(--hsy-ink);
  font-size: 14px; font-weight: 600; background: transparent; border: 0;
  cursor: pointer; text-align: left;
}
.hsy-switcher-add:hover { background: var(--hsy-hover); }
.hsy-switcher-add-plus { color: var(--hsy-muted); font-size: 17px; font-weight: 700; }


/* ── Reviews (redesign) ─────────────────────────────────────────────── */
.mono { font-family: var(--hsy-font-mono, 'JetBrains Mono', ui-monospace, monospace); }

/* Header */
.hsy-rev-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hsy-rev-eyebrow {
  font-family: var(--hsy-font-mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-rev-h1 { font: 800 30px/1 var(--hsy-font-body); color: #211E1A; margin-top: 7px; }
.hsy-rev-sub { font: 500 15px var(--hsy-font-body); color: #8C8474; margin-top: 7px; }
.hsy-rev-tabs { display: inline-flex; gap: 3px; padding: 4px; background: #EAE0CC; border-radius: 13px; flex-wrap: wrap; }
.hsy-rev-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 10px;
  font: 700 13px var(--hsy-font-body); color: #6B6354; text-decoration: none;
}
.hsy-rev-tab:hover { color: #2A2620; }
.hsy-rev-tab.is-active { background: #2A2620; color: #FBF7EF; }
.hsy-rev-tab.is-active:hover { color: #FBF7EF; }
.hsy-rev-tab-n { font-family: var(--hsy-font-mono); font-size: 10.5px; font-weight: 700; color: #A89E8C; }
.hsy-rev-tab.is-active .hsy-rev-tab-n { color: rgba(251,247,239,.6); }

/* Summary card */
.hsy-rev-summary {
  background: #FBF6EC; border: 1px solid #EADFCB; border-radius: 18px;
  box-shadow: 0 1px 3px rgba(70,45,10,.06); padding: 24px 26px;
  display: flex; align-items: stretch; gap: 30px; flex-wrap: wrap;
}
.hsy-rev-sum-div { width: 1px; background: #EADFCB; align-self: stretch; }
.hsy-rev-sum-score { display: flex; flex-direction: column; justify-content: center; min-width: 150px; }
.hsy-rev-sum-big { display: flex; align-items: baseline; gap: 6px; }
.hsy-rev-sum-avg { font: 800 48px/1 var(--hsy-font-body); color: #211E1A; }
.hsy-rev-sum-of { font-family: var(--hsy-font-mono); font-size: 15px; color: #9B917F; }
.hsy-rev-sum-stars { font-size: 17px; letter-spacing: 2px; color: #C2613E; margin-top: 8px; }
.hsy-rev-sum-count { font: 600 13.5px var(--hsy-font-body); color: #8C8474; margin-top: 9px; }
.hsy-rev-sum-cats {
  flex: 1.4; min-width: 260px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 26px; align-content: center;
}
.hsy-rev-sum-cat { display: flex; align-items: center; gap: 10px; }
.hsy-rev-sum-cat-l {
  font-family: var(--hsy-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: #9B917F; width: 92px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hsy-rev-sum-cat-v { font-family: var(--hsy-font-mono); font-size: 12px; color: #4A4338; width: 26px; text-align: right; flex: none; }
.hsy-rev-bar { flex: 1; height: 6px; border-radius: 3px; background: #EFE6D3; overflow: hidden; }
.hsy-rev-bar-fill { display: block; height: 100%; border-radius: 3px; background: #C2613E; }
.hsy-rev-sum-right { flex: 1; min-width: 200px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hsy-rev-dist { display: flex; flex-direction: column; gap: 5px; }
.hsy-rev-dist-row { display: flex; align-items: center; gap: 9px; }
.hsy-rev-dist-l { font-family: var(--hsy-font-mono); font-size: 11px; color: #9B917F; width: 24px; flex: none; }
.hsy-rev-dist-n { font-family: var(--hsy-font-mono); font-size: 11px; color: #8C8474; width: 18px; text-align: right; flex: none; }
.hsy-rev-sources { display: flex; gap: 8px; flex-wrap: wrap; }
.hsy-rev-source {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px;
  background: #F4ECDC; border: 1px solid #EADFCB; border-radius: 9px;
}
.hsy-rev-source-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.hsy-rev-source-n { font: 700 12px var(--hsy-font-body); color: #4A4338; }
.hsy-rev-source-c { font-size: 11px; color: #9B917F; }

/* Toolbar */
.hsy-rev-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hsy-rev-feedtitle { font: 700 19px var(--hsy-font-body); color: #211E1A; }
.hsy-rev-sortwrap { display: flex; align-items: center; gap: 9px; }
.hsy-rev-sortlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #A89E8C; }
.hsy-rev-sort { display: inline-flex; gap: 2px; padding: 3px; background: #EAE0CC; border-radius: 10px; }
.hsy-rev-sort-btn {
  padding: 6px 12px; border-radius: 8px; font: 700 12.5px var(--hsy-font-body);
  color: #6B6354; text-decoration: none; cursor: pointer;
}
.hsy-rev-sort-btn.is-active { background: #FBF7EF; color: #211E1A; box-shadow: 0 1px 2px rgba(70,45,10,.1); }

/* Empty */
.hsy-rev-empty { font: 500 14px var(--hsy-font-body); color: #8C8474; padding: 8px 2px; }

/* Uniform card grid */
.hsy-rev-feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hsy-rev-card {
  display: flex; flex-direction: column; height: 322px; overflow: hidden;
  background: #FBF6EC; border: 1px solid #EADFCB; border-radius: 16px;
  box-shadow: 0 1px 3px rgba(70,45,10,.05); padding: 18px 19px;
}
.hsy-rev-card-top { display: flex; align-items: center; gap: 9px; }
.hsy-rev-flexspace { flex: 1; }
.hsy-rev-flexgrow { flex: 1; min-height: 12px; }
.hsy-rev-chan {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px;
  color: #fff; font: 700 11px var(--hsy-font-body); flex: none;
}
.hsy-rev-when { font-size: 11.5px; color: #A89E8C; white-space: nowrap; }
.hsy-rev-guest { font: 800 16px/1.2 var(--hsy-font-body); color: #211E1A; margin-top: 12px; overflow-wrap: break-word; }
.hsy-rev-rate { display: flex; align-items: center; gap: 9px; margin-top: 5px; flex-wrap: wrap; }
.hsy-rev-stars { font-size: 14px; letter-spacing: 1.5px; color: #C2613E; }
.hsy-rev-score { font: 800 13.5px var(--hsy-font-body); color: #211E1A; }
.hsy-rev-rate-sep { color: #CFC4AE; }
.hsy-rev-house { font: 600 12.5px var(--hsy-font-body); color: #6B6354; }
.hsy-rev-text {
  margin: 11px 0 0; font: 400 13.5px/1.55 var(--hsy-font-body); color: #3A352D;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.hsy-rev-text-empty { margin: 11px 0 0; font-size: 12.5px; color: #B7AD99; }
.hsy-rev-subline { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.hsy-rev-sub { font-size: 11px; color: #9B917F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsy-rev-sub-none { font-size: 11px; color: #C0B69F; }
.hsy-rev-note {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; background: #F6EFDF;
  border-radius: 7px; font: 700 10.5px var(--hsy-font-body); color: #B0843E; flex: none;
}
.hsy-rev-note-dot { width: 5px; height: 5px; border-radius: 50%; background: #B0843E; }
.hsy-rev-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid #EFE6D3; }
.hsy-rev-replied { display: flex; align-items: center; gap: 8px; font: 700 12px var(--hsy-font-body); color: #2C7350; }
.hsy-rev-checkcircle {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; background: #E4F1EA; flex: none;
}
.hsy-rev-foot-actions { display: flex; align-items: center; gap: 8px; }
.hsy-rev-replybtn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px;
  border: 1px solid #E0D5C0; border-radius: 10px; background: #FBF7EF; color: #4A4338;
  font: 700 12.5px var(--hsy-font-body); cursor: pointer;
}
.hsy-rev-replybtn:hover { background: #FFFDF9; border-color: #D8CCB0; }
.hsy-rev-guestbtn {
  display: inline-flex; align-items: center; padding: 7px 11px; border: 1px solid #E0D5C0;
  border-radius: 10px; background: transparent; color: #8A6A2C;
  font: 700 12.5px var(--hsy-font-body); cursor: pointer;
}
.hsy-rev-guestbtn:hover { background: #F4ECDC; }
.hsy-rev-noreply { font-size: 11px; color: #B7AD99; }

/* Pagination */
.hsy-rev-pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hsy-rev-pagerange { font-size: 11.5px; color: #A89E8C; }
.hsy-rev-pagebtns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hsy-rev-pagebtn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px;
  padding: 8px 13px; border-radius: 10px; border: 1px solid #E0D5C0; background: #FBF7EF;
  color: #6B6354; font: 700 12.5px var(--hsy-font-body); text-decoration: none; cursor: pointer;
}
.hsy-rev-pagebtn:hover { background: #FFFDF9; }
.hsy-rev-pagebtn.is-active { background: #B5482E; color: #FBF7EF; border-color: #B5482E; }
.hsy-rev-pagebtn.is-active:hover { background: #B5482E; }
.hsy-rev-pagebtn.is-disabled { opacity: .6; color: #C8BEA9; cursor: default; pointer-events: none; }

.hsy-rev-footnote { font-size: 11.5px; color: #AEA48F; }

/* Modals */
.hsy-rev-scrim {
  position: fixed; inset: 0; background: rgba(33,30,26,.42); z-index: 50; padding: 20px;
  display: flex; align-items: center; justify-content: center;
}
.hsy-rev-scrim[hidden] { display: none; }
.hsy-rev-modal {
  width: 520px; max-width: 100%; background: #FBF6EC; border: 1px solid #EADFCB;
  border-radius: 18px; box-shadow: 0 24px 64px rgba(40,25,10,.28); padding: 24px;
}
.hsy-rev-modal-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #A89E8C; }
.hsy-rev-modal-quote {
  font: 500 13.5px/1.6 var(--hsy-font-body); color: #6B6354; margin-top: 10px;
  padding: 12px 14px; background: #F4ECDC; border-radius: 11px;
}
.hsy-rev-modal-ta {
  width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; margin-top: 14px;
  padding: 11px 13px; border: 1px solid #E0D5C0; border-radius: 12px; background: #FFFDF9;
  font: 500 13.5px/1.6 var(--hsy-font-body); color: #26221C;
}
.hsy-rev-modal-ta:focus { outline: none; border-color: #D8CCB0; }
.hsy-rev-modal-col { display: flex; flex-direction: column; gap: 10px; }
.hsy-rev-modal-col .hsy-rev-modal-ta { margin-top: 0; min-height: 64px; }
.hsy-rev-modal-actions { display: flex; gap: 9px; margin-top: 14px; justify-content: flex-end; }
.hsy-rev-field { display: flex; flex-direction: column; gap: 4px; font: 600 12px var(--hsy-font-body); color: #6B6354; }
.hsy-rev-select {
  background: #FFFDF9; border: 1px solid #E0D5C0; border-radius: 10px; padding: 8px 10px;
  font: 500 13.5px var(--hsy-font-body); color: #26221C;
}
.hsy-rev-check { display: flex; align-items: center; gap: 8px; font: 500 13px var(--hsy-font-body); color: #4A453C; }

/* Responsive feed columns */
@media (max-width: 1180px) { .hsy-rev-feed { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px)  { .hsy-rev-feed { grid-template-columns: 1fr; } }

/* ── Smart locks (redesign) ─────────────────────────────────────────── */

/* Header + tab toggle */
.hsy-lk-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hsy-lk-eyebrow {
  font-family: var(--hsy-font-mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-lk-h1 { font: 800 30px/1 var(--hsy-font-body); color: #211E1A; margin-top: 7px; }
.hsy-lk-sub { font: 500 15px var(--hsy-font-body); color: #8C8474; margin-top: 7px; }
.hsy-lk-tabs { display: inline-flex; gap: 3px; padding: 4px; background: #EAE0CC; border-radius: 13px; }
.hsy-lk-tab {
  padding: 8px 18px; border-radius: 10px; font: 700 13.5px var(--hsy-font-body);
  color: #6B6354; text-decoration: none; cursor: pointer;
}
.hsy-lk-tab:hover { color: #2A2620; }
.hsy-lk-tab.is-active, .hsy-lk-tab.is-active:hover { background: #2A2620; color: #FBF7EF; }

/* House filter pill (mirrors the Noise/Reviews selector) */
.hsy-lk-pillrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hsy-lk-pill {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: #FBF6EC; border: 1px solid #EADFCB; border-radius: 16px; min-width: 430px;
}
.hsy-lk-pill-tile {
  width: 42px; height: 42px; border-radius: 11px; flex: none; background-color: #CFC3A8;
  background-image:
    repeating-linear-gradient(0deg,#B6A98F,#B6A98F 2px,transparent 2px,transparent 4px),
    repeating-linear-gradient(90deg,#B6A98F,#B6A98F 2px,transparent 2px,transparent 4px);
}
.hsy-lk-pill-main { flex: 1; }
.hsy-lk-pill-row1 { display: flex; align-items: center; gap: 9px; }
.hsy-lk-pill-name { font: 700 16px var(--hsy-font-body); color: #26221C; }
.hsy-lk-pill-chip {
  font-family: var(--hsy-font-mono); font-size: 11px; color: #8C8474;
  background: #EFE6D3; padding: 2px 8px; border-radius: 6px;
}
.hsy-lk-pill-sub { font: 500 13px var(--hsy-font-body); color: #9B917F; margin-top: 2px; }
.hsy-lk-pill-chev { color: #A89E8C; font-size: 13px; flex: none; }
.hsy-lk-pill-select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  border: none; background: none; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.hsy-lk-online { font-family: var(--hsy-font-mono); font-size: 12px; color: #A89E8C; }
.hsy-lk-spacer { flex: 1; }

/* KPI strip */
.hsy-lk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.hsy-lk-kpi { background: #FBF6EC; border: 1px solid #EADFCB; border-radius: 16px; padding: 16px 18px; }
.hsy-lk-kpi-l {
  font-family: var(--hsy-font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #A89E8C;
}
.hsy-lk-kpi-v { font: 800 30px/1 var(--hsy-font-body); margin-top: 10px; }
.hsy-lk-kpi-s { font: 500 12.5px var(--hsy-font-body); color: #8C8474; margin-top: 6px; }

/* Tables (shared shell for Status + Linking) */
.hsy-lk-table {
  margin-top: 18px; background: #FBF6EC; border: 1px solid #EADFCB; border-radius: 18px;
  box-shadow: 0 1px 3px rgba(70,45,10,.05); overflow: hidden;
}
.hsy-lk-row { display: grid; gap: 14px; align-items: center; padding: 15px 22px; border-bottom: 1px solid #F1E9D8; }
.hsy-lk-row--status { grid-template-columns: 1.5fr 1.7fr 1.1fr 1.3fr 1fr 150px; }
.hsy-lk-row--link   { grid-template-columns: 1.3fr 1.9fr 1.4fr 150px; align-items: start; }
.hsy-lk-row--head { padding: 14px 22px; border-bottom: 1px solid #EADFCB; }
/* Applicable-lock highlight: the row a failed command belongs to */
.hsy-lk-row--err { background: rgba(224,101,107,.06); box-shadow: inset 3px 0 0 #E0656B; }

/* Dismissable result banner */
.hsy-lk-banner { display: flex; align-items: center; gap: 12px; }
.hsy-lk-banner > span:first-child { flex: 1 1 auto; min-width: 0; }
.hsy-lk-banner-x {
  flex: none; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; padding: 0 2px; color: inherit; opacity: .55;
}
.hsy-lk-banner-x:hover { opacity: 1; }
.hsy-lk-th {
  font-family: var(--hsy-font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: #AEA48F;
}
.hsy-lk-th--r, .hsy-lk-cell--r { text-align: right; justify-self: end; }

/* Property cell */
.hsy-lk-prop { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hsy-lk-dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.hsy-lk-prop-name { font: 700 14.5px var(--hsy-font-body); color: #26221C; }

/* Device cell */
.hsy-lk-dev { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hsy-lk-tile {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: flex;
  align-items: center; justify-content: center; background: #F1E8D7; border: 1px solid #EADFCB;
  transition: background .2s ease, border-color .2s ease;
}
/* State-tinted tiles in the Status table: green locked, red unlocked. */
.hsy-lk-tile--locked { background: #E4F1EA; border-color: #C2DDC9; }
.hsy-lk-tile--unlocked { background: #FBEAE4; border-color: #EFC9BC; }
.hsy-lk-dev-name { font: 700 14px/1.2 var(--hsy-font-body); color: #26221C; }
.hsy-lk-dev-sub {
  font: 500 12px var(--hsy-font-body); color: #9B917F; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Status word + dot */
.hsy-lk-status { display: flex; align-items: center; gap: 8px; }
.hsy-lk-sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hsy-lk-sword { font: 800 14.5px var(--hsy-font-body); }

/* Battery */
.hsy-lk-bat { display: flex; align-items: center; gap: 8px; }
.hsy-lk-bat-track { flex: 1; height: 7px; border-radius: 4px; background: #EFE6D3; overflow: hidden; min-width: 40px; }
.hsy-lk-bat-fill { height: 100%; border-radius: 4px; }
.hsy-lk-bat-pct { font-family: var(--hsy-font-mono); font-size: 12px; width: 36px; text-align: right; flex: none; }
.hsy-lk-bat-none { font-family: var(--hsy-font-mono); font-size: 11.5px; color: #B7AD99; }

.hsy-lk-seen { font-family: var(--hsy-font-mono); font-size: 11.5px; color: #AEA48F; }

/* Status / online badge */
.hsy-lk-badge {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 8px;
  font: 700 11px var(--hsy-font-body); flex: none;
}
.hsy-lk-badge--on { background: #D9E3CF; color: #4A6B3E; }
.hsy-lk-badge--off { background: #EAE2D2; color: #9A9486; }

/* Action buttons */
.hsy-lk-actform { display: flex; justify-content: flex-end; }
.hsy-lk-act {
  padding: 8px 18px; border-radius: 10px; border: none; font: 700 12.5px var(--hsy-font-body);
  cursor: pointer; white-space: nowrap;
}
.hsy-lk-act--unlock { background: #B5482E; color: #FBF7EF; }
.hsy-lk-act--lock { background: #E4F1EA; border: 1px solid #3F6B43; color: #2C7350; }
.hsy-lk-act--off { background: #F4ECDC; border: 1px solid #EADFCB; color: #B7AD99; cursor: default; padding: 8px 16px; }
/* In-progress: button shows a spinner + disabled while the command runs. */
.hsy-lk-act { display: inline-flex; align-items: center; gap: 7px; }
.hsy-lk-act .hsy-lk-spin { display: none; }
.hsy-lk-act.is-busy { opacity: .8; cursor: progress; }
.hsy-lk-act.is-busy .hsy-lk-spin {
  display: inline-block; width: 13px; height: 13px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: hsy-lk-spin .6s linear infinite;
}
@keyframes hsy-lk-spin { to { transform: rotate(360deg); } }

/* Linking-specific */
.hsy-lk-intro { font: 500 14.5px/1.6 var(--hsy-font-body); color: #8C8474; margin-top: 20px; max-width: 620px; }
.hsy-lk-intro strong { color: #6B6354; }
.hsy-lk-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hsy-lk-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px;
  background: #F4ECDC; font: 700 11.5px var(--hsy-font-body); color: #6B6354;
}
.hsy-lk-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hsy-lk-statusline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hsy-lk-nolock { font-family: var(--hsy-font-mono); font-size: 12.5px; color: #B7AD99; }
.hsy-lk-dash { font-family: var(--hsy-font-mono); font-size: 12px; color: #C0B69F; }
.hsy-lk-disc {
  padding: 8px 16px; border: 1px solid #DCA493; border-radius: 10px; background: #FBF1ED;
  color: #B5482E; font: 700 12.5px var(--hsy-font-body); cursor: pointer; white-space: nowrap;
}
.hsy-lk-connect {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: flex-start;
  padding: 9px 16px; border: 1.5px dashed #B9C8B0; border-radius: 10px; background: transparent;
  color: #3F6B43; font: 700 12.5px var(--hsy-font-body); cursor: pointer; white-space: nowrap;
  transition: border-color .12s, background .12s;
}
.hsy-lk-connect:hover { border-color: #3F6B43; background: rgba(63,107,67,.06); }
/* When the property has no locks yet, let the dashed button fill the column like a drop zone */
.hsy-lk-connect--first { align-self: stretch; padding: 12px 16px; border-color: #CDBFA4; color: #6B6354; }
.hsy-lk-connect--first:hover { border-color: #3F6B43; color: #3F6B43; }
.hsy-lk-summary { font-family: var(--hsy-font-mono); margin-top: 18px; font-size: 12px; color: #A89E8C; }

/* Connect modal (reuses .hsy-rev-scrim shell) */
.hsy-lk-modal {
  width: 480px; max-width: 100%; background: #FBF6EC; border: 1px solid #EADFCB;
  border-radius: 18px; box-shadow: 0 24px 64px rgba(40,25,10,.28); padding: 24px;
}
.hsy-lk-modal-eyebrow { font-family: var(--hsy-font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #A89E8C; }
.hsy-lk-modal-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.hsy-lk-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px;
  border: 1px solid #E0D5C0; border-radius: 13px; background: #FFFDF9; cursor: pointer;
}
.hsy-lk-opt:hover { border-color: #D8CCB0; }
.hsy-lk-opt-main { flex: 1; min-width: 0; }
.hsy-lk-opt-name { font: 700 14.5px var(--hsy-font-body); color: #26221C; }
.hsy-lk-opt-sub { font: 500 12px var(--hsy-font-body); color: #9B917F; margin-top: 1px; }
.hsy-lk-modal-empty { font-family: var(--hsy-font-mono); font-size: 12.5px; color: #B7AD99; padding: 8px 2px; }
.hsy-lk-modal-actions { display: flex; justify-content: flex-end; margin-top: 18px; }

@media (max-width: 900px) {
  .hsy-lk-kpis { grid-template-columns: repeat(2, 1fr); }
  .hsy-lk-pill { min-width: 0; width: 100%; }
}

/* Settings save toast (cleaning setup) */
@keyframes dropIn { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
