:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --panel: #11110f;
  --panel-raised: #161613;
  --line: #2a2924;
  --gold: #d2ad68;
  --gold-bright: #e2c27f;
  --text: #f2f0e9;
  --muted: #96938a;
  --danger: #d98b82;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 85% 0%, #272014 0, transparent 34rem), var(--bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.topbar { height: 76px; padding: 0 clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(11,11,10,.93); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand strong { display: block; font: 500 12px/1.1 Georgia, serif; letter-spacing: .21em; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .19em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.connection-state { color: var(--muted); font-size: 12px; }
.connection-state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: #625f57; }
.connection-state.is-live::before { background: #91b57a; box-shadow: 0 0 10px #91b57a88; }
.icon-button, .text-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--text); cursor: pointer; font-size: 12px; }
.icon-button:hover, .text-button:hover { border-color: var(--gold); }
main { width: min(1280px, calc(100% - 36px)); margin: 0 auto; }
.login-panel { width: min(470px, 100%); margin: clamp(60px, 11vh, 120px) auto; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); background: linear-gradient(145deg, #151411, #0f0f0d 68%); box-shadow: 0 24px 80px #0008; }
.eyebrow { margin: 0 0 17px; color: var(--gold); font-size: 10px; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font: 400 clamp(36px, 5vw, 55px)/1.04 Georgia, serif; letter-spacing: -.03em; }
h1 em { color: var(--gold-bright); font-weight: 400; }
.intro-copy { max-width: 550px; margin-bottom: 27px; color: #b3b0a6; font-size: 14px; line-height: 1.75; }
.login-form { display: grid; gap: 11px; }
.login-form label { color: #d4d0c6; font-size: 12px; }
.login-form input, #inquiry-search { min-height: 46px; width: 100%; padding: 0 13px; border: 1px solid #36342e; border-radius: 3px; outline: none; background: #0a0a09; color: var(--text); }
.login-form input:focus, #inquiry-search:focus { border-color: var(--gold); box-shadow: 0 0 0 2px #d2ad6822; }
.gold-button { min-height: 48px; margin-top: 5px; border: 1px solid var(--gold); border-radius: 3px; background: var(--gold); color: #19150d; cursor: pointer; font-size: 13px; font-weight: 650; }
.gold-button:hover { background: var(--gold-bright); }
.gold-button:disabled { opacity: .6; cursor: wait; }
.privacy-note { margin: 23px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.privacy-note span { margin-right: 7px; color: var(--gold); font-size: 9px; }
.error-message { min-height: 18px; margin: 3px 0 0; color: var(--danger); font-size: 12px; line-height: 1.5; }
.inbox-panel { padding: 42px 0 28px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 4px 27px; }
.page-heading h1 { margin-bottom: 10px; }
.page-heading .intro-copy { margin: 0; }
.count-card { min-width: 100px; padding: 13px 17px; border: 1px solid var(--line); text-align: center; }
.count-card strong { display: block; color: var(--gold-bright); font: 400 30px/1 Georgia, serif; }
.count-card span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.workspace { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); min-height: 540px; border: 1px solid var(--line); background: var(--panel); }
.inquiry-list-panel { min-width: 0; border-right: 1px solid var(--line); }
.list-toolbar { padding: 14px; border-bottom: 1px solid var(--line); }
#inquiry-search { min-height: 39px; font-size: 12px; }
.inquiry-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; }
.inquiry-tab { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 3px; background: #0d0d0b; color: var(--muted); cursor: pointer; font-size: 11px; }
.inquiry-tab[aria-selected="true"] { border-color: #675637; background: #211d14; color: var(--gold-bright); }
.tab-count { min-width: 19px; padding: 2px 5px; border-radius: 10px; background: #25231e; color: inherit; font-size: 9px; text-align: center; }
.inquiry-tab[aria-selected="true"] .tab-count { background: #4a3d27; }
.list-subhead { display: flex; justify-content: space-between; gap: 10px; margin: 17px 1px 0; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
#last-updated { font-size: 9px; letter-spacing: 0; text-align: right; }
.inquiry-list { max-height: 660px; overflow: auto; }
.inquiry-date-group + .inquiry-date-group { border-top: 1px solid var(--line); }
.date-group-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 14px 9px; border-bottom: 1px solid #26241f; background: var(--panel); color: var(--gold); font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.date-group-count { flex: none; color: var(--muted); font-size: 9px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.inquiry-row { width: 100%; padding: 17px 16px; border: 0; border-bottom: 1px solid #22211d; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.inquiry-row:hover { background: #191813; }
.inquiry-row.is-selected { background: #211d14; box-shadow: inset 2px 0 var(--gold); }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-name { overflow: hidden; color: var(--text); font: 400 17px/1.25 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.row-new, .row-history { flex: none; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.row-new { color: var(--gold); }
.row-history { color: var(--muted); }
.row-meta, .row-mobile { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.row-mobile { color: #c1bfb7; }
.detail-panel { min-width: 0; padding: clamp(20px, 3vw, 35px); }
.detail-empty, .empty-state { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.detail-mark { width: 55px; height: 55px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid #51432b; border-radius: 50%; color: var(--gold); font: 23px Georgia, serif; }
.detail-empty h2, .empty-state h2 { margin-bottom: 8px; font: 400 24px Georgia, serif; }
.detail-empty p, .empty-state p { max-width: 280px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-icon { margin-bottom: 12px; color: var(--gold); font-size: 25px; }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-heading h2 { margin: 0 0 6px; font: 400 clamp(23px, 3vw, 31px)/1.15 Georgia, serif; }
.detail-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.detail-date { color: var(--gold); font-size: 11px; text-align: right; white-space: nowrap; }
.detail-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.section-title { margin: 0 0 14px; color: var(--gold); font-size: 9px; letter-spacing: .16em; }
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid #302d25; background: var(--panel-raised); }
.contact-card strong { display: block; margin-bottom: 5px; font: 400 16px Georgia, serif; }
.contact-card a { color: #c5c1b6; font-size: 12px; text-decoration-color: #756d5a; text-underline-offset: 3px; }
.call-button, .history-button, .delete-button { min-height: 36px; padding: 0 12px; border: 1px solid #675637; border-radius: 3px; color: var(--gold-bright); background: transparent; text-decoration: none; font-size: 11px; white-space: nowrap; }
.call-button { display: inline-flex; align-items: center; }
.history-button { cursor: pointer; }
.history-button:hover { background: #211d14; }
.delete-button { border-color: #4a2d29; color: var(--danger); cursor: pointer; }
.facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 24px; }
.fact-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.fact-value { color: var(--text); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.fact-value a { color: var(--gold-bright); text-underline-offset: 3px; }
.idea-copy { margin: 0; color: #d5d1c7; font: 15px/1.8 Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-card { overflow: hidden; border: 1px solid var(--line); background: #0a0a09; }
.photo-preview { width: 100%; height: 130px; display: block; object-fit: cover; background: #151411; }
.photo-loading { height: 130px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.photo-meta { padding: 9px; }
.photo-meta span { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.photo-meta a { display: inline-block; margin-top: 8px; color: var(--gold-bright); font-size: 10px; text-underline-offset: 3px; }
.detail-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 19px; }
.footer-note { margin: 13px 3px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.footer-note strong { color: #d5d0c2; font-weight: 500; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .topbar { height: 66px; padding-inline: 15px; }
  .brand img { width: 31px; height: 31px; }
  .connection-state { font-size: 10px; }
  .top-actions { gap: 8px; }
  main { width: calc(100% - 24px); }
  .inbox-panel { padding-top: 29px; }
  .page-heading { align-items: center; padding-inline: 1px; }
  .page-heading h1 { font-size: 39px; }
  .page-heading .intro-copy { max-width: 310px; font-size: 12px; }
  .count-card { min-width: 72px; padding: 11px 8px; }
  .workspace { grid-template-columns: 1fr; }
  .inquiry-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .inquiry-list { max-height: 320px; }
  .detail-panel { min-height: 420px; }
  .detail-empty, .empty-state { min-height: 300px; }
}
@media (max-width: 450px) {
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 34px; }
  .page-heading .intro-copy { font-size: 11px; line-height: 1.55; }
  .count-card { margin-top: 32px; }
  .contact-card { align-items: flex-start; flex-direction: column; }
  .facts-grid { grid-template-columns: 1fr; gap: 13px; }
  .detail-heading { flex-direction: column; }
  .detail-date { text-align: left; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
