/* Ava Cyril menu editor, dressed like the menu itself: ivory paper, dark green ink, gold rules, the flag along the top. */
@font-face { font-family: Pag; src: url(/assets/fonts/pagella-regular.ttf); }
@font-face { font-family: Pag; font-style: italic; src: url(/assets/fonts/pagella-italic.ttf); }
@font-face { font-family: Pag; font-weight: 700; src: url(/assets/fonts/pagella-bold.ttf); }
:root { --paper: #FAF6EC; --ink: #17352A; --muted: #56675D; --green: #14362A; --gold: #B08D4C; --gold-l: #E2C489; --red: #B2362A; --hair: rgba(23, 53, 42, .22); --panel: rgba(150, 122, 60, .10); }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 18px/1.42 Pag, Georgia, "Times New Roman", serif; font-feature-settings: "lnum"; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.flag { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 6px; display: flex; }
.flag i { flex: 1; background: #46A66E; } .flag i:nth-child(2) { background: #F7F1E3; } .flag i:nth-child(3) { background: #D5412F; }
.flag::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .2)); }

.wm { letter-spacing: .16em; margin-right: -.16em; line-height: 1; }
.rule { display: flex; align-items: center; gap: 12px; }
.rule .ln { flex: 1; height: 1px; background: var(--gold); }
.rule .dm { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: none; }
.rule span { font-variant-caps: all-small-caps; letter-spacing: .3em; margin-right: -.3em; font-size: 15px; }

.primary { background: var(--green); color: #F7F1E3; border: 1px solid var(--green); padding: 10px 22px; letter-spacing: .04em; }
.primary:hover:not(:disabled) { background: #1d4a3a; }
.primary:disabled { opacity: .45; cursor: default; }
.plain { background: none; border: 1px solid var(--hair); padding: 9px 18px; }
.plain:hover { border-color: var(--gold); }

/* ── log in ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--green); }
.card { width: min(420px, 100%); background: var(--paper); padding: 44px 40px 38px; display: flex; flex-direction: column; gap: 14px; outline: 1px solid var(--gold-l); outline-offset: 7px; }
.card .wm { font-size: 34px; text-align: center; }
.card .rule { margin: 4px 0 18px; }
.card label { font-style: italic; color: var(--muted); }
.card input { border: 0; border-bottom: 1px solid var(--ink); background: none; padding: 8px 2px; font-size: 19px; }
.card .primary { margin-top: 12px; padding: 13px 22px; font-size: 19px; }
.card .showpw { display: flex; align-items: center; gap: 8px; font-size: 16px; cursor: pointer; }
.card .showpw input { width: 18px; height: 18px; accent-color: var(--green); border: 0; padding: 0; }
.err { color: var(--red); font-style: italic; margin: 0; }

/* ── top bar ── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 20px 28px 14px; background: var(--green); color: #F7F1E3; border-bottom: 2px solid var(--gold-l); }
.top .brand { display: flex; align-items: baseline; gap: 18px; flex: 1; min-width: 0; }
.top .wm { font-size: 27px; }
.top .strap { font-style: italic; color: var(--gold-l); white-space: nowrap; }
.top .state { font-style: italic; color: #C5CDBD; text-align: right; }
.top .state.dirty { color: var(--gold-l); }
.top .wm { white-space: nowrap; }
.top .primary { background: var(--gold-l); border-color: var(--gold-l); color: var(--green); font-weight: 700; }
.top .primary:disabled { background: none; color: var(--gold-l); opacity: .5; }
.top .primary { padding: 12px 26px; font-size: 19px; }
.top .acts { display: flex; align-items: center; gap: 10px; }
.top .undo { background: none; border: 1px solid rgba(247, 241, 227, .45); color: #F7F1E3; padding: 12px 18px; }
.top .undo:hover { border-color: var(--gold-l); color: var(--gold-l); }
.top .primary:hover:not(:disabled) { background: #F0D9A8; }

/* ── layout ── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; max-width: 1320px; margin: 0 auto; }
.side { position: sticky; top: 86px; margin: 18px 0 18px 24px; padding: 12px 16px 12px; background: var(--panel); max-height: calc(100vh - 100px); overflow: auto; font-size: 16px; line-height: 1.25; }
@media (max-height: 740px) and (min-width: 881px) { .side { position: static; max-height: none; } }
.side h2 { font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: .2em; font-size: 13.5px; color: var(--muted); margin: 9px 0 3px; border-bottom: 1px solid var(--gold); padding-bottom: 3px; }
.side h2:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li button, .side li a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 1.5px 4px; color: var(--ink); text-decoration: none; }
.side li button:hover, .side li a:hover { color: var(--red); }
#nav button { font-style: italic; font-size: 17.5px; }
#nav button small { font-style: normal; font-size: 13px; color: var(--muted); }
#nav button[aria-current="true"] { color: var(--red); }
#nav button[aria-current="true"]::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); flex: none; align-self: center; margin-right: 2px; order: -1; }
#nav button span { flex: 1; }
.work { padding: 30px 36px 90px; min-width: 0; }

#notice { position: sticky; top: 96px; z-index: 10; margin: 0 0 22px; padding: 14px 18px; border-left: 5px solid var(--gold); background: #F1EADA; box-shadow: 0 6px 18px rgba(23, 53, 42, .14); font-size: 19px; }
#notice.bad { border-color: var(--red); background: #FBEDE6; color: #7A1E12; }
#notice.good { border-color: #3B7D4F; background: #E9F0E3; }
#notice ul { margin: 6px 0 0; padding-left: 20px; }

/* ── a section, laid out like its menu page ── */
.shead { text-align: center; margin-bottom: 26px; }
.shead .rule { gap: 16px; }
.shead .rule input { font-style: italic; font-size: 50px; line-height: 1.05; text-align: center; width: min(520px, 60vw); }
.shead .it { font-style: italic; color: var(--red); text-align: center; width: 320px; max-width: 100%; margin-top: 4px; }
.meta { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 760px; margin: 14px auto 0; text-align: left; }
.field { display: grid; grid-template-columns: 190px 1fr; align-items: baseline; gap: 12px; }
.field > span { font-variant-caps: all-small-caps; letter-spacing: .12em; font-size: 14.5px; color: var(--muted); }

/* text you can click and type in: it looks like the menu until you hover or focus */
.ed { border: 0; border-bottom: 1px dotted rgba(23, 53, 42, .28); background: none; padding: 2px 3px; width: 100%; min-width: 0; resize: none; overflow: hidden; }
.ed:hover { border-bottom: 1px solid var(--gold); background: rgba(255, 255, 255, .45); }
.ed[readonly] { border-bottom-color: transparent; background: none; }
.ed:focus { outline: none; border-bottom: 1px solid var(--gold); background: rgba(255, 255, 255, .6); }
.ed::placeholder { color: #9aa59d; font-style: italic; }
.ed[aria-invalid="true"] { border-bottom: 1px solid var(--red); background: #FBEDE6; }

.dishes { max-width: 760px; margin: 0 auto; }
.how { max-width: 760px; margin: 0 auto 6px; text-align: center; font-style: italic; color: var(--muted); font-size: 16.5px; }
.dish { display: grid; grid-template-columns: 34px minmax(0, 1fr) 96px 72px; column-gap: 10px; padding: 14px 0 12px; border-bottom: 1px solid var(--hair); }
.dish .mv { grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.icon-btn { width: 32px; height: 28px; padding: 0; background: none; border: 1px solid transparent; color: var(--muted); line-height: 1; font-size: 13px; }
.icon-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--ink); }
.icon-btn:disabled { opacity: .25; cursor: default; }
.dish .nm { font-size: 21px; }
.dish .pr { font-size: 21px; text-align: right; font-feature-settings: "tnum", "lnum"; }
.dish .ds { grid-column: 2 / span 2; font-style: italic; color: var(--muted); margin-top: 2px; }
.dish .rm { grid-row: 1; grid-column: 4; align-self: start; margin-top: 5px; background: none; border: 0; border-bottom: 1px solid transparent; padding: 2px 0; font-size: 15px; font-style: italic; color: var(--muted); text-align: right; justify-self: end; }
.dish .rm:hover { color: var(--red); border-bottom-color: var(--red); }
.dish .opts { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px 5px 9px; border: 1px solid var(--hair); background: none; font-size: 15px; color: var(--muted); border-radius: 999px; }
.chip svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #F7F1E3; }
.chip.veg[aria-pressed="true"] { background: #3B7D4F; border-color: #3B7D4F; }
.chip.out[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.chip:hover { border-color: var(--gold); }
.opts .lab { flex: 1 1 200px; font-size: 15.5px; font-style: italic; color: var(--red); }
.add { display: block; margin: 22px auto 0; background: none; border: 1px dashed var(--gold); padding: 12px 30px; font-style: italic; font-size: 19px; }
.add:hover { background: var(--panel); }
.contains { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── drinks ── */
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 44px; }
.group { margin-bottom: 30px; }
.group h3 { margin: 0; }
.group .gt { font-style: italic; font-size: 27px; border-bottom: 1px solid var(--gold); padding-bottom: 4px; }
.group .gn { font-style: italic; color: var(--muted); font-size: 15px; margin: 4px 0 6px; }
.drink { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, .42fr) 56px 56px 24px; column-gap: 6px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--hair); }
.drink.one { grid-template-columns: 26px minmax(0, 1fr) minmax(0, .42fr) 56px 24px; }
.drink .mv { display: flex; gap: 0; }
.drink .mv .icon-btn { width: 13px; height: 26px; border: 0; font-size: 11px; }
.drink > .icon-btn { width: 24px; }
.drink .ex { font-style: italic; color: var(--muted); font-size: 15px; }
.drink .pr { text-align: right; font-feature-settings: "tnum", "lnum"; }
.drink.heading .hd { grid-column: 2 / -2; font-style: italic; color: var(--red); }
.sizes { display: grid; grid-template-columns: 26px 1fr .42fr 56px 56px 24px; column-gap: 6px; font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--muted); font-size: 14px; text-align: right; }
.group .adds { display: flex; gap: 8px; margin-top: 10px; }
.group .adds button { background: none; border: 1px dashed var(--gold); padding: 5px 12px; font-style: italic; font-size: 15px; }

/* ── dialog ── */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 54, 42, .55); display: grid; place-items: center; padding: 20px; }
.sheet { width: min(560px, 100%); max-height: 86vh; overflow: auto; background: var(--paper); padding: 30px 32px 26px; outline: 1px solid var(--gold-l); outline-offset: 6px; }
.sheet h3 { margin: 0 0 14px; font-weight: 400; font-style: italic; font-size: 30px; }
.sheet ul { padding-left: 20px; margin: 8px 0; }
.sheet .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.versions button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--hair); padding: 9px 4px; }
.versions button:hover { color: var(--red); }

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; margin: 12px 12px 0; max-height: none; padding: 12px 14px; }
  .side ul { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .side li button, .side li a { width: auto; padding: 4px 10px; border: 1px solid var(--hair); border-radius: 999px; background: var(--paper); }
  #nav button small { margin-left: 4px; }
  #nav button[aria-current="true"] { border-color: var(--red); }
  #nav button[aria-current="true"]::before { display: none; }
  .work { padding: 18px 16px 80px; }
  .groups { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; padding: 16px 14px 10px; gap: 6px 12px; }
  .top .wm { font-size: 21px; }
  .top .state { order: 3; flex-basis: 100%; text-align: left; font-size: 15px; }
  .top .primary { padding: 7px 16px; }
  .dish { grid-template-columns: 30px minmax(0, 1fr) 62px 58px; column-gap: 6px; }
  .top .primary { font-size: 17px; }
  .top .undo { padding: 7px 10px; font-size: 15px; }
  #notice { top: 104px; font-size: 17px; }
  .dish .nm, .dish .pr { font-size: 19px; }
  .top .strap { display: none; }
  .field { grid-template-columns: 1fr; gap: 2px; }
  .shead .rule input { font-size: 36px; }
}

/* ── guided tour ── */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour-block { position: absolute; inset: 0; }
.tour-hole { position: absolute; border-radius: 6px; box-shadow: 0 0 0 200vmax rgba(14, 38, 30, .72); outline: 2px solid var(--gold-l); outline-offset: 0; pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s; }
.tour-card { position: absolute; background: var(--paper); padding: 24px 26px 20px; outline: 1px solid var(--gold-l); outline-offset: 5px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); transition: left .25s, top .25s; }
.tour-step { margin: 0 0 4px; font-style: italic; color: var(--red); font-size: 16px; }
.tour-card h3 { margin: 0 0 10px; font-weight: 400; font-style: italic; font-size: 30px; line-height: 1.15; }
.tour-text { margin: 0; font-size: 19px; line-height: 1.45; }
.tour-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.tour-actions span { flex: 1; }
.tour-actions .primary, .tour-actions .plain { padding: 11px 22px; font-size: 18px; }
.tour-skip { background: none; border: 0; padding: 4px 0; font-style: italic; color: var(--muted); border-bottom: 1px solid var(--hair); font-size: 16px; }
.tour-skip:hover { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } }
