/* Ryder Cup 2027 Dates. House style from the Ryder Cup boards: paper and ink, Barlow Condensed
   for names, dates and numbers, Manrope for labels. Color means one thing: green = yes,
   red = no (Shane, 2026-11-20). If need be is hatched; dashed = hasn't answered.
   Sized for 15 names and 17 dates on a 393-wide phone. */

@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("/fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("/fonts/barlow-condensed-800.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 900; font-display: swap; src: url("/fonts/barlow-condensed-900.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400 800; font-display: swap; src: url("/fonts/manrope.woff2") format("woff2"); }

:root {
  --paper: #fffdf8;
  --card: #fff;
  --paper-2: #f4f1ea;
  --paper-3: #e4dfd3;
  --ink: #17211f;
  --ink-2: rgba(23, 33, 31, .72);
  --ink-3: rgba(23, 33, 31, .52);
  --line: rgba(23, 33, 31, .14);
  --line-2: rgba(23, 33, 31, .3);
  --hatch: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, transparent 1.5px 4.5px);
  --hatch-soft: repeating-linear-gradient(135deg, rgba(23, 33, 31, .26) 0 1.5px, transparent 1.5px 4.5px);
  --yes: #4a9c66;
  --yes-line: #2f7d4a;
  --yes-tint: #c6e4c2;
  --yes-ink: #163d26;
  --no: #f0b4ab;
  --no-line: #b8473c;
  --no-tint: #f4c9c2;
  --no-ink: #6b1d16;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Manrope", Inter, system-ui, sans-serif;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; padding: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
main { padding-bottom: 56px; }

/* ---- Answer marks ---- */
.mark {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  vertical-align: middle;
}
.mark.yes { background: var(--yes); border-color: var(--yes-line); }
.mark.maybe { background: var(--hatch); }
.mark.no { background: var(--no); border-color: var(--no-line); }
.mark.wait { background: none; border: 1.5px dashed var(--line-2); }

/* ---- Type ---- */
.eyebrow, .month {
  font: 700 11px/1.2 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.title {
  font: 800 40px/1 var(--display);
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.desc { margin-top: 8px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.status { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.status b { color: var(--ink); font-weight: 800; }
.h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--ink);
  font: 800 20px/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.h2 small { font: 600 12px/1.2 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.month { padding: 16px 0 6px; border-bottom: 1px solid var(--line); }
.h2 + .month, .best + .month, .h2 + .asks > .month:first-child { padding-top: 2px; }
.h2 + .asks { margin-top: 0; }

.head { padding-top: 22px; }
.head .title { margin-top: 0; }

/* ---- The pick, and the best so far ---- */
.set, .best { margin-top: 16px; padding: 14px 16px 15px; border-radius: 12px; }
.set { background: var(--ink); color: var(--paper); }
.set .eyebrow { color: rgba(255, 253, 248, .66); }
.set-date, .best-date { font: 800 30px/1.05 var(--display); text-transform: uppercase; margin-top: 4px; }
.best { margin-top: 0; margin-bottom: 4px; background: var(--paper-2); }
.best-date { font-size: 27px; }
.best-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font: 700 19px/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.btn span { transform: translateY(-.04em); }
.btn:disabled { background: var(--paper-3); color: var(--ink-3); cursor: default; }
.btn.quiet {
  min-height: 38px;
  padding: 0 14px;
  background: none;
  color: var(--ink);
  border: 1.5px solid var(--line-2);
  font-size: 15px;
}
.btn.quiet.armed { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link {
  font: 700 13px/1 var(--body);
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 0;
}

/* ---- Your answer: a name, then a row per date ---- */
.names { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.name {
  position: relative;
  min-height: 42px;
  padding: 0 2px;
  border-radius: 8px;
  border: 1.5px solid var(--line-2);
  background: var(--card);
  font: 700 16px/1 var(--display);
  letter-spacing: .02em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name span { display: inline-block; transform: translateY(-.04em); }
.name.in { background: var(--paper-2); border-color: var(--line); color: var(--ink-2); }
.name.in::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--ink);
}
.name[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.name[aria-pressed="true"]::after { background: var(--paper); }

.asks { margin-top: 12px; }
.ask {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 92px 50px;
  gap: 5px;
  align-items: center;
  padding: 3px 0;
}
.month + .ask { padding-top: 7px; }
.ask-date { white-space: nowrap; }
.ask-date b { display: block; font: 700 20px/1 var(--display); text-transform: uppercase; }
.ask-date small {
  display: block;
  margin-top: 4px;
  font: 700 10px/1 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pick {
  height: 42px;
  border-radius: 8px;
  border: 1.5px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
  font: 700 15px/1 var(--display);
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pick span { display: inline-block; transform: translateY(-.04em); }
/* An answer that's on: green for yes, hatched for if need be, red for no. */
.pick[aria-pressed="true"] { border-width: 2px; border-color: var(--ink); color: var(--ink); }
.pick.yes[aria-pressed="true"] { background: var(--yes-tint); border-color: var(--yes-line); color: var(--yes-ink); }
.pick.maybe[aria-pressed="true"] { background: var(--hatch-soft), var(--card); }
.pick.no[aria-pressed="true"] { background: var(--no-tint); border-color: var(--no-line); color: var(--no-ink); }

.field { display: block; margin-top: 16px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  font: 700 11px/1.2 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field em { font-style: normal; letter-spacing: 0; text-transform: none; font-weight: 600; }
input[type="text"], textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line-2);
  background: var(--card);
  font-size: 16px; /* 16px keeps iPhones from zooming in on focus */
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}
textarea { min-height: 64px; resize: vertical; line-height: 1.4; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
::placeholder { color: var(--ink-3); font-weight: 500; }

/* Save rides along the bottom of the screen for as long as the dates are in view. */
.save-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.save-row .btn { flex: 1; }
.save-row .left { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.save-row .left:empty { display: none; }

.you {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 12px 10px 14px;
  border-radius: 12px;
  background: var(--paper-2);
}
.you p { font-weight: 600; font-size: 14px; }
.you b { font-weight: 800; }

/* ---- The count: a row per date, a mark per person ---- */
.opt { display: block; width: 100%; text-align: left; padding: 9px 0 10px; border-bottom: 1px solid var(--line); }
.opt-top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.opt-date { font: 700 20px/1 var(--display); text-transform: uppercase; white-space: nowrap; transform: translateY(-.04em); }
.chip {
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1.5px solid var(--ink);
  font: 800 10px/1 var(--body);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip.fill { background: var(--ink); color: var(--paper); }
.opt-tally { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.opt-tally b { font: 800 16px/1 var(--display); color: var(--ink); }
.opt-tally .dot { margin: 0 2px; color: var(--ink-3); }
.strip { display: flex; gap: 2px; margin-top: 6px; }
.strip .mark { flex: 1; width: auto; max-width: 28px; height: 12px; border-radius: 3px; }
.opt.dim { opacity: .5; }
.who { padding: 10px 0 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.who p { display: flex; gap: 9px; padding: 3px 0; }
.who .mark { width: 14px; height: 14px; border-radius: 3px; margin-top: 3px; }
.who p span { color: var(--ink-3); font-weight: 600; }
.who .btn { margin-top: 10px; }
.who.mine { border-bottom: 0; padding: 12px 2px 0; }
.who.mine p .said { color: var(--ink); font-weight: 500; }
.who.mine p .said b { font: 700 16px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; margin-right: 8px; }
.legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mark { width: 12px; height: 12px; border-radius: 3px; }

/* ---- Everyone: dates down the side, people across the top ---- */
.grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid { border-collapse: collapse; width: 100%; table-layout: fixed; }
.grid th, .grid td { padding: 0; text-align: center; }
.grid thead th { height: 62px; vertical-align: bottom; padding-bottom: 6px; }
.grid thead th:first-child { width: 100px; }
.grid thead th span {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 700 13px/1 var(--display);
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.grid thead th.waiting span { color: var(--ink-3); font-weight: 600; }
.grid tbody th {
  text-align: left;
  font: 700 14px/1 var(--display);
  text-transform: uppercase;
  white-space: nowrap;
}
.grid tbody tr { border-top: 1px solid var(--line); }
.grid tbody tr.month-start { border-top: 1.5px solid var(--line-2); }
.grid tbody tr:first-child { border-top: 1.5px solid var(--ink); }
.grid tbody td { height: 24px; line-height: 0; }
.grid .mark { width: 12px; height: 12px; border-radius: 3px; }
.grid tbody tr.picked th { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---- Notes ---- */
.note { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-line; }
.note b { font: 700 17px/1 var(--display); text-transform: uppercase; margin-right: 8px; }

/* ---- Host ---- */
.host-row { display: flex; flex-wrap: wrap; gap: 8px; }
.host-remove { display: flex; gap: 8px; margin-top: 12px; }
.host-remove select {
  flex: 1;
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2317211f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
}

.foot { margin-top: 28px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: center; }
.empty { padding: 48px 0; text-align: center; }
.empty .title { font-size: 32px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(23, 33, 31, .25);
  white-space: nowrap;
  z-index: 10;
}

@media (max-width: 359px) {
  .names { grid-template-columns: repeat(4, 1fr); }
  .title { font-size: 34px; }
  .ask { grid-template-columns: minmax(0, 1fr) 50px 84px 44px; gap: 4px; }
  .ask-date, .opt-date { font-size: 18px; }
  .grid thead th:first-child { width: 90px; }
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise .18s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
}
