@layer base, components, responsive;
@layer base {
  @font-face {
    font-family: "Barlow Semi Condensed";
    src: url("/assets/BarlowSemiCondensed-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
  }
  @font-face {
    font-family: "Silkscreen";
    src: url("/assets/Silkscreen-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
  }
  :root {
    color-scheme: light;
    --paper: #f1f1f7;
    --sheet: #fff;
    --warm: #ece9f7;
    --ink: #1b1925;
    --muted: #575668;
    --line: #d7d6e2;
    --brand: #8254ed;
    --accent: color-mix(in srgb, var(--brand) 83%, #39226d);
    --accent-text: color-mix(in srgb, var(--brand) 75%, #331570);
    --sage: #e8e5ff;
    --sage-ink: #453582;
    --ready: #c3f882;
    --ready-ink: #1b2914;
    --display: "Barlow Semi Condensed", "Bahnschrift", Arial, sans-serif;
    --sans: "DM Sans", "Segoe UI", Arial, sans-serif;
    --mono: "IBM Plex Mono", Consolas, monospace;
    --shadow: 0 6px 24px #29261808;
    background: var(--paper);
    color: var(--ink);
    font: 100%/1.5 var(--sans);
    -webkit-font-smoothing: antialiased;
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #121218;
    --sheet: #1b1b24;
    --warm: #2a2636;
    --ink: #f5f3fa;
    --muted: #b6b3c5;
    --line: #383741;
    --accent: color-mix(in srgb, var(--brand) 82%, #3d246e);
    --accent-text: color-mix(in srgb, var(--brand) 40%, #f1dfff);
    --sage: #30293e;
    --sage-ink: #d3c1ff;
    --ready: #c0f77d;
    --ready-ink: #1a2813;
    --shadow: none;
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
  }
  button,
  input,
  select,
  textarea {
    font: inherit;
  }
  button,
  a,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }
  button,
  a {
    color: inherit;
  }
  a {
    text-decoration: none;
  }
  button {
    cursor: pointer;
  }
  button {
    background: none;
    border: 0;
  }
  button:disabled {
    opacity: 0.55;
  }
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid #6288c1;
    outline-offset: 3px;
  }
  svg {
    flex: none;
    vertical-align: middle;
  }
  h1,
  h2,
  h3,
  p {
    margin: 0;
  }
  h1,
  h2,
  h3 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.08;
  }
  h1 {
    font-size: clamp(2.75rem, 4.3vw, 4.4rem);
  }
  h2 {
    font-size: clamp(1.9rem, 3vw, 2.7rem);
  }
  h3 {
    font-size: 1.65rem;
  }
  img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  button,
  a,
  input,
  select {
    transition:
      color 0.15s,
      background 0.15s,
      border-color 0.15s,
      box-shadow 0.15s;
  }
  small {
    color: var(--muted);
  }
  hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1rem 0;
  }
}
@layer components {
  .check-line[hidden] {
    display: none;
  }
  .weekly-game {
    color: var(--accent-text);
    font-weight: 650;
    margin: 0 0 0.7rem;
  }
  .skip {
    position: fixed;
    left: 1rem;
    top: -6rem;
    background: var(--sheet);
    padding: 0.65rem;
    z-index: 9;
  }
  .skip:focus {
    top: 0.5rem;
  }
  .loading {
    max-width: 46rem;
    margin: 15vh auto;
    padding: 1.5rem;
  }
  .loading p {
    margin: 1rem 0;
  }
  .mast {
    border-bottom: 1px solid var(--line);
    background: var(--sheet);
  }
  .mast-inner,
  .workspace,
  .welcome {
    width: min(1200px, calc(100% - 96px));
    margin-inline: auto;
  }
  .mast-inner {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
  }
  .brand,
  .head-actions,
  .top-nav,
  .actions,
  .event-line,
  .hero-cta,
  .attendance,
  .eyebrow,
  .secondary,
  .primary,
  .link-button,
  .mini,
  .today,
  .countdown,
  .card-copy p,
  .search,
  .check-line {
    display: flex;
    align-items: center;
  }
  .brand {
    gap: 0.65rem;
    white-space: nowrap;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff6e6;
    font: 600 1.25rem var(--display);
  }
  .wordmark {
    font: 700 1.94rem/1 var(--display);
    letter-spacing: -0.025em;
  }
  .wordmark b {
    color: var(--accent-text);
  }
  .head-actions {
    gap: 0.85rem;
  }
  .top-nav {
    gap: 0.25rem;
  }
  .top-nav a {
    display: flex;
    gap: 0.47rem;
    align-items: center;
    font-size: 0.92rem;
    padding: 0.52rem 0.76rem;
    font-weight: 550;
    color: var(--muted);
    border-radius: 7px;
  }
  .top-nav a:hover,
  .round:hover,
  .secondary:hover,
  .mini:hover {
    background: var(--warm);
  }
  .top-nav a[aria-current="page"] {
    background: var(--warm);
    color: var(--accent-text);
  }
  .round,
  .avatar,
  .av,
  .heart {
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
  }
  .round {
    width: 37px;
    height: 37px;
    border: 1px solid var(--line);
  }
  .avatar,
  .av {
    background: #e9d9bf;
    color: #64472d;
    font-weight: 650;
    font-size: 0.81rem;
  }
  .avatar {
    width: 37px;
    height: 37px;
  }
  .demo-flag {
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 0.15rem 0.48rem;
    border-radius: 4px;
  }
  .bottom-nav {
    display: none;
  }
  .workspace {
    padding: 2.6rem 0 5rem;
  }
  .page-head,
  .section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
  }
  .page-head {
    margin-bottom: 1.65rem;
  }
  .eyebrow {
    font: 700 0.74rem/1.4 var(--mono);
    letter-spacing: 0.1em;
    color: var(--muted);
    gap: 0.65rem;
  }
  .accent {
    color: var(--accent-text);
  }
  .page-head .eyebrow {
    margin-bottom: 0.42rem;
  }
  .today,
  .countdown {
    gap: 0.45rem;
    font-size: 0.86rem;
    font-weight: 550;
  }
  .today {
    color: var(--muted);
    padding-bottom: 0.5rem;
  }
  .dinner-hero {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--sheet);
    box-shadow: var(--shadow);
  }
  .hero-copy {
    padding: clamp(1.55rem, 3.25vw, 3.15rem);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .rule {
    display: inline-block;
    width: 23px;
    border-top: 2px solid currentColor;
  }
  .hero-copy h2 {
    text-wrap: balance;
    font-size: clamp(2.5rem, 4vw, 3.9rem);
    margin: 0.65rem 0 1rem;
    letter-spacing: -0.024em;
  }
  .event-line {
    gap: 0.5rem;
    color: var(--muted);
    margin: 0.19rem 0;
    flex-wrap: wrap;
  }
  .event-line svg,
  .card-copy p svg {
    color: var(--accent-text);
  }
  .middot {
    padding: 0 0.05rem;
  }
  .hero-cta,
  .actions,
  .welcome-actions {
    gap: 0.65rem;
    flex-wrap: wrap;
  }
  .hero-cta {
    margin: 1.3rem 0 1.1rem;
  }
  .primary,
  .secondary,
  .link-button,
  .mini {
    border-radius: 8px;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 620;
    line-height: 1.2;
    text-align: center;
  }
  .primary,
  .secondary {
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    font-size: 0.92rem;
  }
  .primary {
    background: var(--accent);
    color: white;
    border: 1px solid transparent;
  }
  .primary:hover {
    filter: brightness(0.91);
  }
  .secondary,
  .mini {
    background: var(--sheet);
    border: 1px solid var(--line);
  }
  .link-button {
    background: transparent;
    color: var(--accent-text);
    padding: 0.45rem 0.1rem;
    font-size: 0.92rem;
  }
  .link-button:hover,
  .text-button:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  .hero-photo {
    min-height: 320px;
    position: relative;
    isolation: isolate;
    background: #211b34;
  }
  .hero-photo img {
    position: absolute;
    inset: 0;
    object-position: 50% 54%;
  }
  .countdown {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    background: #171421e8;
    color: #f5efff;
    padding: 0.36rem 0.7rem;
    border-radius: 20px;
    box-shadow: 0 2px 12px #0002;
  }
  .attendance {
    gap: 0.7rem;
    color: var(--muted);
    font-size: 0.84rem;
  }
  .avatar-stack {
    display: flex;
    padding-left: 4px;
  }
  .av {
    width: 34px;
    height: 34px;
  }
  .avatar-stack .av {
    border: 2px solid var(--sheet);
    margin-left: -4px;
    width: 29px;
    height: 29px;
    font-size: 0.66rem;
  }
  .av-0 {
    color: #4c6346;
    background: #d9e4ce;
  }
  .av-1 {
    color: #7b4a33;
    background: #ead5c6;
  }
  .av-2 {
    color: #585a77;
    background: #dedde9;
  }
  .av-3 {
    color: #6e5b2d;
    background: #ece4c2;
  }
  .section-head {
    margin: 2.15rem 0 1rem;
  }
  .section-head .eyebrow {
    margin-bottom: 0.35rem;
  }
  .place-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .place-card,
  .panel,
  .memory-row,
  .rows {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 13px;
  }
  .place-card {
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .card-image {
    position: relative;
    aspect-ratio: 1.99;
    background: var(--warm);
  }
  .image-button {
    display: block;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  .image-button img {
    transition: transform 0.35s;
  }
  .image-button:hover img {
    transform: scale(1.03);
  }
  .map-art {
    position: relative;
    display: grid;
    place-items: center;
    isolation: isolate;
  }
  .map-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 54%;
  }
  .map-name {
    position: relative;
    max-width: calc(100% - 3.1rem);
    padding: 0.55rem 0.6rem;
    border: 2px solid #e6d8ff;
    outline: 3px solid #261b3d;
    background: #1c1530f2;
    color: #fff4d8;
    box-shadow: 0 5px 0 3px #120c20a8;
    font-family: "Silkscreen", var(--mono);
    font-size: clamp(0.8rem, 1.65vw, 1.1rem);
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .map-name.long {
    font-size: clamp(0.7rem, 1.35vw, 0.92rem);
  }
  .heart {
    position: absolute;
    top: 0.72rem;
    right: 0.72rem;
    background: #191821ed;
    width: 34px;
    height: 34px;
    color: #f4edff;
  }
  .heart.selected {
    color: #c7a3ff;
  }
  .heart.selected svg {
    fill: currentColor;
  }
  .card-copy {
    padding: 1rem 1.2rem;
  }
  .card-meta,
  .right-meta {
    font-size: 0.78rem;
    color: var(--muted);
  }
  .card-meta {
    font-weight: 600;
  }
  .card-meta span {
    padding: 0 0.2rem;
  }
  .card-copy h3 {
    margin: 0.25rem 0 0.5rem;
  }
  .text-button {
    padding: 0;
    font: inherit;
    letter-spacing: inherit;
    text-align: left;
  }
  .card-copy p {
    gap: 0.32rem;
    font-size: 0.875rem;
    color: var(--muted);
  }
  .right-meta {
    margin-left: auto;
  }
  .card-foot {
    border-top: 1px solid var(--line);
    margin-top: 0.9rem;
    padding-top: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
  }
  .mini {
    padding: 0.38rem 0.6rem;
    color: var(--ink);
    font-size: 0.8rem;
  }
  .mini svg {
    width: 14px;
    height: 14px;
  }
  .chosen,
  .secondary.chosen {
    background: var(--sage);
    color: var(--sage-ink);
    border-color: var(--sage-ink);
  }
  .planning-layout,
  .group-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 1.25rem;
  }
  .panel {
    padding: 1.6rem;
  }
  .panel h2 {
    margin: 0.4rem 0 1rem;
  }
  .panel p,
  .body-copy,
  .place-detail p {
    color: var(--muted);
    margin: 0.7rem 0;
  }
  .panel .actions,
  .dinner-info .actions {
    margin-top: 1.4rem;
  }
  .actions {
    display: flex;
  }
  .rsvp-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .rsvp-options button {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0.55rem 0.75rem;
    font-weight: 600;
  }
  .rsvp-options .chosen {
    border-color: var(--sage-ink);
  }
  .roster {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.6rem;
    font-size: 0.84rem;
  }
  .roster b {
    font-size: 0.73rem;
    color: var(--muted);
    font-weight: 500;
  }
  .roster span {
    display: flex;
    flex-direction: column;
  }
  .rows {
    overflow: hidden;
  }
  .event-row,
  .directory-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
  }
  .event-row,
  .memory-row {
    width: 100%;
    text-align: left;
  }
  .event-row {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .event-row:last-child,
  .directory-row:last-child {
    border-bottom: 0;
  }
  .event-row:hover,
  .memory-row:hover {
    background: var(--warm);
  }
  .event-row strong,
  .event-row small,
  .directory-row strong,
  .directory-row small {
    display: block;
  }
  .date-tile {
    flex: none;
    text-align: center;
    border-radius: 7px;
    background: var(--warm);
    padding: 0.3rem 0.65rem;
    font-size: 1.25rem;
    line-height: 1.25;
    font-weight: 650;
  }
  .date-tile small {
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }
  .status {
    margin-left: auto;
    background: var(--sage);
    color: var(--sage-ink);
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    text-transform: capitalize;
    font-size: 0.8rem;
  }
  .filter-row {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
  }
  .search {
    background: var(--sheet);
    gap: 0.55rem;
    padding: 0 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    flex: 1;
  }
  .search input {
    border: 0;
    background: transparent;
    width: 100%;
    padding: 0.6rem 0;
  }
  .filter-row select,
  input,
  select,
  textarea {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0.58rem 0.65rem;
    background: var(--sheet);
    color: var(--ink);
  }
  .empty {
    background: var(--sheet);
    border: 1px dashed var(--line);
    padding: 1.5rem;
    border-radius: 10px;
    color: var(--muted);
    grid-column: 1/-1;
  }
  .photo-fallback {
    display: grid;
    place-items: center;
    background: var(--warm);
    color: var(--muted);
    height: 100%;
  }
  .timeline,
  .side-stack {
    display: grid;
    gap: 1rem;
  }
  .memory-row {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    padding: 0.75rem;
  }
  .memory-row img,
  .memory-row .photo-fallback {
    width: 116px;
    height: 84px;
    flex: none;
    object-fit: cover;
    border-radius: 7px;
  }
  .memory-row > span {
    display: grid;
    gap: 0.25rem;
  }
  .memory-row strong {
    font: 700 1.6rem/1.12 var(--display);
    letter-spacing: -0.04em;
  }
  .memory-row span span {
    color: var(--muted);
    font-size: 0.87rem;
  }
  .memory-row > svg {
    margin-left: auto;
    margin-right: 0.8rem;
    color: var(--accent-text);
  }
  .directory-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }
  .minor {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: underline;
  }
  .group-layout {
    align-items: start;
  }
  .place-detail .secondary {
    margin-top: 1rem;
  }
  .place-detail .link-button {
    display: block;
  }
  .welcome {
    padding: clamp(2rem, 6vw, 6rem) 0;
  }
  .welcome-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    min-height: min(560px, 68vh);
    overflow: hidden;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 19px;
  }
  .welcome-copy {
    padding: clamp(1.5rem, 4vw, 4rem);
    align-self: center;
  }
  .welcome-copy h1 {
    font-size: clamp(3.4rem, 6.6vw, 6.75rem);
    margin: 1.2rem 0 1.4rem;
    line-height: 0.98;
  }
  .welcome-copy h1 em {
    color: var(--accent-text);
    font-weight: 700;
    font-style: normal;
  }
  .welcome-copy p {
    color: var(--muted);
    font-size: 1.12rem;
    max-width: 34ch;
  }
  .welcome-actions {
    display: flex;
    margin: 1.75rem 0 0.95rem;
  }
  .welcome-copy small {
    font-size: 0.8rem;
  }
  .welcome-photo {
    position: relative;
    min-height: 300px;
  }
  .welcome-photo img {
    position: absolute;
    inset: 0;
    object-position: 58% 50%;
  }
  dialog {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.5rem;
    width: min(460px, calc(100% - 24px));
    max-height: 88dvh;
    background: var(--sheet);
    color: var(--ink);
    box-shadow: 0 24px 80px #0003;
  }
  dialog::backdrop {
    background: #18201880;
    backdrop-filter: blur(2px);
  }
  .dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
  }
  .dialog-head h2 {
    font-size: 2rem;
  }
  .dialog-head .round {
    width: 30px;
    height: 30px;
  }
  .invite-code {
    display: block;
    width: min(10.5rem, 100%);
    height: auto;
    margin: 1rem auto;
    border-radius: 8px;
    background: #fff;
  }
  .invite-expiry {
    font-size: 0.85rem;
    color: var(--muted);
  }
  .invite-code-details {
    margin-top: 0.85rem;
    color: var(--muted);
  }
  .ballot-voters {
    display: grid;
    gap: 0.85rem;
  }
  .ballot-voters section {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.55rem;
  }
  .ballot-voters ul {
    list-style: none;
    padding: 0;
    margin: 0.45rem 0 0;
  }
  .ballot-voters li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
  }
  .ballot-voters p,
  .ballot-voters small {
    color: var(--muted);
  }
  dialog form {
    display: grid;
    gap: 1rem;
  }
  dialog label {
    display: grid;
    gap: 0.27rem;
    font-size: 0.88rem;
    font-weight: 600;
  }
  dialog input,
  dialog select,
  dialog textarea {
    width: 100%;
    min-width: 0;
    font-weight: 400;
    font-size: 1rem;
  }
  dialog label.check-line {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    font-weight: 400;
  }
  dialog [type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
  }
  dialog fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  dialog fieldset label {
    padding: 0.25rem 0;
  }
  dialog > p:not(:empty) {
    margin: 0.75rem 0;
  }
  dialog > label {
    margin-bottom: 1rem;
  }
  dialog small {
    font-size: 0.81rem;
  }
  .help-box {
    background: var(--warm);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
  }
  .form-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .form-error:not(:empty) {
    color: var(--accent-text);
    font-weight: 550;
  }
  .form-error:empty {
    display: none;
  }
  #notice {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--paper);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    z-index: 10;
    box-shadow: var(--shadow);
    width: max-content;
    max-width: 90vw;
    text-align: center;
  }
  #notice:empty {
    display: none;
  }
}

@layer components {
  .brand-mark {
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    box-shadow: inset 0 0 0 1px #ffffff30;
  }
  .nav-label {
    display: none;
  }
  .winning-map {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-block: 1.2rem;
    border-color: var(--accent-text);
    background: color-mix(in srgb, var(--brand) 9%, var(--sheet));
  }
  .winning-map strong,
  .winning-map svg,
  .ballot-slot {
    color: var(--accent-text);
    vertical-align: middle;
  }
  .winning-map h2,
  .winning-map p {
    margin-block: 0.35rem;
  }
  .ballot-timing {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: -0.3rem 0 1rem;
    color: var(--muted);
  }
  .dinner-day {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 0.8rem 0.85rem;
    margin: 0 0 1.1rem;
    background: var(--sheet);
  }
  .meal-vote-help {
    margin: 0 0 0.85rem;
    color: var(--muted);
  }
  .notification-dashboard {
    display: grid;
    gap: 1rem;
  }
  .notification-rows {
    display: grid;
  }
  .notification-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    column-gap: 1rem;
    row-gap: 0.4rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }
  .notification-row:last-child {
    border-bottom: 0;
  }
  .notification-row > div {
    min-width: 0;
  }
  .notification-row small {
    color: var(--muted);
  }
  .notification-row summary {
    cursor: pointer;
  }
  .notification-status {
    color: var(--accent-text);
    font-size: 0.86rem;
    font-weight: 750;
  }
  .notification-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .notification-guide {
    width: min(52rem, calc(100% - 2rem));
    margin: 2rem auto;
  }
  .notification-guide section {
    margin: 1rem 0;
  }
  .notification-guide li {
    margin: 0.5rem 0;
  }
  .notification-guide code {
    overflow-wrap: anywhere;
  }
  .meal-ballot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
  }
  .meal-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: var(--sheet);
  }
  .meal-section summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.9rem;
    padding: 0.5rem 0.75rem;
    list-style: none;
    cursor: pointer;
  }
  .meal-section summary::-webkit-details-marker {
    display: none;
  }
  .meal-section[open] summary {
    border-bottom: 1px solid var(--line);
    background: var(--sage);
  }
  .meal-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.1rem 0.65rem;
    margin-right: auto;
    line-height: 1.2;
  }
  .meal-title strong {
    font-family: var(--display);
    font-size: 1.15rem;
  }
  .meal-title span,
  .meal-summary-count,
  .meal-option-copy small {
    font-size: 0.76rem;
    color: var(--muted);
  }
  .meal-title span,
  .meal-summary-count {
    white-space: nowrap;
  }
  .meal-summary-count,
  .meal-selections {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
  }
  .meal-selections {
    color: var(--accent-text);
    font-weight: 750;
    padding-right: 0.35rem;
    border-right: 1px solid var(--line);
  }
  .meal-caret {
    width: 0.42rem;
    height: 0.42rem;
    flex: none;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
  }
  .meal-section[open] .meal-caret {
    transform: translateY(2px) rotate(225deg);
  }
  .meal-options {
    margin: 0;
    padding: 0 0.65rem;
    list-style: none;
  }
  .meal-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.32rem 0;
    min-height: 3.35rem;
  }
  .meal-option + .meal-option {
    border-top: 1px solid var(--line);
  }
  .meal-option img {
    flex: none;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.42rem;
    object-fit: cover;
  }
  .meal-option-copy {
    display: grid;
    flex: 1;
    min-width: 0;
    align-content: center;
  }
  .meal-option-copy .text-button {
    justify-self: start;
    text-align: left;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .meal-option .mini {
    flex: none;
    min-height: 44px;
    padding-inline: 0.55rem;
  }
  .meal-remove {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: var(--warm);
    color: var(--ink);
  }
  .meal-empty,
  .meal-section > .link-button {
    margin: 0.65rem;
  }
  @media (max-width: 700px) {
    .meal-ballot {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.45rem;
    }
    .meal-title {
      gap: 0.15rem 0.5rem;
    }
    .meal-option img {
      width: 2.1rem;
      height: 2.1rem;
    }
  }
  .dinner-day legend {
    padding: 0 0.3rem;
    color: var(--accent-text);
    font-weight: 700;
  }
  .dinner-day-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 25rem;
    gap: 0.4rem;
  }
  .dinner-day-options button {
    justify-content: center;
    padding-inline: 0.3rem;
  }
  .dinner-day-options button.chosen {
    border-color: var(--accent-text);
    color: var(--accent-text);
    background: color-mix(in srgb, var(--brand) 15%, var(--sheet));
  }
  .dinner-day p {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0.65rem 0 0;
  }
  .dinner-tally {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-variant-numeric: tabular-nums;
  }
  .dinner-tally > span {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
  }
  .stats-panel p {
    color: var(--muted);
  }
  .stats-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
  }
  .stats-table th,
  .stats-table td {
    padding: 0.72rem 0.4rem;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }
  .stats-table th:first-child {
    text-align: left;
    overflow-wrap: anywhere;
  }
  .stats-table th .av {
    display: inline-grid;
    vertical-align: middle;
    margin-inline-end: 0.4rem;
  }
  .stats-table thead {
    color: var(--muted);
  }
  .page-head h1 {
    letter-spacing: -0.025em;
    font-size: clamp(3rem, 4.7vw, 4.65rem);
  }
  .hero-copy {
    position: relative;
    isolation: isolate;
    background: linear-gradient(
      115deg,
      var(--sheet) 35%,
      color-mix(in srgb, var(--brand) 8%, var(--sheet))
    );
  }
  .hero-copy::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 7rem;
    height: 5rem;
    z-index: -1;
    opacity: 0.24;
    background-image: radial-gradient(var(--accent-text) 1px, transparent 1px);
    background-size: 8px 8px;
    mask-image: linear-gradient(220deg, black, transparent 75%);
  }
  .hero-copy h2 {
    font-size: clamp(2.6rem, 4.7vw, 4.3rem);
    line-height: 0.99;
    margin: 0.8rem 0 1.15rem;
  }
  .hero-copy .eyebrow {
    color: var(--accent-text);
  }
  .hero-copy .rule {
    width: 8px;
    height: 8px;
    border: 0;
    background: var(--brand);
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--brand) 30%, transparent);
  }
  .hero-cta .primary,
  .welcome-actions .primary {
    color: var(--ready-ink);
    background: var(--ready);
    border-color: #8cb35d;
  }
  .primary,
  .secondary,
  .mini,
  .link-button {
    border-radius: 6px;
  }
  .hero-photo img {
    object-position: center;
  }
  .countdown {
    border-radius: 5px;
    font: 600 0.78rem/1.3 var(--mono);
    border: 1px solid #ffffff42;
    padding: 0.44rem 0.7rem;
  }
  .av-0,
  .avatar {
    background: #393350;
    color: #deceff;
  }
  .av-1 {
    background: #473543;
    color: #f7cfe4;
  }
  .av-2 {
    background: #294240;
    color: #bde7d9;
  }
  .av-3 {
    background: #47402d;
    color: #e9d8a6;
  }
  .eyebrow,
  .card-meta,
  .today,
  .demo-flag {
    font-family: var(--mono);
  }
  .card-meta {
    color: var(--accent-text);
  }
  .panel,
  .place-card,
  .memory-row,
  .rows {
    border-radius: 9px;
  }
  .card-image {
    aspect-ratio: 2.12;
  }
  .card-copy {
    padding: 0.9rem 1.05rem;
  }
  .card-copy h3 {
    letter-spacing: -0.015em;
  }
  .memory-row strong {
    letter-spacing: 0;
  }
  .section-head .eyebrow {
    color: var(--accent-text);
  }
  .signed-out .mast-inner {
    width: min(1200px, calc(100% - 64px));
  }
  .welcome-photo img {
    object-position: 55% 50%;
  }
  @media (min-width: 1051px) {
    .mast.signed-in {
      position: fixed;
      inset: 0 auto 0 0;
      width: 195px;
      border: 0;
      border-right: 1px solid var(--line);
      z-index: 4;
    }
    .signed-in .mast-inner {
      height: 100dvh;
      width: 100%;
      align-items: stretch;
      justify-content: flex-start;
      flex-direction: column;
      gap: 0;
      padding: 1.6rem 0.85rem;
    }
    .signed-in .brand {
      padding: 0 0.35rem;
    }
    .signed-in .brand-mark {
      width: 37px;
      height: 37px;
    }
    .signed-in .wordmark {
      font-size: 1.85rem;
    }
    .nav-label {
      display: block;
      margin: 3.2rem 0.8rem 0.65rem;
      font: 600 0.69rem/1.4 var(--mono);
      letter-spacing: 0.12em;
      color: var(--muted);
    }
    .top-nav {
      display: grid;
      gap: 0.35rem;
    }
    .top-nav a {
      justify-content: flex-start;
      gap: 0.8rem;
      padding: 0.78rem 0.85rem;
    }
    .top-nav a[aria-current="page"] {
      background: color-mix(in srgb, var(--brand) 18%, var(--sheet));
      color: var(--accent-text);
      box-shadow: inset 3px 0 var(--brand);
    }
    .signed-in .head-actions {
      margin-top: auto;
      display: flex;
      padding: 0.9rem 0.1rem 0;
      border-top: 1px solid var(--line);
      gap: 0.5rem;
      justify-content: space-between;
    }
    .workspace {
      margin: 0 auto 0 195px;
      width: calc(100% - 195px);
      max-width: 1720px;
      padding: 2.3rem clamp(1.8rem, 3.4vw, 3.8rem) 5rem;
    }
    .dinner-hero {
      grid-template-columns: 0.9fr 1.1fr;
    }
    .hero-copy {
      padding: clamp(1.45rem, 2.5vw, 2.65rem);
    }
  }
  @media (min-width: 1550px) {
    .workspace {
      padding-right: 5rem;
      padding-left: 5rem;
    }
  }
}
@layer responsive {
  @media (min-width: 1550px) {
    .workspace {
      padding-top: 3.2rem;
    }
    .hero-photo {
      min-height: 365px;
    }
  }
  @media (max-width: 1050px) {
    .mast-inner,
    .workspace,
    .welcome {
      width: calc(100% - 52px);
    }
    .top-nav a {
      padding: 0.55rem;
    }
    .top-nav svg {
      display: none;
    }
    .head-actions {
      gap: 0.5rem;
    }
    .mast-inner {
      gap: 0.7rem;
    }
    .top-nav {
      gap: 0.1rem;
    }
  }
  @media (max-width: 760px) {
    .mast-inner,
    .workspace,
    .welcome {
      width: calc(100% - 32px);
    }
    .mast-inner {
      height: 62px;
    }
    .brand-mark {
      width: 33px;
      height: 33px;
    }
    .wordmark {
      font-size: 1.62rem;
    }
    .top-nav {
      display: none;
    }
    .bottom-nav {
      position: fixed;
      z-index: 5;
      bottom: 0;
      left: 0;
      right: 0;
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      background: var(--sheet);
      border-top: 1px solid var(--line);
      padding: 0.36rem 0.25rem max(0.4rem, env(safe-area-inset-bottom));
    }
    .bottom-nav a {
      text-align: center;
      display: grid;
      justify-items: center;
      gap: 0.18rem;
      padding: 0.25rem 0.05rem;
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--muted);
    }
    .bottom-nav a[aria-current="page"] {
      color: var(--accent-text);
    }
    .workspace {
      padding: 1.65rem 0 6.25rem;
    }
    .page-head {
      gap: 0.6rem;
      flex-wrap: wrap;
      margin-bottom: 1.2rem;
    }
    .page-head h1 {
      font-size: 2.7rem;
    }
    .page-head .eyebrow {
      font-size: 0.67rem;
    }
    .page-head .today {
      font-size: 0.78rem;
    }
    .dinner-hero {
      grid-template-columns: 1fr 1fr;
    }
    .hero-copy {
      padding: 1.25rem;
    }
    .hero-copy h2 {
      font-size: 2.5rem;
    }
    .hero-photo {
      min-height: 245px;
    }
    .place-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.8rem;
    }
    .planning-layout,
    .group-layout {
      grid-template-columns: 1fr;
    }
    .section-head {
      margin-top: 1.7rem;
    }
    .welcome-grid {
      grid-template-columns: 1fr;
    }
    .welcome-photo {
      grid-row: 1;
      min-height: 235px;
      max-height: 285px;
    }
    .welcome-copy {
      padding: 1.65rem;
    }
    .welcome-copy h1 {
      margin: 0.8rem 0;
      font-size: 3.75rem;
    }
    .welcome-copy h1 br {
      display: none;
    }
    .welcome-copy h1 em:before {
      content: " ";
    }
    .welcome {
      padding: 1.3rem 0;
    }
    .welcome-copy p {
      max-width: 42ch;
    }
    .welcome-actions {
      margin: 1.1rem 0 0.65rem;
    }
    #notice {
      bottom: 5rem;
    }
    .group-layout .panel {
      padding: 1.1rem;
    }
  }
  @media (max-width: 540px) {
    .dinner-hero {
      display: flex;
      flex-direction: column;
    }
    .hero-photo {
      order: -1;
      min-height: 0;
      aspect-ratio: 2.2;
    }
    .hero-cta {
      margin: 1rem 0 0.8rem;
    }
    .hero-copy h2 {
      margin: 0.45rem 0 0.55rem;
    }
    .countdown {
      top: 0.7rem;
      right: 0.7rem;
      font-size: 0.75rem;
    }
    .place-grid {
      grid-template-columns: 1fr;
    }
    .card-image {
      aspect-ratio: 2.2;
    }
    .card-copy h3 {
      font-size: 1.6rem;
    }
    .page-head .today {
      display: none;
    }
    .filter-row {
      flex-wrap: wrap;
    }
    .search {
      flex-basis: 100%;
    }
    .filter-row select,
    .filter-row button {
      flex: 1;
    }
    .panel {
      padding: 1.2rem;
    }
    .section-head {
      gap: 0.6rem;
    }
    .section-head h2 {
      font-size: 1.95rem;
    }
    .memory-row {
      gap: 0.7rem;
    }
    .memory-row strong {
      font-size: 1.3rem;
    }
    .memory-row img,
    .memory-row .photo-fallback {
      width: 78px;
      height: 74px;
    }
    .memory-row > svg {
      display: none;
    }
    .head-actions .demo-flag {
      font-size: 0.7rem;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
      transition: none !important;
      animation: none !important;
      scroll-behavior: auto !important;
    }
  }
}

@layer components {
  .ride-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    min-height: 17rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 1.7rem;
    background: var(--sheet);
  }
  .ride-intro {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.65rem;
    padding: clamp(1.25rem, 3vw, 2.6rem);
  }
  .ride-intro h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 0.98;
  }
  .ride-intro p,
  .ride-intro .actions {
    margin: 0;
  }
  .ride-hero > img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center 55%;
  }
  .ride-regions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .ride-regions.single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 42rem;
  }
  .ride-region .section-head {
    margin-block: 0.25rem 0.85rem;
  }
  .ride-status {
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: color-mix(in srgb, var(--brand) 12%, var(--sheet));
    color: var(--accent-text);
    font-size: 0.8rem;
    font-weight: 700;
  }
  .ride-vehicle {
    margin-bottom: 0.85rem;
    padding: 1rem;
  }
  .ride-driver {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
  }
  .ride-driver h3 {
    margin: 0.18rem 0 0;
    overflow-wrap: anywhere;
  }
  .ride-driver-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    color: var(--accent-text);
    background: color-mix(in srgb, var(--brand) 16%, var(--sheet));
  }
  .ride-seats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    gap: 0.45rem;
    padding: 0;
    margin: 0.85rem 0;
  }
  .ride-seats li {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.25rem;
    min-height: 4.4rem;
    padding: 0.42rem;
    border: 1px dashed var(--line);
    border-radius: 7px;
    font-size: 0.75rem;
    color: var(--muted);
    overflow-wrap: anywhere;
  }
  .ride-seats .occupied {
    border-style: solid;
    border-color: var(--accent-text);
    color: inherit;
  }
  .ride-seat-icon {
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--brand) 12%, var(--sheet));
    color: var(--accent-text);
    border-radius: 6px;
    width: 1.65rem;
    height: 1.65rem;
    font-weight: 700;
  }
  .ride-waiting {
    margin-top: 0.85rem;
    color: var(--muted);
  }
  .ride-waiting strong {
    display: block;
  }
  .ride-choices {
    display: grid;
    gap: 0.35rem;
  }
  .ride-choices label {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 6px;
  }
  .ride-choices label:has(:checked) {
    border-color: var(--accent-text);
    background: color-mix(in srgb, var(--brand) 12%, var(--sheet));
  }
  .ride-choices small {
    display: block;
    color: var(--muted);
  }
  .clear-ride {
    margin-top: 0.65rem;
  }
  @media (max-width: 680px) {
    .ride-hero {
      grid-template-columns: minmax(0, 1fr);
      min-height: 0;
    }
    .ride-hero > img {
      grid-row: 1;
      height: auto;
      aspect-ratio: 2.05;
    }
    .ride-regions {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.85rem;
    }
    .bottom-nav a {
      font-size: 0.66rem;
    }
  }
  .page-head p {
    max-width: 55ch;
    margin-top: 0.55rem;
    color: var(--muted);
  }
  .planning-match {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }
  .match-detail .panel h2 {
    margin-top: 0;
  }
  .match-detail .panel .secondary {
    margin-top: 0.75rem;
  }
  .match-attendees {
    list-style: none;
    display: grid;
    gap: 0.7rem;
    padding: 0;
    margin: 0;
  }
  .match-attendees li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }
  .match-gallery figure {
    margin: 0;
  }
  .match-gallery figure > a {
    display: block;
    aspect-ratio: 4 / 3;
  }
  .match-gallery figcaption {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    padding: 0.65rem 0.85rem;
    color: var(--muted);
    font-size: 0.875rem;
  }
}
