/* The Brewery — taproom theme. Colours taken from the Discord icon: stout, amber, red ale. */
:root {
  --wood-dark: #1a110a;
  --wood: #2a1b10;
  --wood-light: #3a2616;
  --panel: #241810;
  --line: rgba(243, 217, 164, 0.14);
  --text: #f6ead2;
  --muted: #c9b48f;
  --amber: #f2a53a;
  --amber-light: #ffcf73;
  --copper: #c8662b;
  --red-ale: #9b3322;
  --stout: #2b1a12;
  --foam: #fff6e3;
  --go: #7fcf6b;
  --stop: #e0614d;
  --accent: var(--amber);
  --accent-2: var(--copper);
  --radius: 16px;
  --display: 'Alfa Slab One', Georgia, serif;
  --body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Seasonal accents (set on <body> by app.js) */
body.season-oktoberfest { --accent: #f2b33a; --accent-2: #2f6fb5; }
body.season-halloween   { --accent: #ff8a1f; --accent-2: #7b3fa0; }
body.season-harvest     { --accent: #e0a045; --accent-2: #9b3322; }
body.season-winter      { --accent: #e9c27a; --accent-2: #5f8fb0; }
body.season-spring      { --accent: #f0c24a; --accent-2: #6aa55a; }
body.season-summer      { --accent: #ffd35a; --accent-2: #e07a3a; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 17px/1.5 var(--body);
  background-color: var(--wood-dark);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(242, 165, 58, 0.18), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 140px),
    linear-gradient(180deg, var(--wood) 0%, var(--wood-dark) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--amber-light); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.5px; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.fineprint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }
.loading { padding: 24px; }

/* Season ribbon: coloured banner + a hanging garland per season (season class set on <body> by app.js) */
.season-ribbon {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 9px 16px 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff6e3;
  background: linear-gradient(180deg, var(--rib-top, #2a1b10), var(--rib-bottom, #1a110a));
  border-bottom: 2px solid var(--rib-edge, var(--accent));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.season-ribbon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 24px;
  pointer-events: none;
  background: var(--garland) repeat-x center top / 72px 24px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
body[class*="season-"] .masthead-inner { padding-top: 30px; }
body.season-summer .season-ribbon::after { filter: drop-shadow(0 0 4px rgba(255, 214, 110, 0.75)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
body.season-oktoberfest .season-ribbon { --rib-top: #2361b0; --rib-bottom: #17427d; --rib-edge: #e9c46a; --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath d='M0 1.5 Q18 6 36 1.5 T72 1.5' fill='none' stroke='%23e9c46a' stroke-width='1.5'/%3E%3Cpath d='M6 2.6 H28 L17 21 Z' fill='%23fff6e3'/%3E%3Cpath d='M42 2.6 H64 L53 21 Z' fill='%234a8ad6'/%3E%3C/svg%3E"); }
body.season-halloween .season-ribbon { --rib-top: #3d2156; --rib-bottom: #1c0e29; --rib-edge: #f28a1a; --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath d='M0 1.5 Q18 6 36 1.5 T72 1.5' fill='none' stroke='%23f2a53a' stroke-width='1.5'/%3E%3Cpath d='M17 2.5 V6' stroke='%233f5a1f' stroke-width='2'/%3E%3Cellipse cx='17' cy='12.5' rx='8' ry='6.5' fill='%23f28a1a'/%3E%3Cpath d='M13 7.5 Q11 12.5 13 17.5 M21 7.5 Q23 12.5 21 17.5' stroke='%23c2610a' fill='none'/%3E%3Cpath d='M13.5 11 l2 -1.5 l0 2 Z M20.5 11 l-2 -1.5 l0 2 Z M13 14.5 Q17 17.5 21 14.5' fill='%233b1f0a' stroke='%233b1f0a' stroke-width='0.8'/%3E%3Cpath d='M42 2.6 H64 L53 21 Z' fill='%239b5ad0'/%3E%3C/svg%3E"); }
body.season-harvest .season-ribbon { --rib-top: #8a3f17; --rib-bottom: #5a270d; --rib-edge: #e0a045; --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath d='M0 1.5 Q18 6 36 1.5 T72 1.5' fill='none' stroke='%23d9b36a' stroke-width='1.5'/%3E%3Cpath d='M17 2.5 V5.5' stroke='%234f6b25' stroke-width='1.5'/%3E%3Cellipse cx='17' cy='8.5' rx='4.5' ry='3.8' fill='%23a9cc5f'/%3E%3Cellipse cx='17' cy='12.5' rx='5.2' ry='4' fill='%238fb84b'/%3E%3Cellipse cx='17' cy='16.5' rx='4.2' ry='3.6' fill='%2376a03b'/%3E%3Cellipse cx='17' cy='20' rx='2.4' ry='2' fill='%23628a2e'/%3E%3Cpath d='M53 3 C60.5 7 60.5 15 53 21.5 C45.5 15 45.5 7 53 3Z' fill='%23e0702b'/%3E%3Cpath d='M53 3.5 V21' stroke='%239b3322' stroke-width='1'/%3E%3C/svg%3E"); }
body.season-winter .season-ribbon { --rib-top: #27406b; --rib-bottom: #142540; --rib-edge: #cfd8e6; --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath d='M0 1.5 Q18 6 36 1.5 T72 1.5' fill='none' stroke='%23cfd8e6' stroke-width='1.5'/%3E%3Cpath d='M17 2.5 V4.5 M17 4.5 V18.5 M11 8 L23 15 M11 15 L23 8' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' fill='none'/%3E%3Cpath d='M53 2.5 V7 M53 7 V17 M48.7 9.5 L57.3 14.5 M48.7 14.5 L57.3 9.5' stroke='%23a9c8ef' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
body.season-spring .season-ribbon { --rib-top: #4f7d38; --rib-bottom: #34581f; --rib-edge: #f4a6c6; --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath d='M0 1.5 Q18 6 36 1.5 T72 1.5' fill='none' stroke='%23a8c98a' stroke-width='1.5'/%3E%3Cpath d='M17 2.5 V6' stroke='%234f7d38' stroke-width='1.2'/%3E%3Cg fill='%23f4a6c6'%3E%3Ccircle cx='17' cy='8' r='3.3'/%3E%3Ccircle cx='20.8' cy='10.8' r='3.3'/%3E%3Ccircle cx='19.4' cy='15.2' r='3.3'/%3E%3Ccircle cx='14.6' cy='15.2' r='3.3'/%3E%3Ccircle cx='13.2' cy='10.8' r='3.3'/%3E%3C/g%3E%3Ccircle cx='17' cy='12' r='2.3' fill='%23ffd35a'/%3E%3Cpath d='M53 2.5 V6' stroke='%234f7d38' stroke-width='1.2'/%3E%3Cg fill='%23ffe27a'%3E%3Ccircle cx='53' cy='8' r='3.3'/%3E%3Ccircle cx='56.8' cy='10.8' r='3.3'/%3E%3Ccircle cx='55.4' cy='15.2' r='3.3'/%3E%3Ccircle cx='50.6' cy='15.2' r='3.3'/%3E%3Ccircle cx='49.2' cy='10.8' r='3.3'/%3E%3C/g%3E%3Ccircle cx='53' cy='12' r='2.3' fill='%23e0843a'/%3E%3C/svg%3E"); }
body.season-summer .season-ribbon { --rib-top: #1f7a8c; --rib-bottom: #12505e; --rib-edge: #ffd35a; --garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='24'%3E%3Cpath d='M0 1.5 Q18 6 36 1.5 T72 1.5' fill='none' stroke='%232b2b2b' stroke-width='1.5'/%3E%3Crect x='15' y='3' width='4' height='4' rx='1' fill='%232b2b2b'/%3E%3Cellipse cx='17' cy='12.5' rx='4.6' ry='5.8' fill='%23ffe07a'/%3E%3Crect x='51' y='3' width='4' height='4' rx='1' fill='%232b2b2b'/%3E%3Cellipse cx='53' cy='12.5' rx='4.6' ry='5.8' fill='%23ffb05a'/%3E%3C/svg%3E"); }

/* Masthead */
.masthead { border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.25); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--accent), 0 6px 20px rgba(0,0,0,0.5); flex: none; }
.brand-name { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.05; color: var(--amber-light); }
.brand-tag { display: block; color: var(--muted); font-size: 0.95rem; }

.btn-join {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber-light), var(--amber));
  color: #2a1606;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 #8a5a17, 0 8px 18px rgba(0,0,0,0.35);
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn-join:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #8a5a17, 0 12px 22px rgba(0,0,0,0.4); }
.btn-join:focus-visible { outline: 3px solid var(--foam); outline-offset: 3px; }
.btn-block { display: block; text-align: center; margin-top: 18px; }
.btn-big { font-size: 1.2rem; padding: 14px 28px; }

/* Cards */
.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.12)), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.card-body { position: relative; padding: 20px 22px 22px; }
.card-kicker { font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; color: var(--accent); margin-bottom: 8px; }
.big-num { font-family: var(--display); font-size: 3.4rem; line-height: 1; color: var(--foam); font-variant-numeric: tabular-nums; }
.big-label { color: var(--muted); font-weight: 600; }

.hero { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; margin: 26px 0 10px; }

/* Clock card with live sky */
.clock-card .sky { position: absolute; inset: 0; transition: background 2s ease; background: linear-gradient(180deg, #0b1330, #2a1b3d 70%, #3a2616); }
.clock-card .sky::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,12,6,0.85) 0%, rgba(20,12,6,0.55) 55%, rgba(20,12,6,0.15) 100%); }
.sun-moon { position: absolute; right: 26px; top: 22px; width: 58px; height: 58px; border-radius: 50%; transition: all 2s ease; }
.clock-card[data-sky="dawn"]  .sky { background: linear-gradient(180deg, #3b4a7a 0%, #e98a5b 65%, #f6c77b 100%); }
.clock-card[data-sky="day"]   .sky { background: linear-gradient(180deg, #4a90c8 0%, #8fc3e6 60%, #e8d8a8 100%); }
.clock-card[data-sky="dusk"]  .sky { background: linear-gradient(180deg, #2c2a5a 0%, #b4505a 60%, #f0a050 100%); }
.clock-card[data-sky="night"] .sky { background: radial-gradient(1px 1px at 70% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 85% 45%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 60% 60%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 92% 15%, #fff 50%, transparent 51%), linear-gradient(180deg, #070b1d, #141b3a 70%, #2a1b10); }
.clock-card[data-sky="day"]   .sun-moon,
.clock-card[data-sky="dawn"]  .sun-moon,
.clock-card[data-sky="dusk"]  .sun-moon { background: radial-gradient(circle, #fff6c8 0%, #ffd24a 55%, rgba(255,210,74,0) 72%); box-shadow: 0 0 40px 10px rgba(255, 210, 74, 0.45); }
.clock-card[data-sky="night"] .sun-moon { background: radial-gradient(circle at 35% 35%, #fffbe9, #d9d3bf 60%, #bdb59c); box-shadow: 0 0 30px 4px rgba(255,251,233,0.25); }
.clock-time { font-family: var(--display); font-size: 3.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-time .sec { font-size: 1.6rem; color: var(--amber-light); margin-left: 4px; }
.clock-time .ampm { font-size: 1.3rem; margin-left: 6px; color: var(--muted); }
.clock-date { font-size: 1.15rem; font-weight: 600; margin-top: 6px; }
.clock-place { color: var(--muted); margin-top: 2px; }
.weather { margin-top: 14px; font-size: 1.05rem; }
.weather strong { font-size: 1.3rem; }
.weather .pairing { display: block; color: var(--amber-light); font-style: italic; }

/* Thermometer */
.gauge { display: flex; gap: 20px; align-items: stretch; }
.thermo { width: 34px; flex: none; display: flex; flex-direction: column; align-items: center; }
.thermo-tube { position: relative; width: 18px; flex: 1; min-height: 150px; border-radius: 12px 12px 0 0; background: rgba(255,255,255,0.08); border: 2px solid rgba(243,217,164,0.35); border-bottom: 0; overflow: hidden; }
.thermo-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: linear-gradient(180deg, var(--amber-light), var(--copper)); transition: height 1.2s cubic-bezier(.2,.8,.2,1); }
.thermo-bulb { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--amber-light), var(--copper)); border: 2px solid rgba(243,217,164,0.35); margin-top: -4px; box-shadow: 0 0 18px rgba(242,165,58,0.5); }
.gauge-read { display: flex; flex-direction: column; justify-content: center; }
.gauge-stage { margin: 10px 0 2px; font-family: var(--display); font-size: 1.3rem; color: var(--accent); }

.pour-meta { margin-top: 12px; font-weight: 600; }

/* Beer-colour meter: how busy The Brewery is, on the SRM beer colour scale */
.pour-meter[hidden] { display: none; }
.pour-meter { margin-top: 14px; }
.pour-meter-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.pour-meter-head b { color: var(--text); }
.srm-scale { position: relative; height: 12px; margin-top: 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25);
  background: linear-gradient(90deg, #FFE699, #FFCA5A 6%, #F8A600 14%, #E58500 22%, #CF6900 30%, #B54C00 40%, #9B3200 50%,
    #821E00 60%, #6A0E00 70%, #5A0A02 78%, #470606 88%, #36080A); }
.srm-marker { position: absolute; top: -5px; left: 0; width: 6px; height: 20px; margin-left: -3px; border-radius: 3px; background: var(--foam);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.5); transition: left 1.2s cubic-bezier(.2,.8,.2,1); }
.pour-meter-ends { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* Sections */
.section { margin: 38px 0; }
.section-head { margin-bottom: 16px; }
.section-head h2 { font-size: 2.1rem; color: var(--amber-light); }
.section-head h2 .sub { font-family: var(--body); font-size: 1rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.section-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }

/* On Tap — bar back wall with tap handles and glasses */
.bar { position: relative; border-radius: var(--radius); padding: 22px 16px 0; background: linear-gradient(180deg, #33200f, #22150b); border: 1px solid var(--line); box-shadow: inset 0 20px 40px rgba(0,0,0,0.35); }
.taps { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px 10px; position: relative; z-index: 1; }
.bar-top { height: 26px; margin: 0 -16px; border-radius: 0 0 var(--radius) var(--radius); background: linear-gradient(180deg, #7a4a22, #4d2d14); border-top: 3px solid #a26a35; }
.tap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tap-handle { width: 30px; height: 68px; border-radius: 10px 10px 6px 6px; display: grid; place-items: center; font-size: 17px; background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,255,255,.18) 40%, rgba(0,0,0,.25)), var(--handle, var(--copper)); box-shadow: 0 3px 8px rgba(0,0,0,0.5); transform-origin: 50% 100%; transition: transform .6s ease; }
.tap.on .tap-handle { transform: rotate(-14deg); }
.tap-faucet { width: 44px; height: 14px; border-radius: 4px; background: linear-gradient(180deg, #e9e4da, #8d8779); margin-top: 2px; position: relative; }
.tap-faucet::after { content: ''; position: absolute; left: 50%; top: 12px; width: 8px; height: 10px; margin-left: -4px; background: linear-gradient(180deg, #d6d0c4, #8d8779); border-radius: 0 0 3px 3px; }
.stream { width: 4px; height: 20px; margin-top: 8px; border-radius: 2px; background: transparent; }
.tap.on .stream { background: var(--pour-stream, linear-gradient(180deg, var(--amber-light), var(--amber))); animation: pour 1.2s linear infinite; }
.glass { position: relative; width: 50px; height: 66px; border: 2px solid rgba(255,255,255,0.55); border-top-width: 1px; border-radius: 3px 3px 10px 10px; clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); background: rgba(255,255,255,0.06); overflow: hidden; }
.glass-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--pour-fill, linear-gradient(180deg, var(--amber-light), var(--amber) 60%, var(--copper))); transition: height 1.2s cubic-bezier(.2,.8,.2,1), background 1.2s; }
.glass-fill { box-shadow: inset 2px 0 0 rgba(255,255,255,0.18), inset -2px 0 0 rgba(255,255,255,0.08); }
.glass-fill::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 10px; background: var(--foam); border-radius: 6px 6px 2px 2px; opacity: 0; transition: opacity .6s; }
.tap.on .glass-fill::before { opacity: 1; }
.glass-fill .bubble { position: absolute; bottom: 0; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.8); animation: rise 2.4s linear infinite; }
.tap-name { font-weight: 700; margin-top: 8px; font-size: 0.95rem; line-height: 1.2; }
.tap-status { font-size: 0.85rem; color: var(--muted); }
.tap.on .tap-status { color: var(--go); }
.tap.off { opacity: 0.6; }
.tap.off .tap-status { color: var(--stop); }

/* Satisfactory */
.sf-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.pill { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); font-weight: 600; }
.pill b { color: var(--amber-light); }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.batch { padding: 16px 16px 14px; }
.batch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.batch-name { font-family: var(--display); font-size: 1.35rem; color: var(--foam); }
.lamp { font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.lamp::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--stop); vertical-align: 1px; }
.batch.on .lamp::before { background: var(--go); box-shadow: 0 0 8px var(--go); }
.batch.on .lamp { color: var(--go); }
.batch:not(.on) .lamp { color: var(--stop); }
.batch-world { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; min-height: 1.3em; }
.batch-stage { font-weight: 700; color: var(--accent); }
.tiers { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 6px 0 10px; }
.tiers span { height: 10px; border-radius: 3px; background: rgba(255,255,255,0.08); }
.tiers span.done { background: linear-gradient(180deg, var(--amber-light), var(--copper)); }
.batch-stats { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.batch-stats b { color: var(--text); }
.tier-up { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #231405; font-weight: 700; font-size: 0.85rem; }
.batch.celebrate { box-shadow: 0 0 0 2px var(--accent), 0 10px 30px rgba(0,0,0,0.35); }
.foam-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.foam-burst i { position: absolute; bottom: -12px; width: 12px; height: 12px; border-radius: 50%; background: var(--foam); opacity: .9; animation: burst 2.6s ease-out forwards; }

/* Achievements: record plaques + medal wall */
#achievements[hidden] { display: none; }
.plaques { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plaque { position: relative; padding: 16px 16px 14px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, #6b4222, #4a2c15); border: 1px solid #8a5a2e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 20px rgba(0,0,0,0.4); }
.plaque::before, .plaque::after { content: ''; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c4, #b8872b); }
.plaque::before { left: 8px; } .plaque::after { right: 8px; }
.plaque-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: #f3d9a4; }
.plaque-value { font-family: var(--display); font-size: 2.3rem; line-height: 1.1; color: var(--foam); margin: 4px 0 2px; }
.plaque-value.small { font-size: 1.35rem; line-height: 1.25; margin: 8px 0 6px; }
.plaque-desc { color: #e6cfa4; font-size: 0.9rem; }
.plaque-date { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,0.3); color: #f3d9a4; font-size: 0.8rem; font-weight: 600; }
.medal-head { font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; color: var(--amber-light); margin: 24px 0 10px; }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.medal { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.medal-badge { flex: none; position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: radial-gradient(circle at 35% 30%, #fff1c2, #e9b44c 45%, #a8711f 100%); box-shadow: 0 0 0 3px #7a4f18, 0 4px 10px rgba(0,0,0,0.45); }
.medal.locked .medal-badge { background: radial-gradient(circle at 35% 30%, #6d5c48, #3d3024); box-shadow: 0 0 0 3px #2b2119; filter: grayscale(1); opacity: 0.7; }
.medal.locked .medal-badge::after { content: '🔒'; position: absolute; right: -4px; bottom: -4px; font-size: 14px; filter: none; }
.medal-title { font-weight: 700; line-height: 1.2; }
.medal.locked .medal-title { color: var(--muted); }
.medal-sub { font-size: 0.85rem; color: var(--muted); }
.medal-earned { font-size: 0.8rem; color: var(--go); font-weight: 600; }
.medal-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); margin-top: 5px; overflow: hidden; }
.medal-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--copper), var(--amber)); }
.medal.new { box-shadow: 0 0 0 2px var(--accent); }

/* Brew of the Week */
.botw[hidden] { display: none; }
.botw { display: grid; grid-template-columns: 170px 1fr; gap: 8px; }
.botw-glass-col { display: flex; align-items: flex-start; justify-content: center; padding: 34px 0 20px 20px; }
.pint { position: relative; width: 104px; height: 170px; clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%); background: rgba(255,255,255,0.1); border-radius: 4px 4px 12px 12px; }
.pint::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent 30%, transparent 70%, rgba(255,255,255,0.12)); }
.pint-beer { position: absolute; left: 0; right: 0; bottom: 0; top: 22px; background: var(--beer, #f39c00); transition: background 1s; }
.pint-beer::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.25)); }
.pint-foam { position: absolute; left: -2px; right: -2px; top: -18px; height: 22px; background: var(--foam); border-radius: 12px 12px 4px 4px; box-shadow: inset 0 -4px 6px rgba(0,0,0,0.08); }
.botw-main { padding: 22px 22px 20px 12px; min-width: 0; }
.botw-style { text-transform: uppercase; letter-spacing: 2px; font-weight: 700; font-size: 0.8rem; color: var(--accent); }
.botw-name { font-size: 2rem; color: var(--foam); margin-top: 2px; }
.botw-tagline { margin: 4px 0 14px; color: var(--muted); font-style: italic; }
.botw-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.botw-stats div { padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); min-width: 74px; }
.botw-stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.botw-stats dd { margin: 0; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.srm-chip { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4); }
.botw-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; }
.botw h4 { font-family: var(--body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--amber-light); margin: 10px 0 4px; }
.botw-list { list-style: none; padding: 0; margin: 0; }
.botw-list li { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px dashed rgba(243,217,164,0.12); }
.botw-list .amt { flex: none; width: 64px; font-weight: 700; font-variant-numeric: tabular-nums; }
.botw-list .when { margin-left: auto; color: var(--muted); white-space: nowrap; font-size: 0.9rem; }
.botw-yeast { margin: 0; }
.botw-steps { margin: 0; padding-left: 20px; }
.botw-steps li { padding: 2px 0; }
.botw-note { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: rgba(255,255,255,0.04); border-radius: 0 8px 8px 0; }
.botw-note::before { content: '🍺 Brewer’s tip: '; font-weight: 700; }
.botw-foot { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.botw-foot b { color: var(--text); }

/* Busiest times chart */
.busy-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.busy-headline { font-size: 1.15rem; font-weight: 600; }
.busy-headline b { font-family: var(--display); font-weight: 400; color: var(--amber-light); font-size: 1.35rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); }
.seg-btn { font: 600 0.9rem var(--body); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--amber); color: #2a1606; }
.seg-btn:focus-visible { outline: 2px solid var(--foam); outline-offset: 2px; }
.busy-chart { position: relative; height: 240px; }
.busy-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.busy-chart .grid { stroke: rgba(243,217,164,0.12); stroke-width: 1; shape-rendering: crispEdges; }
.busy-chart .tick { fill: var(--muted); font: 12px var(--body); font-variant-numeric: tabular-nums; }
.busy-chart .bar { fill: var(--amber); }
.busy-chart .bar.now { fill: var(--amber-light); }
.busy-chart .hit { fill: transparent; cursor: default; }
.busy-chart .hit:hover + .bar, .busy-chart .hit:focus + .bar { fill: var(--foam); }
.busy-chart .hit:focus { outline: none; }
.busy-chart .cap { fill: var(--text); font: 700 12px var(--body); }
.busy-chart .now-label { fill: var(--amber-light); font: 700 11px var(--body); letter-spacing: 1px; }
.busy-tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: #0f0905; border: 1px solid var(--line); color: var(--text); font-size: 0.9rem; box-shadow: 0 6px 16px rgba(0,0,0,0.5); z-index: 2; }
.busy-tip b { color: var(--amber-light); }
.busy-table summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.busy-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.busy-table th, .busy-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.busy-table th { color: var(--muted); font-weight: 600; }

/* Join band */
.join-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 24px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(242,165,58,0.18), rgba(155,51,34,0.25)); border: 1px solid var(--line); }
.join-band h2 { font-size: 1.7rem; color: var(--foam); }
.join-band p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

.footer { border-top: 1px solid var(--line); padding: 18px 0 28px; margin-top: 30px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.9rem; }

/* Brewery ticker — chalkboard strip under the masthead */
.ticker { display: flex; align-items: stretch; margin: 18px 0 0; border-radius: 12px; overflow: hidden; background: #1d221d; border: 2px solid #6b4a2b; box-shadow: inset 0 0 18px rgba(0,0,0,0.5); }
.ticker-label { flex: none; display: flex; align-items: center; padding: 8px 14px; font-family: var(--display); font-size: 0.95rem; color: var(--wood-dark); background: var(--accent); white-space: nowrap; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.ticker-view:focus-visible { outline: 2px solid var(--amber-light); outline-offset: -2px; }
.ticker-track { display: flex; width: max-content; padding: 8px 0; color: #ecebdf; }
.ticker-item { padding: 0 18px; white-space: nowrap; }
.ticker-item + .ticker-item { border-left: 1px dashed rgba(236, 235, 223, 0.3); }
.ticker-item.muted { color: #b9b9a8; white-space: normal; }
.ticker-time { color: var(--amber-light); font-size: 0.85em; margin-left: 4px; }
.ticker-track.rolling { animation: ticker var(--ticker-dur, 40s) linear infinite; }
.ticker-view:hover .ticker-track, .ticker-view:focus .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Live pulse — a player joined since the last update */
.section-head .sound-toggle { margin-top: 10px; }
.sound-toggle { font: 600 0.85rem var(--body); color: var(--muted); background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.sound-toggle:hover, .sound-toggle:focus-visible { color: var(--text); border-color: var(--accent); }
.sound-toggle[aria-pressed="true"] { color: var(--amber-light); border-color: var(--accent); }
.tap, .batch { position: relative; }
.tap-handle.wiggle { animation: wiggle 0.9s ease; }
@keyframes wiggle { 0% { transform: rotate(-14deg); } 25% { transform: rotate(-32deg); } 50% { transform: rotate(-4deg); } 75% { transform: rotate(-22deg); } 100% { transform: rotate(-14deg); } }
.plus-one { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); font-weight: 700; color: var(--amber-light); text-shadow: 0 1px 3px rgba(0,0,0,0.7); white-space: nowrap; pointer-events: none; z-index: 3; animation: plus-one 2.2s ease-out forwards; }
.batch .plus-one { top: 12px; left: auto; right: 14px; transform: none; }
@keyframes plus-one { 0% { opacity: 0; translate: 0 6px; } 15% { opacity: 1; } 100% { opacity: 0; translate: 0 -44px; } }

/* Animations */
@keyframes pour { 0% { opacity: .85; } 50% { opacity: 1; } 100% { opacity: .85; } }
@keyframes rise { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-70px); opacity: 0; } }
@keyframes burst { 0% { transform: translateY(0) scale(.6); opacity: .95; } 100% { transform: translateY(-190px) scale(1.4); opacity: 0; } }
.bump { animation: bump .6s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); color: var(--amber-light); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* No scrolling ticker: the news can be swiped/scrolled by hand instead */
  .ticker-view { overflow-x: auto; }
  .ticker-item[aria-hidden="true"] { display: none; }
  .plus-one { top: 0; }
}

/* Layout: tablet & phone */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .clock-card { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .plaques { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .botw { grid-template-columns: 1fr; }
  .botw-glass-col { padding: 26px 0 0; }
  .pint { width: 80px; height: 130px; }
  .botw-main { padding: 16px 18px 18px; }
  .botw-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.6rem; }
  .brand img { width: 52px; height: 52px; }
  .masthead .btn-join { width: 100%; text-align: center; }
  .clock-time { font-size: 3rem; }
  .big-num { font-size: 2.9rem; }
  .section-head h2 { font-size: 1.7rem; }
  .taps { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .ticker { flex-direction: column; }
  .ticker-label { padding: 5px 12px; font-size: 0.85rem; }
  .busy-chart { height: 200px; }
  .seg { width: 100%; }
  .seg-btn { flex: 1; }
}

/* The Back Room (Barkeep brewing game + daily trivia) */
.back-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.back-card .card-body { display: flex; flex-direction: column; height: 100%; }
.back-card .btn-block { margin-top: auto; }
.back-intro { margin: 0 0 14px; color: var(--muted); }
.back-intro code, .section .fineprint code { background: rgba(0,0,0,0.35); padding: 1px 6px; border-radius: 6px; color: var(--amber-light); }
.back-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.back-stats:empty { display: none; }
.back-stat { background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: center; }
.back-stat b { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--foam); line-height: 1.2; }
.back-stat span { font-size: 0.8rem; color: var(--muted); }
.back-h4 { margin: 10px 0 6px; font-size: 0.95rem; color: var(--amber-light); }
.back-list { list-style: none; margin: 0 0 14px; padding: 0; }
.back-list li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.back-list.ranked { counter-reset: rank; }
.back-list.ranked li::before { counter-increment: rank; content: counter(rank) '.'; color: var(--accent); font-weight: 700; min-width: 1.4em; }
.back-emoji { flex: none; }
.trivia-q { background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.trivia-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: var(--accent); }
.trivia-text { margin: 4px 0 8px; font-weight: 700; font-size: 1.1rem; }
.trivia-choices { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.trivia-choices li { background: rgba(242,165,58,0.12); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 0.95rem; }
.trivia-yday { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
@media (max-width: 760px) {
  .back-grid { grid-template-columns: 1fr; }
  .trivia-choices { grid-template-columns: 1fr; }
}

/* Community goal (Barkeep) */
.goal-card { margin-bottom: 18px; }
.goal-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.goal-text { margin: 0 0 12px; font-family: var(--display); font-size: 1.5rem; color: var(--foam); line-height: 1.2; }
.goal-happy { text-align: right; background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.goal-happy:empty { display: none; }
.goal-happy-k { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: var(--accent); }
.goal-bar { height: 18px; border-radius: 999px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); overflow: hidden; }
.goal-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--copper), var(--amber-light)); transition: width .8s ease; }
.goal-bar.met span { background: linear-gradient(90deg, #4f9a3c, var(--go)); }
.goal-meta { margin-top: 8px; }
.goal-earners { margin-top: 6px; font-size: 0.95rem; }
@media (max-width: 760px) { .goal-happy { text-align: left; } }
