  :root {
    --bg: #f8f1de;
    --surface: #fffdf7;
    --surface-raised: #ffffff;
    --ink: #33101b;
    --ink-soft: #7a4356;
    --ink-faint: #a9788a;
    --accent: #a8752a;
    --accent-strong: #8a5f22;
    --accent-ink: #fffdf7;
    --line: #e6d9b8;
    --title-ink: var(--ink);
    --line-soft: #efe6cb;
    --danger: #b3261e;
    --shadow: 0 1px 2px rgba(51, 16, 27, 0.06), 0 8px 24px -12px rgba(51, 16, 27, 0.18);
    --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
    --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #1c0a10;
      --surface: #261016;
      --surface-raised: #2e141b;
      --ink: #f3e7c9;
      --ink-soft: #cfa688;
      --ink-faint: #8f6759;
      --accent: #d9a23f;
      --accent-strong: #eab663;
      --accent-ink: #241009;
      --line: #43222a;
      --title-ink: #fff8ca; /* logo background cream */
      --line-soft: #391c23;
      --danger: #ff6b6b;
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.6);
    }
  }

  :root[data-theme="dark"] {
    --bg: #1c0a10;
    --surface: #261016;
    --surface-raised: #2e141b;
    --ink: #f3e7c9;
    --ink-soft: #cfa688;
    --ink-faint: #8f6759;
    --accent: #d9a23f;
    --accent-strong: #eab663;
    --accent-ink: #241009;
    --line: #43222a;
    --title-ink: #fff8ca; /* logo background cream */
    --line-soft: #391c23;
    --danger: #ff6b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.6);
  }

  * { box-sizing: border-box; }

  /* Several elements below combine [hidden] with a class that sets its
     own `display` (e.g. .btn, .ticket-admin, .dropzone-preview). Author
     rules beat the UA [hidden] rule at equal specificity, so without
     this, "hidden" elements can stay visible. Always win regardless of
     what else targets the element. */
  [hidden] { display: none !important; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }

  h1, h2, h3 {
    font-family: var(--font-display);
    text-wrap: balance;
    margin: 0;
  }

  /* ---------- top bar ---------- */

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }

  .topbar-inner {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    min-width: 0;
  }

  .nav {
    display: flex;
    gap: 1.1rem;
  }

  .nav a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    white-space: nowrap;
  }
  .nav a:hover { color: var(--ink); }

  /* On phones the tabs don't fit beside the logo, so they get their own row. */
  @media (max-width: 560px) {
    .topbar-left { flex-wrap: wrap; row-gap: 0.55rem; width: 100%; }
    .nav { width: 100%; justify-content: space-between; gap: 0.5rem; }
  }
  .nav a.is-current { color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

  .brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    min-width: 0;
  }

  .brand img {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--line);
  }

  .brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  }

  .btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .btn-lg { font-size: 1rem; padding: 0.8rem 1.6rem; }
  .btn-xl { font-size: 1.2rem; padding: 1.05rem 2.3rem; }

  .btn-primary { background: var(--ink); color: var(--bg); }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

  .btn-danger { background: var(--danger); color: var(--bg); }
  .btn-danger:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

  .btn-text {
    background: transparent;
    color: var(--ink);
    padding: 0.55rem 0.7rem;
  }
  .btn-text:hover { background: var(--line-soft); }

  /* ---------- auth area + modal ---------- */

  .auth-area { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }

  .auth-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 8rem;
  }

  .modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(28, 10, 16, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
  }

  .modal {
    position: relative;
    width: 100%;
    max-width: 22rem;
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.75rem 1.5rem 1.5rem;
  }

  .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--ink-faint);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
  }
  .modal-close:hover { background: var(--line-soft); }

  .auth-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.1rem; }

  .auth-tab {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 999px;
    cursor: pointer;
  }
  .auth-tab.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

  .auth-modal-title { display: none; }

  .auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin: 0 0 0.9rem;
  }

  .auth-form { display: flex; flex-direction: column; gap: 0.9rem; }

  .auth-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
  }

  .auth-form input {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
  }
  .auth-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

  .auth-form select,
  .auth-form textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
  }
  .auth-form textarea { resize: vertical; }
  .auth-form select:focus-visible,
  .auth-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

  .password-field { position: relative; display: flex; }
  .password-field input { flex: 1; min-width: 0; padding-right: 4rem; }
  .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: none;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
  }
  .password-toggle:hover { color: var(--ink); }
  .password-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

  .auth-submit { justify-content: center; margin-top: 0.3rem; }

  .auth-forgot {
    align-self: flex-end;
    font-size: 0.8rem;
    color: var(--ink-soft);
    text-decoration: underline;
  }

  .form-success {
    color: var(--accent-strong);
    font-size: 0.85rem;
    margin: 0 0 0.9rem;
  }

  .account-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 26rem;
  }

  .account-card + .account-card { margin-top: 1.25rem; }

  .account-card .auth-form { margin-top: 1rem; }

  .account-card-danger { border-color: var(--danger); }

  /* ---------- committee admin panel ---------- */

  .admin-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
  }

  .event-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }

  .event-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.9rem;
  }

  .event-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
  }

  .event-form input,
  .event-form textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-raised);
    color: var(--ink);
    resize: vertical;
  }
  .event-form input:focus-visible,
  .event-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

  .event-form-actions { display: flex; gap: 0.75rem; align-items: center; }

  .dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem 1rem;
    border: 2px dashed var(--line);
    border-radius: 14px;
    background: var(--surface-raised);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.12s ease, background 0.12s ease;
  }
  .dropzone:hover,
  .dropzone:focus-visible { border-color: var(--accent); outline: none; }
  .dropzone.is-dragover { border-color: var(--accent); background: var(--line-soft); }

  .dropzone-text { margin: 0; color: var(--ink-faint); font-size: 0.85rem; }

  .dropzone-preview { display: flex; align-items: center; gap: 0.75rem; }
  .dropzone-preview img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
  }

  .image-remove-btn {
    background: none;
    border: none;
    color: var(--ink-faint);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
  }
  .image-remove-btn:hover { color: var(--ink); }

  .ticket-admin { display: flex; gap: 0.75rem; margin-top: 0.4rem; }

  .ticket-admin button {
    background: transparent;
    border: none;
    color: var(--ink-faint);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
  }
  .ticket-admin button:hover { color: var(--ink); }

  /* ---------- event detail modal ---------- */

  .event-modal { max-width: 26rem; }

  .event-modal-image {
    width: 100%;
    max-height: 12rem;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 1rem;
    background: var(--surface-raised);
  }

  .event-modal-meta { color: var(--ink-soft); font-size: 0.9rem; margin: 0.3rem 0 0.9rem; }

  .event-modal-desc { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; margin: 0 0 1.1rem; }

  .event-modal-cta { display: flex; }
  .event-modal-cta .btn { width: 100%; justify-content: center; }

  .event-modal-admin { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

  .ticket-title {
    color: var(--title-ink);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .ticket-title:hover { text-decoration: underline; }

  .day[data-date] { cursor: pointer; }
  .day.has-event:hover { background: var(--line-soft); }

  /* ---------- layout ---------- */

  main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
  }

  .intro { display: flex; flex-direction: column; gap: 0.6rem; max-width: 38rem; }
  .intro h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); font-weight: 600; }
  .intro p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; }
  .intro > .btn { align-self: flex-start; margin-top: 0.4rem; }

  /* Home page buttons: same gap above as main leaves below, before the calendar. */
  .intro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: calc(2.75rem - 0.6rem);
  }
  .intro-member { border: 2px solid var(--ink-soft); }

  .prose { display: flex; flex-direction: column; gap: 0.9rem; max-width: 38rem; }
  .prose h2 { font-size: 1.2rem; font-weight: 600; }
  .prose p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
  .prose p strong { color: var(--ink); }

  .committee-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Each layer of the committee (president, then treasurer/secretary,
     then everyone else) is its own row. */
  .committee-tier {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
  }
  /* Four cards across (three 1rem gaps), dropping to two and then one on
     narrower screens. */
  .committee-tier .committee-card { flex: 0 0 calc((100% - 3rem) / 4); min-width: 0; }
  @media (max-width: 760px) {
    .committee-tier .committee-card { flex-basis: calc((100% - 1rem) / 2); }
  }
  @media (max-width: 420px) {
    .committee-tier .committee-card { flex-basis: 100%; }
  }

  .committee-term { display: flex; flex-direction: column; gap: 1rem; }
  .committee-term + .committee-term { margin-top: 1.5rem; }
  .committee-term-title { font-size: 1.1rem; font-weight: 600; margin: 0; }

  .view-toggle { display: inline-flex; align-self: flex-start; gap: 0.4rem; margin-top: 0.5rem; }
  .view-toggle-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
  }
  .view-toggle-btn.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

  .auth-form .checkbox-label { flex-direction: row; align-items: center; gap: 0.5rem; }
  .auth-form .checkbox-label input { padding: 0; width: auto; }

  .committee-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow);
    overflow-wrap: anywhere;
  }
  .committee-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    background: var(--surface-raised);
  }
  .committee-card .role { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); }
  .committee-card .name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0.2rem 0; }
  .committee-card .bio,
  .committee-card .contact { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; margin: 0; }

  .contact-actions {
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
    max-width: 26rem;
  }

  .contact-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .follow-prompt {
    align-self: stretch;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .eyebrow {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-strong);
  }

  /* ---------- calendar ---------- */

  .calendar-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
  }

  .calendar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 1rem;
  }

  .calendar-head h2 {
    font-size: 1.3rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .month-nav { display: flex; gap: 0.4rem; }

  .month-nav button {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-raised);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.12s ease, transform 0.12s ease;
  }
  .month-nav button:hover { background: var(--line-soft); }
  .month-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  .weekdays, .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
  }

  .weekdays {
    margin-bottom: 0.35rem;
  }

  .weekdays span {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-bottom: 0.2rem;
  }

  .day {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0.3rem 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    overflow: hidden;
  }

  .day.empty { visibility: hidden; }

  .day .num {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: var(--ink-faint);
    text-align: right;
    padding-right: 0.1rem;
  }

  .day.has-event {
    background: var(--surface-raised);
    border-color: var(--line);
  }
  .day.has-event .num { color: var(--ink-soft); font-weight: 600; }

  .day.today .num {
    color: var(--accent-ink);
    background: var(--accent);
    border-radius: 999px;
    width: 1.3rem;
    height: 1.3rem;
    display: grid;
    place-items: center;
    margin-left: auto;
    font-weight: 700;
    padding: 0;
  }

  .day .dot-row {
    display: flex;
    gap: 3px;
    justify-content: flex-end;
    padding-right: 0.1rem;
  }

  .day .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
  }

  .day .chip {
    display: none;
  }

  @media (min-width: 640px) {
    .day { padding: 0.4rem 0.4rem; }
    .day .chip {
      display: block;
      font-size: 0.62rem;
      line-height: 1.2;
      background: var(--accent);
      color: var(--accent-ink);
      border-radius: 5px;
      padding: 1px 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-weight: 600;
    }
    .day .dot-row { display: none; }
  }

  /* ---------- ticket list ---------- */

  .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
  }

  .section-head h2 { font-size: 1.3rem; font-weight: 600; }
  .section-head .count { color: var(--ink-faint); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

  .tickets {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .ticket {
    display: grid;
    grid-template-columns: 4.4rem 1fr auto;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    position: relative;
    box-shadow: var(--shadow);
  }

  .ticket::before {
    content: "";
    position: absolute;
    left: 4.9rem;
    top: -1px;
    bottom: -1px;
    width: 0;
    border-left: 1.5px dashed var(--line);
  }

  .ticket-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    gap: 0.15rem;
  }

  .ticket-date .dow {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
  }

  .ticket-date .dom {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .ticket-date .mon {
    font-size: 0.68rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .ticket-body { min-width: 0; padding-left: 0.4rem; }

  .ticket-body h3 {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
  }

  .ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.6rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
  }

  .ticket-meta span { white-space: nowrap; }

  .ticket-cta {
    justify-self: end;
  }

  .ticket-error { color: var(--ink-faint); font-size: 0.9rem; }

  .btn-ghost {
    background: transparent;
    color: var(--accent-strong);
    border: 1px solid var(--line);
    white-space: nowrap;
  }
  .btn-ghost:hover { background: var(--line-soft); }

  .btn-full {
    background: var(--line-soft);
    color: var(--ink-faint);
    cursor: default;
  }

  @media (max-width: 30rem) {
    .ticket { grid-template-columns: 3.6rem 1fr; }
    .ticket-cta { grid-column: 1 / -1; justify-self: stretch; }
    .ticket-cta .btn { width: 100%; justify-content: center; }
    .ticket::before { left: 4.1rem; }
  }

  footer {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
    color: var(--ink-faint);
    font-size: 0.8rem;
  }

  /* ---------- previously ---------- */

  /* Tall forms (like the post form) scroll inside the overlay instead of
     being cut off. */
  .modal-overlay-scroll { align-items: flex-start; overflow-y: auto; }
  .post-modal { max-width: 34rem; margin: auto; }

  .form-field { display: flex; flex-direction: column; gap: 0.35rem; }
  .form-field-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }

  .photo-thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .photo-thumbs:empty { display: none; }
  .photo-thumb { position: relative; }
  .photo-thumb img {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    display: block;
  }
  .photo-thumb-remove {
    position: absolute;
    top: -0.4rem;
    right: -0.4rem;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface-raised);
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  .post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
  @media (max-width: 700px) { .post-grid { grid-template-columns: 1fr; } }
  .post-grid > .ticket-error { grid-column: 1 / -1; }

  .post-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
  }
  .post-card:hover { transform: translateY(-2px); }
  .post-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .post-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-raised); }
  .post-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.45rem; overflow-wrap: anywhere; }
  .post-meta { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); }
  .post-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 0; }
  .post-text { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; margin: 0; }
  .post-more { margin-top: 0.2rem; color: var(--accent-strong); font-weight: 600; font-size: 0.88rem; }

  .post-detail { max-width: 44rem; display: flex; flex-direction: column; gap: 1rem; }
  .back-link { font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
  .back-link:hover { color: var(--ink); }
  #post-content { display: flex; flex-direction: column; gap: 1rem; overflow-wrap: anywhere; }
  #post-content h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); font-weight: 600; margin: 0; }
  #post-content .ticket-admin { margin-top: -0.4rem; }
  .post-detail-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
  .post-detail-body { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }

  .post-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
  @media (max-width: 560px) { .post-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .post-gallery-item { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
  .post-gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
  .post-gallery-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  .post-video { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
  .post-video iframe { width: 100%; height: 100%; border: 0; display: block; }

  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 4, 6, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
  }
  .lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
  .lightbox-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
  }
