/* barfriender: speakeasy. Dark warm ground, brass accent, cream text. */
:root {
  --bg: #15110d; --panel: #1f1913; --chip: #2a221a; --line: #3a2f24;
  --fg: #f1e7d3; --muted: #b3a385; --faint: #8f826b;
  --brass: #d4ad5c; --brass-text: #e9c97f;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "Jost", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans); }
a { color: var(--brass); }
a:hover { color: var(--fg); }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
[hidden] { display: none !important; }

/* header + nav */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px;
             border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 36px; }
.wordmark { font: italic 500 32px/1 var(--serif); color: var(--brass); text-decoration: none; }
nav { display: flex; gap: 24px; }
.label, nav a { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
nav a { padding-bottom: 4px; border-bottom: 2px solid transparent; }
nav a[aria-current="page"] { color: var(--fg); border-color: var(--brass); }
#account { font-size: 14px; color: var(--muted); }

/* layout: main + explore panel (side on desktop, bottom sheet on phone) */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); }
main { width: 100%; max-width: 860px; margin: 0 auto; padding: 28px 24px 120px; display: flex; flex-direction: column; gap: 18px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); font-size: 14px; } .ok { color: var(--brass-text); }
#search { width: 100%; height: 52px; padding: 0 18px; font-size: 17px; }
.combo { position: relative; }
#matches { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  max-height: min(320px, 45vh); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgb(0 0 0 / .45); }
#matches li { padding: 12px 14px; border-radius: 8px; cursor: pointer; }
#matches li[aria-selected="true"], #matches li:hover { background: var(--chip); color: var(--brass-text); }

/* chips; s2 = recommended, plain = pairs well */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
        border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 15px; }
.chip:hover { border-color: var(--brass); }
.s2 { border: 1.5px solid var(--brass); color: var(--brass-text); font-weight: 600; }
.chip small { color: var(--faint); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.chip.more { border-style: dashed; color: var(--brass); }
/* read-only groups under the mix: [rum + limes] [mint + sugar] */
.bubbles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0; }
.bubbles .label { margin-right: 4px; }
.bubble { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px;
          border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.bubbles.ok .bubble { border-color: var(--brass); color: var(--brass-text); }
.btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--brass); }
.btn.primary { background: var(--brass); border-color: var(--brass); color: var(--bg); font-weight: 600; }
.link { background: none; border: 0; padding: 0; color: var(--brass); }

/* the mix */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.mixrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 500; }
.pill.on { background: var(--brass); }
.pill button { border: 0; background: transparent; color: inherit; min-height: 40px; }
.pill .name { padding: 0 4px 0 16px; }
.pill .x { width: 36px; color: #4a3d2e; }
.amounts .item { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--chip); padding-top: 10px; }
.amounts .item span { flex: 1; }
.amounts input { width: 110px; height: 40px; padding: 0 10px; text-align: right; background: var(--bg); }
#notes, #mixName { width: 100%; padding: 10px 12px; background: var(--bg); }
.actions { display: flex; gap: 10px; }

/* suggestion groups */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--muted); }
.filter label, .switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.filter input, .switch input { accent-color: var(--brass); width: 18px; height: 18px; }
.group { border-top: 1px solid var(--chip); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.group h3 { font-size: 20px; font-weight: 500; }
.group h3 small { font: 13px var(--sans); color: var(--faint); margin-left: 8px; }
.group.all h3 { color: var(--brass-text); }
.group.only h3 { color: var(--muted); }

/* explore panel */
#panel { background: var(--panel); display: flex; flex-direction: column; gap: 16px; padding: 24px; overflow-y: auto; }
#panel .close { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
#panel h2 { font-size: 38px; line-height: 1; }
.combos a { display: block; font: italic 500 19px/1.5 var(--serif); color: var(--fg); text-decoration: none; }
.combos a:hover { color: var(--brass); }
@media (min-width: 960px) {
  .layout.open { grid-template-columns: minmax(0, 1fr) 420px; }
  #panel { position: sticky; top: 0; height: 100vh; border-left: 1px solid var(--line); }
}
@media (max-width: 959px) {
  #panel { position: fixed; left: 0; right: 0; bottom: 0; max-height: 78vh; border-top: 1px solid var(--line);
           border-radius: 22px 22px 0 0; box-shadow: 0 -18px 40px rgb(0 0 0 / .5); z-index: 5; }
  #panel::before { content: ""; align-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
  .actions.sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px 18px; background: var(--bg);
                    border-top: 1px solid var(--line); z-index: 4; }
  .actions.sticky .btn { flex: 1; min-height: 48px; }
  .actions.sticky .btn.primary { flex: 2; }
}

/* toast + dialogs + saved list */
#toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); display: flex; gap: 16px; align-items: center;
         padding: 12px 20px; border-radius: 999px; background: var(--fg); color: var(--bg); box-shadow: 0 10px 30px rgb(0 0 0 / .45); z-index: 6; max-width: calc(100vw - 32px); }
#toast button { border: 0; background: none; color: #7a5418; font-weight: 600; }
dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--fg); padding: 22px; }
dialog::backdrop { background: rgb(0 0 0 / .55); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack input { height: 46px; padding: 0 14px; background: var(--bg); }
.err { color: #e8907a; min-height: 1em; font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.saved { display: block; text-decoration: none; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.saved:hover { border-color: var(--brass); color: var(--fg); }
.saved .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.saved h2 { font-size: 24px; }
.tabs button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* menus */
.tight { margin: 6px 0; }
.grow { flex: 1; min-width: 200px; height: 46px; padding: 0 14px; }
.row.between { justify-content: space-between; border-top: 1px solid var(--chip); padding-top: 10px; }
select { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; height: 38px; padding: 0 10px; }
.picks { max-height: 50vh; overflow-y: auto; }
.pick { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.pick input { accent-color: var(--brass); width: 18px; height: 18px; }

/* offline banner, footer, destructive button */
.banner { background: #3a2216; border-bottom: 1px solid #6b3a22; color: #f3c9a8; padding: 10px 24px; font-size: 14px; text-align: center; }
.foot { text-align: center; padding: 0 24px 32px; font-size: 13px; }
.foot a { color: var(--faint); }
.btn.danger { border-color: #8a4a3a; color: #e8907a; }
.prose { max-width: 680px; line-height: 1.7; }
.prose textarea { width: 100%; padding: 12px 14px; background: var(--bg); line-height: 1.5; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.prose h2 { font-size: 24px; margin-top: 8px; }
.prose ul { margin: 0; padding-left: 20px; }
