/* Elizabeth Rose Boutique · Mahjong interest list
   Palette: ivory, blush, muted rose (with a little sage from the tiles). */

:root {
  --ivory: #faf6f0;
  --ivory-card: #fffdf9;
  --blush: #f4e3dd;
  --blush-deep: #eed6cf;
  --blush-line: #e7d0c9;
  --rose: #74324a;
  --rose-hover: #5f2639;
  --rose-ink: #5c2639;
  --rose-soft: #a8707f;
  /* From the Elizabeth Rose Boutique logo */
  --logo-ink: #8e5a4b;
  --logo-peach: #f9d5c6;
  --ink: #33262a;
  --ink-soft: #66545a;
  --line: #e8dbd5;
  --input-line: #bfa7a1;
  --sage-bg: #ebf0e0;
  --sage-line: #c8d3b6;
  --sage-ink: #3d5636;
  --error: #a3233c;
  --error-bg: #fbeef0;
  --focus: #74324a;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 24px;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--rose-ink);
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--rose);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--rose-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

code {
  font-size: 0.92em;
  background: var(--blush);
  padding: 1px 5px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--rose);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  padding-top: 20px;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  max-width: 1120px;
}

@media (min-width: 640px) {
  .header-inner {
    width: calc(100% - 32px);
    padding-left: 0;
    padding-right: 0;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--logo-ink);
  border-radius: var(--radius);
}

.brand:hover {
  color: var(--logo-ink);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--logo-peach);
  color: var(--logo-ink);
  flex: none;
}

.rose-mark {
  display: block;
  width: auto;
  height: 37px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-family: var(--serif);
  font-size: 0.7rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin-top: 5px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.header-actions form {
  margin: 0;
}

.text-link {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 28px 16px 36px;
}

/* Shopper page -------------------------------------------------------------- */

.event-layout {
  display: grid;
  gap: 20px;
  margin: 28px auto 0;
  max-width: 1120px;
}

@media (min-width: 900px) {
  .event-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 36px;
  }
}

.event-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--blush-line);
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(255, 246, 242, 0.9) 0%, rgba(255, 246, 242, 0) 60%),
    linear-gradient(165deg, #f5e5df 0%, var(--blush-deep) 100%);
  padding: 28px 24px 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .event-card {
    padding: 40px 42px 0;
  }
}

.pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--sage-line);
  background: var(--sage-bg);
  color: var(--sage-ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #557a4b;
}

.event-card h1 {
  font-size: clamp(2.5rem, 9vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 22px 0 18px;
}

.event-place {
  color: var(--ink-soft);
  font-size: 1rem;
}

.event-rule {
  border: 0;
  border-top: 1px solid rgba(116, 50, 74, 0.2);
  margin: 22px 0 18px;
}

.event-date {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--rose-ink);
}

.event-date strong {
  font-size: 1.05rem;
}

.event-tag {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.tiles {
  margin: 14px auto 0;
  width: 100%;
  max-width: 290px;
}

@media (min-width: 640px) {
  .tiles {
    max-width: 360px;
  }
}

.tiles-art {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 900px) {
  .tiles {
    margin-top: auto;
    padding-top: 28px;
    max-width: 400px;
  }
}

/* Cards ----------------------------------------------------------------------- */

.signup-card,
.card {
  background: var(--ivory-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
}

@media (min-width: 640px) {
  .signup-card,
  .card {
    padding: 36px 36px;
  }
}

.signup-card h2 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.intro {
  color: var(--ink-soft);
  margin-top: 14px;
}

/* Forms ----------------------------------------------------------------------- */

.signup-form {
  margin-top: 26px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--input-line);
  border-radius: var(--radius);
  appearance: none;
}

input::placeholder {
  color: #8f7d82;
  opacity: 1;
}

input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--rose);
}

input[aria-invalid="true"] {
  border: 2px solid var(--error);
  padding: 9px 13px;
}

.field-error {
  color: var(--error);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.contact-hint {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: -4px 0 18px;
}

.contact-hint.is-error {
  color: var(--error);
  font-weight: 600;
}

.hint {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

.form-note {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid var(--rose);
  border-radius: var(--radius);
  background: var(--rose);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--rose-hover);
  border-color: var(--rose-hover);
  color: #fff;
}

.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.button-secondary {
  background: transparent;
  color: var(--rose);
}

.button-secondary:hover {
  background: var(--blush);
  color: var(--rose-hover);
}

.button-small {
  width: auto;
  min-height: 40px;
  padding: 6px 16px;
  font-size: 0.95rem;
}

.button-compact {
  width: auto;
  white-space: nowrap;
}

.button-danger {
  background: var(--error);
  border-color: var(--error);
}

.button-danger:hover {
  background: #861a2f;
  border-color: #861a2f;
}

.error-summary {
  border: 1px solid #ebc3cb;
  border-left: 5px solid var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 20px;
  color: var(--ink);
}

.error-summary h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--error);
}

.error-summary ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.error-summary a {
  color: var(--error);
  font-weight: 600;
}

/* Result states ------------------------------------------------------------- */

.result h2 {
  margin-top: 4px;
}

.result p {
  margin-top: 14px;
  color: var(--ink-soft);
}

.result .result-lead {
  color: var(--rose-ink);
  font-weight: 600;
  font-size: 1.1rem;
}

.result-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-bg);
  border: 1px solid var(--sage-line);
  color: var(--sage-ink);
  margin-bottom: 14px;
}

@media (min-width: 900px) {
  .signup-card {
    align-self: start;
  }
}

/* Notices --------------------------------------------------------------------- */

.notice,
.warning {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 18px;
}

.notice {
  background: var(--sage-bg);
  border: 1px solid var(--sage-line);
  color: var(--sage-ink);
  font-weight: 600;
}

.warning {
  background: #fff6e6;
  border: 1px solid #edd5a6;
  color: #6b4a12;
}

/* Owner pages ----------------------------------------------------------------- */

.login-card,
.narrow-card {
  max-width: 460px;
  margin: 40px auto 0;
}

.login-card h1,
.narrow-card h1 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.login-card form {
  margin-top: 24px;
}

.narrow-card p {
  margin-top: 14px;
}

.panel {
  max-width: 1120px;
  margin: 28px auto 0;
  display: grid;
  gap: 20px;
}

.panel-head h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.panel-sub {
  color: var(--ink-soft);
  margin-top: 6px;
}

.panel .notice,
.panel .warning {
  margin-top: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .stats {
    gap: 16px;
  }
}

.stat {
  background: var(--blush);
  border: 1px solid var(--blush-line);
  border-radius: 16px;
  padding: 14px 12px;
}

@media (min-width: 640px) {
  .stat {
    padding: 20px 22px;
  }
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.25;
}

.stat-value {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  color: var(--rose-ink);
  line-height: 1.1;
  margin-top: 6px;
}

.stat-action,
.stat-pending {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 6px;
}

.stat-pending {
  color: var(--ink-soft);
}

.form-status {
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--ivory-card);
  border: 1px solid var(--line);
}

.form-status.is-closed {
  background: var(--error-bg);
  border-color: #ebc3cb;
}

.card h2 {
  font-size: 1.6rem;
  letter-spacing: -0.015em;
}

.capacity-form {
  margin-top: 16px;
}

.capacity-form .field {
  margin-bottom: 0;
}

.inline-field {
  display: flex;
  gap: 10px;
}

.inline-field input {
  max-width: 140px;
}

/* Game details: date, time note, Tentative checkbox. */

.game-form {
  margin-top: 16px;
}

.game-form .field input {
  max-width: 320px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.check-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: var(--rose);
}

.check-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.section-actions {
  margin-top: 16px;
}

/* Past games list. */

.game-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.game-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.game-list li:first-child {
  border-top: 0;
}

.game-list .game-meta {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.empty {
  color: var(--ink-soft);
  margin-top: 12px;
}

/* Signups table: rows become cards on narrow screens. Explicit ARIA roles keep
   the table semantics when the display type changes. */

.signup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.97rem;
}

.signup-table th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.signup-table td {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.cell-name {
  font-weight: 600;
}

.contact {
  overflow-wrap: anywhere;
}

.cell-action {
  text-align: right;
  white-space: nowrap;
}

.remove-link {
  display: inline-block;
  font-weight: 600;
  color: var(--error);
  padding: 6px 4px;
}

.remove-link:hover {
  color: #861a2f;
}

@media (max-width: 759px) {
  .signup-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .signup-table,
  .signup-table tbody,
  .signup-table tr,
  .signup-table td {
    display: block;
    width: 100%;
  }

  .signup-table tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #fff;
  }

  .signup-table td {
    border: 0;
    padding: 4px 0;
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 8px;
  }

  .signup-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    padding-top: 1px;
  }

  .signup-table .cell-name {
    font-size: 1.05rem;
  }

  .signup-table .cell-action {
    display: block;
    text-align: left;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid var(--line);
  }
}

.details {
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
}

.details div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 8px;
}

.details dt {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.actions .button {
  width: auto;
  flex: 1 1 160px;
}

@media (forced-colors: active) {
  .button,
  .stat,
  .pill {
    border: 1px solid ButtonText;
  }
}
