 :root {
  --tomato: #a93627;
  --tomato-dark: #84291f;
  --orange: #d96a2c;
  --gold: #efbd4e;
  --gold-light: #f7df9e;
  --cream: #f6ecd4;
  --cream-deep: #ead9b7;
  --ink: #39251e;
  --green: #40583b;
  --paper: #f2e5c8;
  --display: "Rye", "Fraunces", Georgia, serif;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); background-color: var(--paper); background-image: radial-gradient(#b99d6d 0.65px, transparent 0.65px), linear-gradient(135deg, rgba(255,255,255,.18), transparent 45%); background-size: 8px 8px, auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.paper-grain { pointer-events:none; position:fixed; inset:0; z-index:10; opacity:.10; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"); }
.auth-screen { min-height:100vh; display:grid; place-items:center; padding:24px; background:var(--tomato); background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.035) 0 2px,transparent 2px 13px); }
.auth-card { width:min(100%,430px); padding:42px 38px 32px; background:var(--cream); border:3px double var(--gold); outline:1px solid rgba(255,255,255,.35); box-shadow:12px 12px 0 rgba(78,31,22,.28); text-align:center; position:relative; }
.brand-mark { color:var(--tomato); font-size:35px; }
.eyebrow { margin:0 0 10px; color:var(--tomato); font-size:10px; font-weight:700; letter-spacing:.19em; }
.auth-card h1 { margin:12px 0; color:var(--tomato); font: clamp(38px,9vw,58px)/.98 var(--display); letter-spacing:.015em; }
.auth-card h1 em { color:var(--green); font-style:normal; }
.auth-intro { color:#765b46; font-family:var(--serif); font-size:17px; }
.auth-tabs { display:flex; border-bottom:1px solid #d5c4a2; margin:26px 0 20px; }
.tab-button { flex:1; padding:11px; border:0; background:none; color:#8a7863; font-weight:700; }
.tab-button.active { color:var(--tomato); border-bottom:3px solid var(--tomato); }
.auth-card form { text-align:left; }
.auth-card label,.field-label { display:block; margin:14px 0; color:#694c3b; font-size:12px; font-weight:700; letter-spacing:.04em; }
.auth-card input,.field-label input,.field-label textarea { display:block; width:100%; margin-top:7px; padding:13px 14px; color:var(--ink); background:#fffaf0; border:1px solid #d5c3a1; border-radius:3px; outline:none; }
input:focus,textarea:focus { border-color:var(--orange) !important; box-shadow:0 0 0 3px rgba(217,106,44,.13); }
.button { border:0; padding:13px 18px; font-weight:700; letter-spacing:.025em; border-radius:3px; transition:transform .15s,filter .15s; }
.button:hover { transform:translateY(-2px); filter:brightness(1.06); }
.button-yellow { background:var(--gold); color:#5b321e; box-shadow:0 3px 0 #bd8731; }
.button-red { background:var(--tomato); color:#fff2d7; box-shadow:0 3px 0 var(--tomato-dark); }
.button span { margin-left:12px; }
.full-width { width:100%; margin-top:14px; }
.auth-footnote { margin:24px 0 0; color:#9b866a; font:italic 13px var(--serif); }
.message { min-height:18px; margin:12px 0 0; color:var(--tomato); font-size:12px; }
.app-shell { max-width:1320px; margin:0 auto; padding:0 34px 35px; }
.topbar { height:76px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(111,77,48,.24); }
.wordmark { display:flex; align-items:center; gap:10px; color:var(--tomato); text-decoration:none; font:16px var(--display); letter-spacing:.06em; }
.wordmark em { color:var(--green); font-style:normal; }
.wordmark-star { font-size:25px; color:var(--orange); }
.topbar-right { display:flex; align-items:center; gap:16px; color:#826d54; font-size:12px; }
.icon-button { width:36px; height:36px; border:1px solid #cdbb98; border-radius:50%; color:var(--tomato); background:#f8efd9; font-size:19px; }
.hero { min-height:310px; margin:26px 0 48px; padding:42px 52px; position:relative; overflow:hidden; display:flex; align-items:center; background:var(--tomato); color:var(--cream); border:5px double var(--gold); outline:1px solid var(--tomato); box-shadow:7px 7px 0 rgba(98,54,31,.14); background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.025) 0 2px,transparent 2px 12px); }
.hero-copy { position:relative; z-index:2; max-width:650px; }
.eyebrow.light { color:var(--gold-light); }
.hero h1 { margin:12px 0 12px; color:#fff0d0; font:clamp(34px,5vw,60px)/1.02 var(--display); }
.hero h1 em { color:var(--gold); font-style:normal; }
.hero-subtitle { margin:0 0 24px; color:#f5d9bd; font:17px var(--serif); }
.sunburst { position:absolute; right:12%; top:50%; transform:translateY(-50%); width:260px; height:260px; display:grid; place-items:center; border:2px solid rgba(247,223,158,.7); border-radius:50%; background:repeating-conic-gradient(from 0deg,rgba(239,189,78,.19) 0deg 8deg,transparent 8deg 16deg); }
.sunburst:before,.sunburst:after { content:""; position:absolute; inset:18px; border:1px solid rgba(247,223,158,.7); border-radius:50%; }
.sunburst:after { inset:38px; }
.sunburst span { color:var(--gold); font-size:100px; }
.hero-stamp { position:absolute; right:45px; bottom:26px; z-index:2; width:82px; height:82px; display:grid; place-content:center; border:2px solid var(--gold); border-radius:50%; color:var(--gold-light); text-align:center; font:11px/1.25 var(--display); transform:rotate(12deg); }
.library-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:18px; }
.library-heading h2,.editor-title-row h2 { margin:0; color:var(--tomato); font:clamp(27px,4vw,38px) var(--serif); }
.count-pill { display:inline-grid; place-items:center; vertical-align:middle; min-width:27px; height:27px; padding:0 7px; border-radius:50%; background:var(--gold); color:#68401e; font:12px var(--sans); }
.library-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.search-box { display:flex; align-items:center; gap:8px; width:min(340px,42vw); padding:0 12px; border:1px solid #cbb995; background:#fbf3e1; border-radius:3px; color:var(--tomato); }
.search-box span { font-size:24px; }
.search-box input { width:100%; min-width:0; padding:12px 0; border:0; outline:0; background:transparent; color:var(--ink); font-size:13px; }
.tag-filter { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 22px; }
.filter-chip,.tag-chip { display:inline-flex; align-items:center; border:1px solid #c9ad7b; border-radius:20px; padding:6px 11px; background:#f8efd9; color:#755238; font-size:11px; font-weight:700; }
.filter-chip { cursor:pointer; }
.filter-chip.active { background:var(--green); border-color:var(--green); color:#fff2d4; }
.cocktail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.cocktail-card { min-width:0; padding:20px; position:relative; background:#fbf2df; border:1px solid #d6c29a; box-shadow:3px 4px 0 rgba(111,77,48,.1); cursor:pointer; transition:transform .16s,box-shadow .16s; }
.cocktail-card:hover { transform:translateY(-3px); box-shadow:5px 7px 0 rgba(111,77,48,.14); }
.cocktail-card:before { content:""; position:absolute; top:0; left:18px; right:18px; height:4px; background:var(--card-accent,var(--orange)); }
.card-topline { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:3px 0 12px; }
.card-number { color:#a58a63; font:11px var(--display); }
.card-flower { color:var(--card-accent,var(--orange)); font-size:20px; }
.cocktail-card h3 { margin:0 0 12px; color:var(--tomato); font:23px/1.12 var(--serif); overflow-wrap:anywhere; }
.card-label { margin:0 0 7px; color:#9b7d54; font-size:9px; font-weight:700; letter-spacing:.15em; }
.ingredient-preview { margin:0; color:#5c4b3b; font-size:12px; line-height:1.8; }
.card-tags { display:flex; flex-wrap:wrap; gap:5px; margin-top:14px; }
.card-tags .tag-chip { padding:4px 8px; font-size:9px; background:#f1e2c2; border:0; }
.empty-state { padding:65px 20px; text-align:center; border:2px dashed #cbb58c; background:rgba(255,250,239,.45); }
.empty-ornament { color:var(--orange); font-size:42px; }
.empty-state h3 { margin:8px 0; color:var(--tomato); font:27px var(--serif); }
.empty-state p { color:#806b52; font:15px var(--serif); }
.page-footer { margin:55px 0 0; padding:20px; border-top:1px solid #d4c19b; color:#9c8158; text-align:center; font-size:10px; font-weight:700; letter-spacing:.2em; }
.subpage-top { padding:28px 0 16px; }
.back-link { padding:0; border:0; background:none; color:var(--tomato); font-size:12px; font-weight:700; }
.back-link:hover { text-decoration:underline; }
.editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:45px; max-width:1050px; margin:0 auto; }
.editor-main { padding:10px 0 40px; }
.editor-title-row { display:flex; justify-content:space-between; align-items:center; padding-bottom:22px; border-bottom:2px solid #d7c39b; }
.editor-sparkle { color:var(--orange); font-size:40px; }
.field-label { margin:23px 0; color:#75523b; font-size:11px; text-transform:uppercase; letter-spacing:.12em; }
.field-label input,.field-label textarea { font-size:14px; font-weight:400; letter-spacing:0; text-transform:none; resize:vertical; }
.section-heading { display:flex; align-items:baseline; justify-content:space-between; margin:32px 0 12px; padding-bottom:9px; border-bottom:1px solid #d4c19b; }
.section-heading h3 { margin:0; color:var(--tomato); font:23px var(--serif); }
.section-heading span { color:#a78b61; font-size:9px; font-weight:700; letter-spacing:.16em; }
.ingredient-labels,.ingredient-row { display:grid; grid-template-columns:66px 92px minmax(0,1fr) 30px; gap:8px; align-items:end; }
.ingredient-labels { margin-bottom:5px; color:#987c58; font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.ingredient-row { margin-bottom:9px; }
.ingredient-row input,.ingredient-row select { width:100%; min-width:0; height:42px; padding:0 9px; border:1px solid #d3c09c; border-radius:3px; background:#fff9eb; color:var(--ink); font-size:13px; }
.ingredient-row .amount-input { text-align:center; }
.remove-ingredient { height:40px; border:0; background:transparent; color:var(--tomato); font-size:20px; }
.add-ingredient { margin-top:5px; padding:8px 0; border:0; background:none; color:var(--tomato); font-size:12px; font-weight:700; }
.spaced-field { margin-top:27px; }
.tag-combobox { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:7px; min-height:49px; margin-top:7px; padding:7px 9px; border:1px solid #d5c3a1; background:#fffaf0; border-radius:3px; }
.tag-combobox:focus-within { border-color:var(--orange); box-shadow:0 0 0 3px rgba(217,106,44,.13); }
.tag-combobox input { flex:1; min-width:160px; margin:0; padding:5px; border:0; outline:0; background:transparent; box-shadow:none; font-size:13px; }
.selected-tag { display:inline-flex; align-items:center; gap:7px; padding:6px 9px; border-radius:18px; background:#40583b; color:#fff1d0; font-size:10px; font-weight:700; }
.selected-tag button { padding:0; border:0; background:none; color:#ffe3a2; font-size:14px; }
.tag-options { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:5; max-height:220px; overflow:auto; padding:5px; border:1px solid #cbb58c; background:#fff9e9; box-shadow:0 8px 18px rgba(70,45,25,.16); }
.tag-option { display:block; width:100%; padding:10px; border:0; background:transparent; color:#5c4534; text-align:left; font-size:12px; }
.tag-option:hover { background:#f1e2c2; }
.tag-option.create { color:var(--tomato); font-weight:700; border-top:1px solid #e4d4b5; }
.field-hint { margin:6px 0 0; color:#9b8465; font-size:10px; text-transform:none; letter-spacing:0; font-weight:400; }
.form-actions { display:flex; align-items:center; gap:20px; margin-top:30px; }
.text-button { padding:8px 0; border:0; background:none; font-size:12px; font-weight:700; }
.danger-text { color:#a93627; }
.editor-aside { padding-top:35px; }
.aside-card { position:sticky; top:25px; padding:27px 23px; background:var(--green); color:#f7e6bd; border:4px double var(--gold); outline:1px solid var(--green); background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.025) 0 1px,transparent 1px 9px); }
.aside-star { color:var(--gold); font-size:32px; }
.aside-card h3 { margin:15px 0; font:29px/1.1 var(--display); }
.aside-card h3 em { color:var(--gold); font-style:normal; }
.aside-card p { color:#e7d8b7; font:14px/1.7 var(--serif); }
.aside-rule { height:1px; margin:24px 0 15px; background:var(--gold); }
.aside-small { color:var(--gold-light); font-size:8px; letter-spacing:.13em; }
.detail-card { max-width:850px; margin:10px auto 45px; padding:clamp(24px,5vw,55px); background:#fbf2df; border:5px double #d1ad62; box-shadow:7px 7px 0 rgba(111,77,48,.12); }
.detail-kicker { color:var(--orange); font-size:10px; font-weight:700; letter-spacing:.2em; }
.detail-card h1 { margin:12px 0 18px; color:var(--tomato); font:clamp(34px,6vw,54px)/1.05 var(--serif); overflow-wrap:anywhere; }
.detail-tags { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:28px; }
.detail-section { margin-top:28px; padding-top:19px; border-top:1px solid #d9c7a3; }
.detail-section h3 { margin:0 0 13px; color:var(--tomato); font:22px var(--serif); }
.detail-ingredient { display:grid; grid-template-columns:80px 90px 1fr; gap:12px; padding:9px 0; border-bottom:1px dotted #d9c7a3; color:#554333; font-size:14px; }
.detail-ingredient .amount { font-weight:700; color:#8a5a32; }
.detail-copy { white-space:pre-wrap; color:#594936; font:15px/1.8 var(--serif); }
.detail-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:32px; }
.toast { position:fixed; left:50%; bottom:24px; z-index:20; transform:translate(-50%,20px); opacity:0; pointer-events:none; padding:12px 18px; border:1px solid var(--gold); background:var(--green); color:#fff1d0; font-size:12px; box-shadow:0 5px 20px rgba(0,0,0,.2); transition:.2s; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:850px) {
  .app-shell { padding:0 20px 25px; }
  .hero { padding:35px 32px; }
  .sunburst { right:4%; opacity:.65; }
  .cocktail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .editor-layout { grid-template-columns:minmax(0,1fr); }
  .editor-aside { display:none; }
}
@media (max-width:560px) {
  .app-shell { padding:0 14px 22px; }
  .topbar { height:62px; }
  .wordmark { font-size:12px; }
  .member-label { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .hero { min-height:280px; margin:16px 0 34px; padding:28px 22px; }
  .hero h1 { font-size:35px; max-width:330px; }
  .hero-subtitle { max-width:240px; font-size:14px; }
  .sunburst { width:155px; height:155px; right:-45px; top:28%; opacity:.4; }
  .sunburst span { font-size:65px; }
  .hero-stamp { width:65px; height:65px; right:18px; bottom:15px; font-size:8px; }
  .library-heading { align-items:stretch; flex-direction:column; }
  .library-tools { width:100%; }
  .search-box { flex:1; width:auto; }
  .library-tools .button { padding:12px; }
  .cocktail-grid { grid-template-columns:1fr; gap:12px; }
  .cocktail-card { padding:17px; }
  .cocktail-card h3 { font-size:21px; }
  .page-footer { margin-top:35px; font-size:8px; }
  .auth-card { padding:32px 22px 25px; }
  .ingredient-labels,.ingredient-row { grid-template-columns:55px 78px minmax(0,1fr) 25px; gap:5px; }
  .ingredient-row input,.ingredient-row select { padding:0 5px; font-size:12px; }
  .ingredient-labels { font-size:8px; letter-spacing:.04em; }
  .remove-ingredient { font-size:17px; }
  .detail-ingredient { grid-template-columns:60px 75px 1fr; gap:7px; font-size:12px; }
  .detail-card { padding:22px 17px; }
  .form-actions { flex-wrap:wrap; }
}

/* Password recovery */
.forgot-password { display:block; margin:8px auto 0; color:var(--tomato); text-decoration:underline; text-underline-offset:3px; }
.forgot-password:disabled { opacity:.55; cursor:wait; }
#password-recovery-form { margin-top:18px; }
#password-recovery-form .button { margin-top:8px; }

/* Cocktail Notebook styling refinements */
.app-shell { padding-top: 0; }

.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 180px;
  margin-top: 0;
  margin-bottom: 28px;
  padding: 36px max(40px, calc((100vw - 1320px) / 2 + 34px));
  border: 0;
  outline: 0;
  box-shadow: none;
}

.hero-copy {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 0;
  color: #fff0d0;
  font: clamp(28px, 3.5vw, 42px)/1.1 var(--display);
}

.hero-copy .button {
  flex: 0 0 auto;
  padding: 15px 24px;
}

.sunburst {
  width: 170px;
  height: 170px;
  right: 9%;
  opacity: .65;
}

.sunburst span { font-size: 75px; }

.library-heading {
  align-items: center;
  margin-bottom: 16px;
}

.library-heading h2 { white-space: nowrap; }

#cocktail-count { font: inherit; color: inherit; }

.library-tools { gap: 9px; }

.card-topline { justify-content: flex-end; margin-bottom: 8px; }

.ingredient-preview {
  display: grid;
  gap: 3px;
  line-height: 1.45;
}

.detail-kicker { display: none; }

.detail-actions .button {
  padding: 9px 13px;
  font-size: 12px;
}

@media (max-width: 850px) {
  .hero {
    min-height: 150px;
    padding: 28px 32px;
    margin-bottom: 22px;
  }

  .sunburst { width: 125px; height: 125px; }
}

@media (max-width: 560px) {
  .hero {
    min-height: 150px;
    margin-bottom: 18px;
    padding: 24px 20px;
  }

  .hero-copy {
    gap: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h1 { font-size: 25px; }

  .hero-copy .button {
    padding: 12px 18px;
    font-size: 12px;
  }

  .sunburst {
    width: 105px;
    height: 105px;
    right: -22px;
    top: 50%;
    opacity: .35;
  }

  .library-heading { gap: 12px; }
  .library-heading h2 { white-space: normal; }
}


.signout-button {
  display: inline-block;
  width: auto;
  white-space: nowrap;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

#cocktail-detail .detail-section:nth-of-type(n+2) {
  border-top: none;
}

.notes-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}

.notes-heading h3 {
  margin: 0;
}

.notes-heading .text-button {
  color: var(--tomato);
  font-size: 11px;
  text-decoration: underline;
}

#notes-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #d3c09c;
  border-radius: 3px;
  background: #fff9eb;
  color: var(--ink);
  font: 15px/1.6 var(--serif);
  resize: vertical;
}

.notes-edit-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}