:root {
  --butter: #f6d494;
  --teal: #0c8195;
  --deep-teal: #155f7a;
  --ink: #253247;
  --purple: #3b1d6a;
  --pink: #e84f92;
  --gold: #f2b853;
  --paper: #fff9ed;
  --line: rgba(37, 50, 71, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--butter);
  overflow-x: hidden;
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

input[type="date"].date-prompt {
  color: rgba(37, 50, 71, 0.48);
}

input[type="date"].date-selected {
  color: var(--ink);
}

input[type="date"] {
  appearance: auto;
  -webkit-appearance: auto;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  max-width: 520px;
  margin: 0 auto;
  background: var(--butter);
  border: 6px solid var(--teal);
  border-radius: 28px;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(37, 50, 71, 0.06);
}

.cover-screen {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  border: 0;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: white;
  color: var(--deep-teal);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cover-image {
  width: min(calc(100vw - 36px), 386px);
  height: auto;
  max-height: calc(100svh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  object-fit: contain;
  display: block;
  margin: auto;
}

.top-panel {
  background: var(--purple);
  min-height: auto;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(37, 50, 71, 0.08);
}

.header-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--purple);
  padding: 0;
}

.header-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.bird-crop {
  min-height: 96px;
  padding: 8px 14px 0;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bird-crop img {
  width: min(42%, 145px);
  max-height: 128px;
  object-fit: contain;
}

.title-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  align-items: center;
  padding: 2px 16px 8px;
}

.title-row h1 {
  margin: 0;
  text-align: center;
}

.title-row h1 {
  font-size: 24px;
  line-height: 1.05;
  color: var(--deep-teal);
  word-spacing: 6px;
}

.icon-button,
.bottom-nav button,
.win-box {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 249, 237, 0.72);
  color: var(--deep-teal);
  display: grid;
  place-items: center;
}

.icon-spacer {
  width: 44px;
}

.content {
  flex: 1;
  padding: 18px;
}

.home-hero {
  min-height: calc(100svh - 92px - env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: var(--butter);
}

.home-hero img {
  width: min(100%, 460px);
  max-height: 62svh;
  object-fit: contain;
  justify-self: center;
}

.home-copy {
  text-align: center;
  padding-bottom: 8px;
}

.home-copy h1 {
  margin: 0 0 14px;
  color: var(--deep-teal);
  font-size: clamp(31px, 10vw, 48px);
  line-height: 1;
}

.home-copy h1 span {
  white-space: nowrap;
}

.home-next {
  display: block;
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: 8px;
  background: rgba(255, 249, 237, 0.58);
  border: 1px solid rgba(59, 29, 106, 0.16);
  color: var(--ink);
  text-decoration: none;
}

.home-next span {
  display: block;
  color: var(--purple);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.home-next strong {
  display: block;
  color: var(--deep-teal);
  font-size: 24px;
  margin-top: 2px;
}

.home-next p {
  margin: 5px 0 0;
}

.map-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.map-choices a {
  min-height: 38px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7px 6px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.map-toggle {
  margin-top: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  padding: 7px 14px;
  font-weight: 900;
}

.stack {
  display: grid;
  gap: 16px;
}

.next-game,
.panel,
.hand-section {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(37, 50, 71, 0.05);
  min-width: 0;
}

.next-game {
  padding: 16px;
  border-left: 6px solid var(--pink);
}

.next-game span,
.field span,
.upload-box small,
.schedule-item small {
  color: rgba(37, 50, 71, 0.68);
}

.next-game strong {
  display: block;
  font-size: 25px;
  color: var(--purple);
  margin-top: 2px;
}

.next-game p {
  margin: 6px 0 0;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active {
  transform: translateY(2px);
}

.panel {
  padding: 16px;
  overflow: hidden;
}

.panel h2,
.hand-section h2 {
  margin: 0 0 13px;
  color: var(--purple);
  font-size: 19px;
}

.panel h2.subtle-heading {
  color: rgba(37, 50, 71, 0.68);
  font-size: 16px;
  margin-bottom: 12px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-title-row h2 {
  margin: 0;
}

.add-game-button {
  flex: 0 0 auto;
  background: var(--teal);
  color: white;
  box-shadow: 0 6px 16px rgba(12, 129, 149, 0.18);
}

.collapsible-panel summary {
  color: var(--purple);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  list-style-position: inside;
}

.collapsible-panel form {
  margin-top: 14px;
}

.helper-copy {
  margin: 0;
  color: rgba(37, 50, 71, 0.72);
  font-weight: 800;
  line-height: 1.35;
}

.form-grid {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 800;
  min-width: 0;
}

.host-tool-stack {
  display: grid;
  gap: 14px;
}

.host-tool-stack .primary-button {
  margin-top: 8px;
  justify-self: stretch;
  width: 100%;
  padding-left: 18px;
  padding-right: 22px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 10px;
}

.button-row .secondary-button,
.button-row .danger-button {
  width: 100%;
}

.compact-danger {
  font-size: 0.9rem;
  text-transform: none;
}

.form-grid .primary-button {
  width: 100%;
  justify-self: stretch;
}

.note-clear-button {
  justify-self: start;
  min-height: 40px;
  padding: 8px 14px;
  text-transform: none;
}

.field input,
.field select,
textarea {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  display: block;
}

.field select {
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--deep-teal) 50%),
    linear-gradient(135deg, var(--deep-teal) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 13px) 50%;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

.field input[type="date"] {
  appearance: auto;
  -webkit-appearance: auto;
  text-align: left;
  color: var(--ink);
  justify-content: flex-start;
  line-height: normal;
  padding-left: 12px;
}

.field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

.field input[type="date"].date-selected {
  color: var(--ink);
  text-align: left;
}

textarea {
  resize: vertical;
}

.input-with-action {
  position: relative;
}

.input-with-action svg {
  position: absolute;
  left: 12px;
  top: 14px;
  color: var(--teal);
}

.input-with-action input {
  padding-left: 42px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  background: var(--deep-teal);
  color: white;
}

.secondary-button {
  width: 100%;
  background: var(--pink);
  color: white;
}

.danger-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: white;
  font-weight: 900;
  text-transform: uppercase;
}

.cancel-panel .danger-button {
  margin-top: 16px;
  width: 100%;
}

.upload-box {
  min-height: 150px;
  border: 2px dashed rgba(12, 129, 149, 0.46);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px;
  color: var(--deep-teal);
  font-weight: 900;
  position: relative;
}

.upload-box small {
  white-space: nowrap;
}

.upload-box ul {
  margin: 4px 0 0;
  padding-left: 20px;
  text-align: left;
  justify-self: center;
  color: var(--deep-teal);
  font-size: 13px;
  line-height: 1.35;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.group-field {
  margin-bottom: 14px;
}

.status {
  margin: 10px 0 0;
  color: var(--deep-teal);
  font-weight: 800;
}

.empty-schedule-link {
  color: var(--deep-teal);
  font-weight: 900;
  line-height: 1.25;
  padding: 2px 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.share-group-button {
  width: 100%;
  background: var(--pink);
  display: flex;
  justify-content: center;
  text-align: center;
}

.group-action-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.group-action-row .outline-button,
.group-action-row .text-link-button {
  min-height: 44px;
  padding: 9px 10px;
  font-size: 0.88rem;
}

.leave-group-button {
  width: 100%;
  text-align: center;
}

.status-loaded {
  color: var(--pink);
}

.save-confirmation {
  margin: 0;
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(12, 129, 149, 0.12);
  color: var(--deep-teal);
  font-weight: 900;
  text-align: center;
}

.popup-status {
  margin-top: -4px;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-section {
  margin-top: 14px;
}

.schedule-section summary {
  min-height: 46px;
  border-radius: 8px;
  background: rgba(12, 129, 149, 0.12);
  color: var(--deep-teal);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  list-style: none;
  padding: 10px 12px;
}

.schedule-section summary::-webkit-details-marker {
  display: none;
}

.schedule-section summary::before {
  content: '▶';
  color: var(--purple);
  font-size: 14px;
  transition: transform 0.16s ease;
}

.schedule-section[open] summary::before {
  transform: rotate(90deg);
}

.schedule-section .schedule-list,
.schedule-section .status {
  margin-top: 10px;
}

.group-toggle {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin-top: -2px;
}

.group-toggle button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: white;
  color: var(--deep-teal);
  font-weight: 900;
  padding: 7px 12px;
  cursor: pointer;
}

.group-toggle button.active {
  background: var(--teal);
  color: white;
}

.group-chip {
  color: var(--pink);
  font-size: 11px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.schedule-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 3px;
  background: white;
  color: var(--ink);
  text-align: left;
  width: 100%;
}

.schedule-card {
  position: relative;
  padding: 0;
}

.schedule-card-main {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px 48px 12px 12px;
  cursor: pointer;
}

.schedule-item strong {
  color: var(--deep-teal);
}

.schedule-card-date {
  display: grid;
  gap: 2px;
}

.schedule-card-date span {
  white-space: nowrap;
}

.schedule-card-date em {
  color: var(--teal);
  font-style: normal;
  font-size: 0.88rem;
  justify-self: start;
}

.schedule-card {
  cursor: pointer;
}

.calendar-link {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--teal);
  text-decoration: none;
  cursor: pointer;
}

.calendar-link svg {
  width: 19px;
  height: 19px;
}

.schedule-card.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(12, 129, 149, 0.18);
}

.address-link {
  display: grid;
  gap: 3px;
  color: var(--deep-teal);
  font-weight: 900;
  margin-bottom: 14px;
}

.address-link span {
  color: var(--ink);
  font-weight: 700;
}

.address-link a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.directions-title {
  margin: 8px 0 -4px;
  color: var(--purple);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.schedule-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(78px, max-content);
  column-gap: 10px;
  row-gap: 8px;
  align-items: start;
  margin-bottom: 12px;
}

.schedule-detail-head h2 {
  margin: 0;
  font-size: clamp(1.05rem, 4.8vw, 1.55rem);
  white-space: nowrap;
}

.schedule-detail-time {
  margin: 4px 0 0;
  color: var(--teal);
  font-size: clamp(0.82rem, 3.9vw, 1rem);
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.text-link-button {
  border: 0;
  border-radius: 8px;
  background: var(--pink);
  color: white;
  cursor: pointer;
  font-weight: 900;
  padding: 9px 13px;
  text-decoration: none;
}

.schedule-detail .map-choices {
  margin-bottom: 14px;
}

.schedule-detail h3 {
  margin: 18px 0 8px;
  color: var(--purple);
  font-size: 16px;
}

.schedule-tracker {
  position: static;
  bottom: auto;
  margin: 14px 0;
}

.schedule-tracker button {
  min-height: 94px;
  border-radius: 8px;
  border: 2px solid var(--teal);
  background: #fffdf8;
  display: grid;
  grid-template-rows: 34px 1fr;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.schedule-tracker button.active {
  box-shadow: 0 0 0 3px rgba(232, 79, 146, 0.26);
}

.rsvp-names ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.rsvp-list-modal {
  position: relative;
  display: grid;
  gap: 12px;
}

.rsvp-list-modal h2 {
  margin: 4px 34px 0 0;
  color: var(--deep-teal);
}

.rsvp-list-modal > p {
  margin: 0;
  color: rgba(37, 50, 71, 0.72);
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 129, 149, 0.12);
  color: var(--deep-teal);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.rsvp-list-modal .secondary-button {
  width: 100%;
}

.schedule-detail-modal {
  position: relative;
  display: grid;
  gap: 12px;
  max-height: min(86vh, 820px);
  overflow-y: auto;
}

.schedule-detail-modal .schedule-detail-head {
  margin: 0 0 2px 0;
  align-items: start;
}

.schedule-detail-modal .schedule-detail-head .text-link-button {
  margin: 36px 34px 0 0;
  justify-self: end;
  align-self: start;
  min-width: 78px;
  text-align: center;
}

.add-calendar-detail {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  margin: 8px 0 16px;
}

.schedule-detail-modal .map-choices {
  margin-top: 2px;
  margin-bottom: 0;
}

.schedule-detail-modal .schedule-tracker {
  position: static;
  bottom: auto;
  z-index: auto;
  margin: 12px 0 18px;
}

.schedule-detail-modal .secondary-button {
  width: 100%;
}

.note-list {
  display: grid;
  gap: 9px;
}

.note-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.note-list article span {
  display: inline-block;
  margin-left: 7px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 900;
}

.note-list article p {
  margin: 6px 0 0;
  line-height: 1.35;
}

.settings-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.settings-row,
.settings-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.settings-row {
  min-height: 52px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.settings-button {
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.settings-row span,
.settings-detail summary {
  font-weight: 900;
}

.settings-row strong {
  color: var(--deep-teal);
  font-size: 13px;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback-link strong {
  color: var(--pink);
}

.settings-detail summary {
  min-height: 52px;
  padding: 14px 12px;
  cursor: pointer;
  color: var(--ink);
}

.settings-detail p {
  margin: 0;
  padding: 0 12px 14px;
  color: rgba(37, 50, 71, 0.78);
  line-height: 1.4;
}

.reminder-bird {
  min-height: 220px;
  border-radius: 8px;
  background: var(--butter);
  display: flex;
  justify-content: center;
  align-items: center;
}

.reminder-bird img {
  width: min(100%, 300px);
  max-height: 310px;
  object-fit: contain;
}

.reminder-preview p {
  margin: 8px 0;
}

.reminder-preview {
  background: #fffdf8;
  border: 3px solid var(--teal);
  border-radius: 10px;
  color: var(--teal);
}

.reminder-preview h2 {
  margin: 16px 0 22px;
  color: var(--teal);
  font-size: 34px;
  line-height: 1.02;
  text-align: center;
}

.reminder-copy {
  display: grid;
  gap: 22px;
  padding: 2px 2px 24px;
}

.reminder-copy p {
  margin: 0;
  display: grid;
  gap: 6px;
}

.reminder-copy strong {
  color: var(--teal);
  font-size: 13px;
  letter-spacing: 0;
}

.reminder-copy span {
  font-size: 20px;
  color: var(--teal);
}

.rsvp-button {
  width: min(220px, 100%);
  margin: 0 auto;
  font-size: 20px;
}

.segmented {
  border: 0;
  padding: 0;
  margin: 0;
}

.segmented legend {
  font-weight: 900;
  margin-bottom: 6px;
}

.segmented div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segmented-2 div {
  grid-template-columns: repeat(2, 1fr);
}

.segmented label {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented .selected {
  background: var(--gold);
  border-color: var(--gold);
  color: #35194d;
}

.tracker {
  position: sticky;
  bottom: calc(74px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  z-index: 2;
}

.tracker div,
.tracker button {
  min-height: 94px;
  border-radius: 8px;
  background: #fffdf8;
  color: white;
  display: grid;
  grid-template-rows: 34px 1fr;
  overflow: hidden;
  border: 2px solid var(--teal);
}

.tracker strong {
  display: grid;
  place-items: center;
  min-height: 56px;
  background: var(--pink);
  color: white;
  font-size: 34px;
  line-height: 1;
}

.tracker span {
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--purple);
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
}

.hand-grid {
  display: grid;
  gap: 12px;
}

.hand-actions {
  margin-top: 16px;
  margin-bottom: 2px;
  display: grid;
  place-items: center;
}

.hand-section {
  padding: 14px;
  overflow: hidden;
  text-align: center;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 42px));
  gap: 5px;
  justify-content: center;
  max-width: 100%;
}

.hand-count {
  display: grid;
  gap: 4px;
}

.hand-count span {
  color: rgba(37, 50, 71, 0.66);
  font-size: 8px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.win-box {
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  border: 2px solid var(--deep-teal);
  border-radius: 7px;
  background: white;
  color: white;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.hand-actions .danger-button {
  width: min(280px, 100%);
  text-transform: none;
}

.win-box.checked {
  background: var(--teal);
}

.bottom-nav {
  position: relative;
  left: 0;
  bottom: auto;
  transform: none;
  width: 100%;
  margin-top: 0;
  padding: 7px 4px 8px;
  background: var(--deep-teal);
  border-top: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  z-index: 4;
}

.bottom-nav button {
  min-height: 52px;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-size: 8px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
}

.bottom-nav button svg {
  width: 21px;
  height: 21px;
}

.bottom-nav button span {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
}

.bottom-nav button.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.app-footer {
  min-height: calc(72px + env(safe-area-inset-bottom));
  margin-top: auto;
  background: var(--deep-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(14px + env(safe-area-inset-bottom));
}

.app-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  padding: 0;
  background: transparent;
}

.app-footer img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.swap-options {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.swap-options legend {
  font-weight: 900;
  margin-bottom: 6px;
}

.swap-options label {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font-weight: 800;
}

.swap-card {
  gap: 8px;
}

.swap-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.outline-button {
  min-height: 52px;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background: white;
  color: var(--deep-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(37, 50, 71, 0.42);
}

.confirm-modal {
  width: min(100%, 360px);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  box-shadow: 0 24px 60px rgba(37, 50, 71, 0.25);
  border: 2px solid rgba(12, 129, 149, 0.22);
  position: relative;
}

.confirm-modal h2 {
  margin: 0 0 10px;
  color: var(--purple);
  font-size: 21px;
}

.schedule-game-modal {
  max-height: min(88svh, 680px);
  overflow-y: auto;
}

.confirm-modal p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.35;
}

.upload-warning-modal {
  padding-top: 48px;
}

.upload-warning-modal .primary-button {
  width: 100%;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.celebration {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 249, 237, 0.1);
}

.celebration strong {
  position: relative;
  z-index: 2;
  padding: 20px 24px;
  border-radius: 999px;
  background: var(--purple);
  color: white;
  font-size: clamp(28px, 9vw, 42px);
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 20px 50px rgba(37, 50, 71, 0.28);
  animation: praise-zip 1.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tile-burst {
  position: absolute;
  inset: 0;
}

.tile-burst i {
  position: absolute;
  left: var(--left);
  bottom: -64px;
  width: 34px;
  height: 46px;
  border-radius: 6px;
  border: 2px solid var(--deep-teal);
  background: #fffdf8;
  color: var(--deep-teal);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(37, 50, 71, 0.18);
  opacity: 0;
  animation: tile-fly 1.85s ease-out var(--d) both;
}

.tile-burst i.bam {
  color: var(--teal);
  border-color: var(--teal);
}

.tile-burst i.crak {
  color: var(--pink);
  border-color: var(--pink);
}

.tile-burst i.dot {
  color: var(--purple);
  border-color: var(--purple);
}

.tile-burst i.mahj {
  background: var(--gold);
  color: var(--purple);
  border-color: var(--purple);
}

@keyframes praise-zip {
  0% {
    opacity: 0;
    transform: translateX(-115vw) rotate(-8deg) scale(0.88);
  }

  24% {
    opacity: 1;
    transform: translateX(0) rotate(2deg) scale(1.08);
  }

  44% {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
  }

  70% {
    opacity: 1;
    transform: translateX(0) rotate(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(115vw) rotate(8deg) scale(0.9);
  }
}

@keyframes tile-fly {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.72);
  }

  10% {
    opacity: 1;
    transform: translate3d(calc(var(--drift) * 0.08), -18vh, 0) rotate(calc(var(--rot) * 0.2)) scale(1);
  }

  68% {
    opacity: 1;
    transform: translate3d(calc(var(--drift) * 0.82), calc(var(--lift) * -0.78), 0) rotate(calc(var(--rot) * 0.82)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), calc(var(--lift) * -1), 0) rotate(var(--rot)) scale(0.8);
  }
}

.legal-review-links {
  display: grid;
  gap: 8px;
}

.legal-review-links button {
  border: 1px solid rgba(12, 129, 149, 0.28);
  border-radius: 8px;
  background: white;
  color: var(--deep-teal);
  font-weight: 900;
  min-height: 44px;
  text-align: center;
}

.time-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.legal-backdrop {
  z-index: 13;
}

.legal-modal {
  max-height: min(86vh, 720px);
  display: grid;
  gap: 12px;
}

.legal-scroll {
  max-height: min(58vh, 480px);
  overflow-y: auto;
  padding-right: 6px;
}

.legal-scroll p {
  padding: 0;
  margin: 0 0 12px;
}

.check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-weight: 800;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

@keyframes praise-pop {
  0% {
    transform: scale(0.75);
    opacity: 0;
  }

  14%,
  78% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.94);
    opacity: 0;
  }
}

@media (min-width: 430px) {
  .content {
    padding-left: 22px;
    padding-right: 22px;
  }

  .bird-crop {
    min-height: 390px;
  }
}
