/* pilspivo.cz — decentní Plzeňský styl
 * Paper cream + Plzeň green + měděné akcenty. */

:root {
  --paper:        #f4ecd6;
  --paper-deep:   #ecdfbe;
  --ink:          #1c1a14;
  --ink-soft:     #4a4536;
  --muted:        #807a66;
  --rule:         #c9b98b;
  --green:        #0f4d2e;
  --green-deep:   #0a3a22;
  --green-soft:   #2f7f57;
  --gold:         #a0741a;
  --gold-soft:    #c69a3a;
  --red:          #8a2a1e;
  --shadow:       0 1px 0 rgba(0,0,0,0.04);
}

* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.about { padding: 8px 0 32px; max-width: 640px; }
.about h1 {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 600; font-size: clamp(28px, 6vw, 38px);
  margin: 14px 0 18px; color: var(--green);
}
.about p { margin: 0 0 14px; line-height: 1.65; }
.about .lead { font-size: 18px; color: var(--ink); }
html { background: var(--paper); }
img, svg { max-width: 100%; }
body {
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, #fff8e2 0%, transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px; }

/* ============ Header ============ */
.site { padding: 12px 0 0; }
.header-inner {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 12px;
}
.brand {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 700; font-size: clamp(28px, 6vw, 36px);
  color: var(--green); letter-spacing: .3px; line-height: 1;
}
.brand:hover { text-decoration: none; color: var(--green-deep); }
.brand-thin { font-weight: 500; letter-spacing: -2px; }

.header-nav {
  display: flex; align-items: baseline; gap: 0;
  font-size: 12px; color: var(--muted); letter-spacing: 1.6px;
  text-transform: uppercase;
}
.header-nav .about-link { color: var(--muted); }
.header-nav .about-link:hover { color: var(--green); }
.header-nav .nav-sep { margin: 0 8px; color: var(--rule); }

.lang { font-size: inherit; color: inherit; letter-spacing: inherit; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--green); }
.lang .lang-on { color: var(--ink); font-weight: 600; }
.lang .sep { margin: 0 6px; color: var(--rule); }

/* Header ornament — vintage hop cluster flanked by hairlines. */
.header-ornament {
  display: block; margin: 14px auto 4px;
  width: 220px; height: 26px;
}

/* ============ Toolbar ============ */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0 8px; flex-wrap: wrap;
}
.filter { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.filter label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.3px; }
.filter select {
  font: inherit; padding: 6px 10px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 4px;
  font-family: inherit; font-size: 15px;
}
.sort-note { color: var(--muted); font-size: 13px; }

.sort {
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.sort-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.3px;
  margin-right: 2px;
}
.sort-pill {
  display: inline-block; padding: 4px 12px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 13.5px; color: var(--ink-soft);
  background: transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.sort-pill:hover { color: var(--green-deep); border-color: var(--green-soft); text-decoration: none; }
.sort-pill.is-active {
  background: var(--green-deep); color: var(--paper); border-color: var(--green-deep);
}
.sort-pill.is-active:hover { color: var(--paper); border-color: var(--green-deep); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-weight: 500; font-size: 14.5px;
  padding: 9px 14px; border-radius: 4px;
  background: transparent; color: var(--green-deep);
  border: 1px solid var(--green-deep);
  cursor: pointer; line-height: 1; text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.btn:hover { background: var(--green-deep); color: var(--paper); text-decoration: none; }
.btn-primary { background: var(--green-deep); color: var(--paper); }
.btn-primary:hover { background: var(--green); }
.btn-big {
  font-size: 16px; padding: 12px 22px; letter-spacing: .3px;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
}

/* ============ Pub list ============ */
.pubs { list-style: none; padding: 0; margin: 8px 0 14px; }
.pub {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  column-gap: 10px; align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--rule);
}
.pub:last-child { border-bottom: 1px solid var(--rule); }

.pub-name {
  display: flex; flex-direction: column; gap: 2px;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 600; font-size: 20px; color: var(--green);
  text-decoration: none;
}
.pub-name:hover { color: var(--green-deep); text-decoration: none; }
.pub-name:hover .pub-sub { color: var(--ink-soft); }
.pub-sub {
  font: 12.5px/1.3 "Inter", sans-serif;
  color: var(--muted); font-weight: 400; letter-spacing: .2px;
}
.pub-sub em { font-style: normal; color: var(--green-soft); }

.pub-price, .pub-rating {
  background: transparent; border: 0; padding: 4px 6px;
  font: inherit; color: inherit; cursor: pointer;
  border-radius: 4px;
  transition: background .1s ease;
}
.pub-price {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 700; font-size: 28px; color: var(--gold);
  letter-spacing: .5px; font-variant-numeric: tabular-nums;
  line-height: 1; white-space: nowrap;
}
.pub-price small { font-size: 14px; color: var(--gold-soft); margin-left: 2px; font-weight: 600; }
.pub-price:hover, .pub-rating:hover { background: rgba(15,77,46,0.06); }

.vessel { display: block; color: var(--green); opacity: .75; }
.vessel-tank { width: 30px; height: 18px; }
.vessel-keg  { width: 22px; height: 26px; }

.pub-vessel {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 30px;
}
.big-vessel {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 44px;
}
.big-vessel .vessel { opacity: .9; }
.big-vessel .vessel-tank { width: 52px; height: 30px; }
.big-vessel .vessel-keg  { width: 34px; height: 40px; }
.pub-price:focus-visible, .pub-rating:focus-visible {
  outline: 2px solid var(--green-soft); outline-offset: 1px;
}

/* ============ Tally rating (pencil-on-paper) ============ */
.tally {
  display: inline-block; vertical-align: middle;
  width: 44px; height: 26px;
}
.big-rating .tally { width: 70px; height: 40px; }

/* ============ Pagination ============ */
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; padding: 14px 0 6px;
  font-family: "Cormorant Garamond", serif;
}
.pager a {
  font-size: 22px; padding: 4px 12px;
  border: 1px solid var(--rule); border-radius: 4px;
  color: var(--green-deep);
}
.pager-info { color: var(--muted); font-size: 14px; letter-spacing: 1px; }

/* ============ Add CTA at bottom ============ */
.add-cta {
  display: flex; justify-content: center;
  padding: 24px 0 40px;
}
.add-cta .btn-big {
  font-size: 18px; padding: 14px 32px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* ============ Pub detail page ============ */
.back { display: inline-block; padding: 12px 0 0; color: var(--muted); font-size: 14px; }
.pub-page { padding: 8px 0 32px; }
.pub-page h1 {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 600; font-size: clamp(28px, 6vw, 38px);
  margin: 14px 0 4px; color: var(--green);
}
.big-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.big-price {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 700; font-size: 56px; color: var(--gold);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.big-price small { font-size: 22px; color: var(--gold-soft); margin-left: 4px; }
.big-rating { font-size: 22px; }
.meta {
  color: var(--ink-soft); margin: 6px 0 14px;
  list-style: none; padding: 0;
}
.meta li { line-height: 1.7; }

.card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 14px 0;
}
.card h3 {
  font-family: "Inter", sans-serif; text-transform: uppercase;
  font-size: 12.5px; letter-spacing: 1.5px;
  margin: 0 0 10px; color: var(--muted); font-weight: 600;
}
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { flex: 1 1 60%; min-width: 0; }
.stepper-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stepper-form .price-stepper { flex: 1 1 auto; }

.price-stepper {
  display: inline-flex; align-items: center; gap: 10px;
  user-select: none;
}
.ps-btn {
  appearance: none; -webkit-appearance: none;
  background: var(--paper-deep, #f1ead3);
  border: 1px solid var(--rule); color: var(--green);
  width: 48px; height: 48px; border-radius: 50%;
  font: 600 26px/1 "Inter", sans-serif;
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s ease, border-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.ps-btn:hover { background: rgba(15,77,46,0.08); border-color: var(--green-soft); }
.ps-btn:active { background: rgba(15,77,46,0.14); }
.ps-btn:focus-visible { outline: 2px solid var(--green-soft); outline-offset: 2px; }
.ps-display {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 700; font-size: 36px; color: var(--gold);
  letter-spacing: .5px; font-variant-numeric: tabular-nums;
  min-width: 80px; text-align: center; line-height: 1;
}
.ps-display small {
  font-family: "Inter", sans-serif;
  font-size: 14px; color: var(--gold-soft); font-weight: 600;
  margin-left: 4px;
}

input[type="number"], input[type="text"], select {
  font: inherit; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--rule); border-radius: 4px;
  background: var(--paper); color: var(--ink);
  min-width: 0;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,77,46,0.12);
}
input:disabled, select:disabled {
  opacity: .45; background: transparent; cursor: not-allowed;
}

/* ============ Mug picker (radio rated 1–5, beer mugs) ============ */
.star-pick {
  display: inline-flex; flex-direction: row-reverse; justify-content: flex-end;
  gap: 6px; border: 0; padding: 0; margin: 0;
}
.star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.star-pick label {
  cursor: pointer; padding: 2px 1px; line-height: 0;
  color: var(--rule); transition: color .1s ease;
}
.star-pick label .mug { display: block; width: 34px; height: 38px; }
.star-pick label .m-body, .star-pick label .m-foam { fill: transparent; transition: fill .1s ease; }

/* Hover or checked: mug from this position leftward (visually) gets filled. */
.star-pick label:hover, .star-pick label:hover ~ label,
.star-pick input:checked ~ label { color: var(--green-deep); }
.star-pick label:hover .m-body,
.star-pick label:hover ~ label .m-body,
.star-pick input:checked ~ label .m-body { fill: var(--gold-soft); }
.star-pick label:hover .m-foam,
.star-pick label:hover ~ label .m-foam,
.star-pick input:checked ~ label .m-foam { fill: #f4ecd6; }
.star-pick input:focus + label { outline: 2px solid rgba(15,77,46,0.2); border-radius: 4px; }

/* ============ Edit dialogs (native <dialog>) ============ */
.edit-dialog {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  max-width: 92vw; width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.edit-dialog::backdrop {
  background: rgba(28, 26, 20, 0.55);
}
.dialog-form {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px 16px;
}
.dialog-form h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600; font-size: 22px; margin: 0;
  color: var(--green);
}
.dialog-target {
  margin: -6px 0 4px; color: var(--ink-soft);
  font-size: 14px; font-style: italic;
}
.dialog-form input[type="number"] {
  font-size: 22px; padding: 10px 12px;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  text-align: center;
}
.dialog-form .star-pick { justify-content: center; align-self: center; }
.dialog-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 4px;
}

/* ============ Forms ============ */
.form-card {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px;
  margin: 16px 0 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.form-card h1 {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  margin: 0; font-size: 26px; color: var(--green);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > legend {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.3px;
}
.field-check { flex-direction: row; align-items: center; align-self: end; }
.field-check input { width: 18px; height: 18px; }
.field-check span { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 15px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) {
  .field-grid { grid-template-columns: 1fr; }
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.empty {
  padding: 40px 8px; text-align: center; color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 24px 0;
}
.muted { color: var(--muted); font-style: italic; font-size: 13px; }

/* ============ Tighter on phones ============ */
@media (max-width: 520px) {
  .pub {
    grid-template-columns: 1fr auto auto auto;
    column-gap: 6px;
  }
  .pub-name { font-size: 18px; }
  .pub-price { font-size: 24px; }
  .tally { width: 38px; height: 22px; }
  .toolbar { gap: 6px; }
  .filter { flex-wrap: wrap; }
  .filter select { flex: 1 1 auto; }
  .big-price { font-size: 44px; }
  .big-price small { font-size: 18px; }
}
