/* ========================================
   시되시 — Design System
   setlog-inspired: warm, minimal, friendly
   ======================================== */

:root {
  --paper: #faf9f6;
  --surface: rgba(255, 255, 253, 0.82);
  --surface-strong: #fffefa;
  --ink: #1d1b16;
  --ink-secondary: #44403a;
  --muted: #8a847a;
  --line: rgba(37, 35, 31, 0.08);
  --line-strong: rgba(37, 35, 31, 0.14);
  --mint: #8ddfc3;
  --mint-deep: #0f7f67;
  --mint-light: rgba(141, 223, 195, 0.16);
  --peach: #ffb28b;
  --butter: #f8d76f;
  --butter-light: rgba(248, 215, 111, 0.22);
  --soft: rgba(245, 244, 239, 0.72);
  --blue: #8db8ff;
  --rose: #ff8fa3;
  --violet: #c6a4ff;
  --sky: #92d7ff;
  --lime: #b9df72;
  --coral: #ff9f91;
  --plum: #d3a2d8;
  --shadow-sm: 0 1px 3px rgba(68, 54, 31, 0.05), 0 2px 8px rgba(68, 54, 31, 0.03);
  --shadow: 0 2px 12px rgba(68, 54, 31, 0.06), 0 8px 32px rgba(68, 54, 31, 0.04);
  --shadow-lg: 0 4px 16px rgba(68, 54, 31, 0.07), 0 16px 48px rgba(68, 54, 31, 0.05);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 999px;
  --transition: 180ms ease;
  font-family:
    "Apple SD Gothic Neo",
    ui-rounded,
    "SF Pro Rounded",
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
[role="button"],
input,
select,
.slot {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

/* ── Layout Shell ── */

.app-shell {
  min-height: 100vh;
  max-width: 1520px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

@media (min-width: 1181px) {
  body.room-draft .app-shell {
    padding-top: max(48px, env(safe-area-inset-top));
    padding-bottom: max(56px, env(safe-area-inset-bottom));
  }
}

.topbar,
.entry-deck,
.workspace {
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

body.room-draft .workspace,
body.room-active .entry-deck {
  display: none;
}

@media (min-width: 1181px) {
  html.room-active-shell {
    height: 100vh;
    overflow: hidden;
  }

  body.room-active {
    height: 100vh;
    overflow: hidden;
  }

  body.room-active .app-shell {
    height: 100vh;
    min-height: 0;
  }
}

/* ── Topbar ── */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--butter);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
  flex-shrink: 0;
}

.brand-mark span {
  font-size: 24px;
  font-weight: 900;
}

.topbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-legal-link {
  padding: 6px 2px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.topbar-legal-link:hover {
  color: var(--ink);
}

body.room-draft #goHome {
  display: none;
}

body.room-active #languageToggle {
  display: none;
}

/* ── Typography ── */

.brand-kicker,
.eyebrow,
.field-label,
.create-room label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: -0.01em;
}

h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

/* ── Cards (shared) ── */

.entry-card,
.side-panel,
.schedule-panel,
.proposal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.challenge-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 8%, rgba(248, 215, 111, 0.26), transparent 28%),
    radial-gradient(circle at 84% 22%, rgba(141, 223, 195, 0.2), transparent 24%),
    var(--paper);
}

.challenge-shell {
  width: min(1120px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}

.challenge-topbar {
  margin-bottom: clamp(28px, 6vw, 72px);
}

.challenge-brand-link,
.challenge-home-link,
.challenge-role-button {
  color: inherit;
  text-decoration: none;
}

.challenge-entry {
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
}

.challenge-role-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.challenge-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: clamp(20px, 4vw, 36px) auto 0;
}

.challenge-flow article {
  min-height: 188px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 253, 0.72);
  box-shadow: var(--shadow-sm);
}

.challenge-flow span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--butter);
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--ink);
}

.challenge-flow h3 {
  margin: 20px 0 8px;
  font-size: 20px;
  line-height: 1.22;
}

.challenge-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.challenge-legal-links {
  margin-top: 28px;
}

@media (max-width: 900px) {
  .challenge-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .challenge-shell {
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .challenge-topbar {
    align-items: flex-start;
  }

  .challenge-entry .entry-choice-row {
    grid-template-columns: 1fr;
  }

  .challenge-flow {
    grid-template-columns: 1fr;
  }

  .challenge-flow article {
    min-height: 0;
  }
}

/* ── Form Controls ── */

.create-room label {
  display: block;
  margin-bottom: 6px;
}

.room-code-row {
  display: grid;
  grid-template-columns: 1fr 44px 54px;
  gap: 8px;
}

input,
select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

select {
  appearance: none;
}

input[type="date"] {
  text-align: left;
}

input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

input:focus,
select:focus {
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 3px rgba(141, 223, 195, 0.28);
}

input:disabled,
select:disabled {
  color: var(--muted);
  background: rgba(245, 244, 239, 0.7);
  cursor: not-allowed;
}

/* ── Buttons ── */

.icon-button,
.ghost-action,
.danger-action,
.small-action,
.home-action {
  min-height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: background var(--transition), border-color var(--transition);
}

.icon-button:hover:not(:disabled),
.ghost-action:hover:not(:disabled),
.small-action:hover:not(:disabled),
.home-action:hover:not(:disabled) {
  background: rgba(245, 244, 239, 0.8);
}

.home-action {
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  background: #fff;
}

/* ── Entry Deck ── */

.entry-deck {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

body.room-draft .entry-deck {
  max-width: 980px;
  padding-top: clamp(24px, 5vh, 64px);
}

.entry-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.entry-choice-button {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 900;
  text-align: left;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.entry-choice-button:hover,
.entry-choice-button.active {
  border-color: rgba(15, 127, 103, 0.22);
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.entry-deck.entry-mode-closed .entry-card,
.entry-deck.entry-mode-join .create-entry,
.entry-deck.entry-mode-create .join-entry {
  display: none;
}

.entry-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 20px;
}

.home-room-list {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 253, 0.6);
}

.home-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 800;
}

.home-legal-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-data-use {
  display: grid;
  max-width: 900px;
  margin: 2px auto 0;
  padding: 18px 8px 4px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.home-data-use h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.home-data-use p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: break-word;
  text-wrap: balance;
  word-break: keep-all;
}

.home-data-use a {
  width: fit-content;
  margin: 9px auto 0;
  color: var(--mint-deep);
  font-size: 13px;
  font-weight: 900;
  text-underline-offset: 3px;
}

.home-room-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.home-room-heading > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-room-items {
  display: grid;
  gap: 8px;
}

.home-room-section {
  display: grid;
  gap: 8px;
}

.home-room-section + .home-room-section {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.home-room-section-heading {
  display: grid;
  gap: 3px;
  padding: 0 2px;
}

.home-room-section-heading strong {
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 900;
}

.home-room-section-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.home-room-section-items {
  display: grid;
  gap: 8px;
}

.home-room-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.home-room-swipe {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.home-room-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
}

.home-room-open:hover {
  border-color: var(--line-strong);
  background: rgba(245, 244, 239, 0.55);
}

.home-room-open span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.home-room-open strong,
.home-room-open small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-room-open strong {
  font-size: 15px;
  font-weight: 900;
}

.home-room-open small,
.home-room-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.home-room-open em {
  border-radius: var(--radius-pill);
  padding: 6px 9px;
  color: #795f08;
  background: var(--butter-light);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.home-room-open em.final {
  color: var(--mint-deep);
  background: var(--mint-light);
}

.home-room-actions {
  display: flex;
  gap: 6px;
}

.home-room-actions button {
  min-height: 40px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.home-room-archive {
  color: var(--ink-secondary);
}

.home-room-delete {
  color: #9f3143;
  background: rgba(255, 143, 163, 0.1);
}

.home-room-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.join-entry {
  grid-template-columns: minmax(180px, 0.28fr) minmax(320px, 1fr);
  align-items: end;
}

.join-entry h2 {
  font-size: 22px;
}

.create-entry {
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  align-items: end;
}

.create-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

.create-room-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.side-panel .create-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.side-panel .create-fields .create-room:first-child,
.side-panel .create-fields .create-room.medium {
  grid-column: 1 / -1;
}

.side-panel #createRoom {
  display: none;
}

.primary-action,
#proposeButton {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 3px 3px 0 var(--peach);
  transition: transform var(--transition), box-shadow var(--transition);
}

.primary-action:hover:not(:disabled),
#proposeButton:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--peach);
}

.primary-action:active:not(:disabled),
#proposeButton:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--peach);
}

/* ── Workspace (3-col) ── */

.workspace {
  display: grid;
  height: calc(100vh - 120px);
  min-height: 620px;
  grid-template-columns: minmax(240px, 296px) minmax(560px, 1fr) minmax(280px, 348px);
  gap: 16px;
  align-items: stretch;
}

.mobile-room-tabs {
  display: none;
  width: 100%;
}

.workspace.side-collapsed {
  grid-template-columns: 48px minmax(720px, 1fr) minmax(280px, 348px);
}

.side-panel,
.proposal-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  overflow: auto;
}

.side-panel {
  position: relative;
  padding-top: 52px;
}

.side-collapse-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(37, 35, 31, 0.08);
}

.side-collapse-button:hover {
  background: var(--mint-light);
}

.workspace.side-collapsed .side-panel {
  align-items: center;
  padding: 52px 7px 10px;
  overflow: hidden;
}

.workspace.side-collapsed .side-panel > :not(.side-collapse-button) {
  display: none;
}

.workspace.side-collapsed .side-collapse-button {
  right: 7px;
}

.schedule-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
}

/* ── Side Panel Sections ── */

.room-summary,
.schedule-header,
.section-heading,
.proposal-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-summary {
  align-items: flex-start;
}

.room-code-card {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fff;
}

.room-code-card {
  align-items: center;
  justify-content: space-between;
}

.room-code-card strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.room-code-actions {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(48px, 1fr));
  gap: 6px;
}

/* ── Badges / Pills ── */

.room-badges {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.privacy-pill,
.owner-pill,
.expiry-pill {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  color: var(--mint-deep);
  background: var(--mint-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.owner-pill {
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.72);
}

.owner-pill.locked {
  color: var(--muted);
  background: var(--soft);
}

.expiry-pill {
  color: #795f08;
  background: var(--butter-light);
}

.sync-pill {
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.sync-pill.online {
  color: var(--mint-deep);
  background: var(--mint-light);
}

.sync-pill.syncing {
  color: #795f08;
  background: var(--butter-light);
}

.sync-pill.offline {
  color: #7a3845;
  background: rgba(255, 143, 163, 0.14);
}

/* ── Panel Groups ── */

.panel-group {
  display: grid;
  gap: 10px;
}

.accordion-section {
  display: grid;
  gap: 10px;
}

.accordion-trigger {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.accordion-trigger > span {
  min-width: 0;
}

.accordion-trigger .field-label {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.accordion-trigger > span:nth-child(2) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.accordion-chevron {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  transition: transform var(--transition);
}

.accordion-section:not(.open) .accordion-chevron {
  transform: rotate(-90deg);
}

.accordion-section:not(.open) .accordion-content {
  display: none;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-button,
.calendar-source,
.calendar-import-button,
.calendar-url-button,
.calendar-clear,
.calendar-refresh-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition);
}

.calendar-refresh-button {
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius-xs);
  color: var(--mint-deep);
  background: var(--mint-light);
  font-size: 12px;
  font-weight: 900;
}

.auth-button {
  justify-content: flex-start;
  min-height: 48px;
}

.auth-button span:not(.provider-dot),
.calendar-source span:not(.calendar-logo) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-status {
  flex: 0 0 48px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 7px;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.provider-status.live {
  border-color: rgba(15, 127, 103, 0.2);
  color: var(--mint-deep);
  background: var(--mint-light);
}

.provider-status.local {
  color: #795f08;
  background: var(--butter-light);
}

.auth-button:hover {
  border-color: var(--line-strong);
  background: rgba(245, 244, 239, 0.6);
}

.auth-button.selected {
  border-color: rgba(15, 127, 103, 0.36);
  background: var(--mint-light);
}

.provider-dot,
.calendar-logo {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.guest {
  background: var(--butter);
}

.google {
  background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
}

.apple {
  background: #1f1f1f;
}

.naver {
  background: #03c75a;
}

.ics {
  border: 1px solid var(--line-strong);
  background: var(--butter);
}

.calendar-list,
.participant-list,
.recommendation-list,
.suggestion-list {
  display: grid;
  gap: 8px;
}

.calendar-source,
.calendar-import-button,
.calendar-refresh-button {
  cursor: pointer;
}

.calendar-display-toggle {
  display: flex;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 0 10px;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.calendar-display-toggle input {
  width: 15px;
  min-height: 15px;
  accent-color: var(--mint-deep);
}

.calendar-source input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--mint-deep);
}

.google-calendar-sources {
  display: grid;
  gap: 6px;
  margin: -2px 0 4px 26px;
}

.google-calendar-sources.empty {
  margin: 0;
}

.calendar-source-child {
  min-height: 38px;
  padding: 8px 10px;
  border-color: transparent;
  background: var(--soft);
}

.calendar-source-child small,
.calendar-source-hint,
.calendar-import-note {
  min-width: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.calendar-source-count {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  justify-items: end;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

.calendar-source-count span {
  display: block;
}

.calendar-import-note {
  margin: 2px 0 0;
  padding: 2px 10px 0;
}

.calendar-source-divider {
  height: 1px;
  margin: 4px 0 0;
  background: var(--line);
}

.calendar-source-hint {
  margin: 0;
  padding: 8px 10px;
}

.calendar-file-row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
  min-width: 0;
}

.calendar-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
  min-width: 0;
}

.calendar-url-row input {
  min-width: 0;
  min-height: 44px;
  font-size: 13px;
}

.calendar-url-button {
  justify-content: center;
  color: var(--ink);
  background: var(--butter-light);
}

.calendar-clear {
  justify-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
}

.calendar-clear.active {
  color: #7a3845;
  background: rgba(255, 143, 163, 0.14);
}

.file-input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: center;
}

.identity-row input {
  min-width: 0;
}

.identity-row .danger-action {
  min-height: 44px;
  padding: 0 10px;
  white-space: nowrap;
}

/* ── Participants ── */

.participant {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #fff;
}

.participant > div:not(.participant-actions) {
  min-width: 0;
}

.participant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.participant.manage-open {
  border-color: rgba(154, 49, 68, 0.26);
  background: rgba(255, 143, 163, 0.04);
}

.participant-remove-button {
  display: grid;
  width: auto;
  min-width: 52px;
  height: 40px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(154, 49, 68, 0.28);
  border-radius: var(--radius-xs);
  color: #9a3144;
  background: rgba(255, 143, 163, 0.1);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.participant-remove-button:hover:not(:disabled) {
  background: rgba(255, 143, 163, 0.2);
}

.participant-remove-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.participant-avatar-button {
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.participant-avatar-button:hover,
.participant-avatar-button[aria-expanded="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--butter);
}

.participant-avatar-button:active {
  transform: scale(0.96);
}

.participant-avatar-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.avatar.mint {
  background: var(--mint);
}

.avatar.peach {
  background: var(--peach);
}

.avatar.blue {
  background: var(--blue);
}

.avatar.rose {
  background: var(--rose);
}

.avatar.butter {
  background: var(--butter);
}

.avatar.violet {
  background: var(--violet);
}

.avatar.sky {
  background: var(--sky);
}

.avatar.lime {
  background: var(--lime);
}

.avatar.coral {
  background: var(--coral);
}

.avatar.plum {
  background: var(--plum);
}

.proposal-detail {
  display: grid;
  gap: 8px;
}

.proposal-detail summary {
  min-height: 38px;
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.proposal-detail summary::-webkit-details-marker {
  display: none;
}

.proposal-detail summary::after {
  margin-left: 6px;
  content: "⌄";
}

.proposal-detail[open] summary::after {
  content: "⌃";
}

.proposal-tools {
  display: grid;
  gap: 8px;
}

.proposal-tools > div {
  display: grid;
  grid-template-columns: 64px repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.proposal-tools > .participant-filter-picks {
  grid-template-columns: 1fr;
}

.proposal-tools span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.proposal-tools button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--ink-secondary);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.proposal-tools button.active {
  border-color: rgba(15, 127, 103, 0.24);
  color: var(--mint-deep);
  background: var(--mint-light);
}

.participant-filter-picks {
  display: grid;
  gap: 6px;
}

.participant-filter-picks label {
  display: grid;
  min-height: 38px;
  grid-template-columns: auto 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.56);
}

.participant-filter-picks input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint-deep);
}

.participant-filter-picks .avatar {
  width: 28px;
  height: 28px;
}

.participant-filter-picks strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant strong,
.suggestion strong,
.final-card strong {
  display: block;
  font-size: 14px;
}

.participant strong,
.participant > div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant span,
.suggestion span,
.final-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint-deep);
}

.status-dot.google {
  background: #4285f4;
}

.status-dot.apple {
  background: #1f1f1f;
}

.status-dot.naver {
  background: #03c75a;
}

/* ── Schedule Toolbar ── */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 56px);
  gap: 4px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
  background: rgba(255, 255, 255, 0.5);
}

.segmented button {
  min-height: 32px;
  border-radius: var(--radius-xs);
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  font-size: 13px;
  transition: all var(--transition);
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(48, 39, 25, 0.08);
}

.ghost-action {
  min-height: 44px;
  padding: 0 14px;
}

.danger-action {
  color: #9a3144;
  background: rgba(255, 143, 163, 0.1);
  font-weight: 800;
  border-radius: var(--radius-sm);
}

.small-action {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
}

/* ── Heat Legend ── */

.heat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.heat-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.heat-legend .slot-count-legend {
  flex-basis: 100%;
  color: var(--ink-secondary);
  font-weight: 800;
}

.selection-hint {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.legend {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 14px;
  border-radius: 3px;
}

.legend.empty {
  border: 1px solid var(--line-strong);
  background: #fff;
}

.legend.mine {
  background: rgba(141, 223, 195, 0.38);
}

.legend.preferred {
  border: 1.5px solid rgba(15, 127, 103, 0.44);
  background: rgba(141, 223, 195, 0.38);
}

.legend.preferred::after {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--mint-deep);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
  content: "★";
}

.legend.busy {
  background: repeating-linear-gradient(135deg, rgba(255, 143, 163, 0.36) 0 5px, #fff 5px 10px);
}

.legend.best {
  background: var(--mint-deep);
}

/* ── Time Grid ── */

.time-grid-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-overflow-scrolling: touch;
}

.time-grid {
  --time-column-width: 56px;
  --grid-header-height: 38px;
  --grid-all-day-height: 30px;
  display: grid;
  height: 100%;
  min-width: 0;
  grid-auto-rows: minmax(22px, 1fr);
  user-select: none;
}

.grid-cell {
  min-height: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.grid-cell.header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  font-size: 14px;
  border: 0;
}

.day-heading {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-cell.corner {
  border: 0;
  background: transparent;
}

.grid-cell.header.day-start,
.all-day-cell.day-start,
.slot.day-start {
  border-left: 1.5px solid var(--line-strong);
}

.all-day-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border: 0;
  padding: 0 8px 0 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.all-day-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.78);
}

.all-day-cell span {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-day-cell.has-event span {
  color: #795f08;
  background: var(--butter-light);
}

.grid-cell.time-label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  border: 0;
  padding: 0 8px 0 0;
}

.grid-cell.time-label span {
  line-height: 1;
}

.grid-cell.time-label.half-hour {
  color: transparent;
  border: 0;
}

.grid-cell.time-label.hour-start,
.slot.hour-start {
  border-top: 1.5px solid var(--line-strong);
}

.grid-cell.time-label.hour-start {
  border-top-color: transparent;
}

.slot {
  position: relative;
  min-height: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background 120ms ease;
}

.slot::after {
  position: absolute;
  right: 6px;
  bottom: 4px;
  color: rgba(37, 35, 31, 0.32);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  content: attr(data-count);
}

.slot.half-hour {
  border-bottom: 1px dotted rgba(37, 35, 31, 0.42);
}

.slot.mine {
  background: rgba(141, 223, 195, 0.38);
}

.slot.mine:not(.preferred):not(.busy)::before {
  position: absolute;
  top: 50%;
  left: 6px;
  color: rgba(15, 127, 103, 0.38);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  content: "☆";
}

.slot.preferred {
  box-shadow: inset 0 0 0 2px rgba(15, 127, 103, 0.32);
}

.slot.preferred::before {
  position: absolute;
  top: 50%;
  left: 6px;
  color: var(--mint-deep);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  content: "★";
}

.slot.busy {
  background: repeating-linear-gradient(135deg, rgba(255, 143, 163, 0.2) 0 7px, #fff 7px 14px);
}

.slot.busy::after {
  right: 4px;
  bottom: 50%;
  left: 4px;
  overflow: hidden;
  color: rgba(37, 35, 31, 0.46);
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  transform: translateY(50%);
  white-space: nowrap;
}

.slot.busy.mine {
  background:
    linear-gradient(rgba(141, 223, 195, 0.58), rgba(141, 223, 195, 0.58)),
    repeating-linear-gradient(135deg, rgba(255, 143, 163, 0.26) 0 7px, #fff 7px 14px);
}

.slot.availability-low {
  background: rgba(141, 223, 195, 0.22);
}

.slot.availability-mid {
  background: rgba(141, 223, 195, 0.38);
}

.slot.availability-high {
  background: rgba(141, 223, 195, 0.58);
}

.slot.best {
  background: var(--mint-deep);
}

.slot.best::after {
  color: #fff;
}

.slot.dragging {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* ── Proposal Panel ── */

.proposal-panel {
  justify-content: flex-start;
}

.proposal-top {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--butter);
  box-shadow: 4px 4px 0 var(--ink);
}

.proposal-top h2 {
  margin: 6px 0 2px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.proposal-top p:last-child {
  margin: 0;
  color: rgba(37, 35, 31, 0.62);
  font-size: 13px;
  font-weight: 700;
}

.proposal-card,
.final-card,
.empty-state {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #fff;
}

.calendar-download {
  min-height: 40px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  transition: background var(--transition);
}

.calendar-download:hover {
  background: rgba(245, 244, 239, 0.8);
}

.final-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.proposal-time span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.proposal-time strong {
  font-size: 18px;
}

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

#copyInvite {
  min-height: 48px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  transition: background var(--transition);
}

#copyInvite:hover:not(:disabled) {
  background: rgba(245, 244, 239, 0.8);
}

/* ── Suggestions & Voting ── */

.recommendation-item {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: #fff;
}

.recommendation-item.best {
  border-color: rgba(15, 127, 103, 0.28);
  background: var(--mint-light);
}

.recommendation-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.recommendation-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.recommendation-item button {
  min-height: 36px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.recommendation-item button:hover:not(:disabled) {
  background: rgba(245, 244, 239, 0.8);
}

.suggestion {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fff;
}

.suggestion.final {
  border-color: rgba(15, 127, 103, 0.32);
  background: var(--mint-light);
}

.proposal-consent {
  border: 1px solid rgba(248, 215, 111, 0.6);
  border-radius: var(--radius-xs);
  padding: 7px 9px;
  color: #795f08;
  background: var(--butter-light);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.proposal-consent.final {
  border-color: rgba(15, 127, 103, 0.2);
  color: var(--mint-deep);
  background: var(--mint-light);
}

.vote-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.vote-pill {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 4px 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.vote-pill.yes {
  color: var(--mint-deep);
  background: var(--mint-light);
}

.vote-pill.maybe {
  color: #795f08;
  background: var(--butter-light);
}

.vote-pill.no {
  color: #9a3144;
  background: rgba(255, 143, 163, 0.12);
}

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

.vote-actions button,
.finalize-button {
  min-height: 36px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: all var(--transition);
}

.vote-actions button:hover {
  border-color: var(--line-strong);
}

.vote-actions button.active {
  border-color: rgba(15, 127, 103, 0.36);
  color: var(--mint-deep);
  background: var(--mint-light);
}

.vote-actions button.danger {
  border-color: rgba(255, 143, 163, 0.4);
  color: #9a3144;
  background: rgba(255, 143, 163, 0.12);
}

.finalize-button {
  background: var(--surface-strong);
}

.finalize-button:hover {
  background: rgba(245, 244, 239, 0.8);
}

.finalize-button.locked,
.finalize-button:disabled {
  color: var(--muted);
  background: var(--soft);
  box-shadow: none;
}

/* ── Toast ── */

.toast {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: min(340px, calc(100vw - 40px));
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  background: rgba(29, 27, 22, 0.92);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: keep-all;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive: Tablet ── */

@media (max-width: 1180px) {
  .join-entry,
  .create-entry {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 280px minmax(520px, 1fr);
    height: auto;
    min-height: auto;
  }

  .workspace.side-collapsed {
    grid-template-columns: 280px minmax(520px, 1fr);
  }

  .proposal-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }
}

/* ── Responsive: Mobile ── */

@media (max-width: 860px) {
  html.room-active-shell,
  body.room-active {
    height: 100dvh;
    overflow: hidden;
  }

  .app-shell {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  body.room-active .app-shell {
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    flex: 0 0 auto;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .brand {
    grid-column: 2;
    justify-self: center;
  }

  .topbar-status {
    grid-column: 3;
    justify-self: start;
    justify-content: flex-start;
  }

  .topbar-legal-link {
    font-size: 11px;
  }

  .entry-deck,
  .workspace {
    grid-template-columns: 1fr;
  }

  .home-room-items {
    overflow: hidden;
  }

  .home-room-item {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-room-item::-webkit-scrollbar {
    display: none;
  }

  .home-room-swipe {
    width: calc(100% + 148px);
    grid-template-columns: minmax(0, 1fr) 140px;
    scroll-snap-align: start;
  }

  .home-room-open {
    scroll-snap-align: start;
  }

  .home-room-actions {
    scroll-snap-align: end;
  }

  .home-room-actions button {
    flex: 1 1 0;
  }

  .entry-choice-row,
  .create-fields {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .entry-choice-button {
    min-height: 84px;
    padding: 20px;
  }

  .create-fields .primary-action {
    grid-column: 1 / -1;
  }

  .side-panel,
  .schedule-panel,
  .proposal-panel {
    min-height: 0;
    padding: 16px;
  }

  .side-panel {
    padding-top: 54px;
  }

  .workspace.side-collapsed .side-panel > :not(.side-collapse-button) {
    display: flex;
  }

  body.room-active .workspace {
    flex: 1 1 auto;
    display: grid;
    height: auto;
    width: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }

.mobile-room-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-room-tabs button {
    display: grid;
    min-width: 0;
    width: 100%;
    height: 44px;
    min-height: 44px;
    place-items: center;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink-secondary);
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .mobile-room-tabs button.active {
    color: var(--mint-deep);
    background: var(--mint-light);
    border-color: rgba(15, 127, 103, 0.24);
  }

  body.room-active .side-panel,
  body.room-active .schedule-panel,
  body.room-active .proposal-panel {
    display: none;
    width: 100%;
    min-width: 0;
    grid-row: 2;
    grid-column: 1 / -1;
    overflow: auto;
  }

  body.room-active .workspace.mobile-tab-info .side-panel,
  body.room-active .workspace.mobile-tab-schedule .schedule-panel,
  body.room-active .workspace.mobile-tab-proposals .proposal-panel {
    display: flex;
  }

  body.room-active .side-collapse-button {
    display: none;
  }

  body.room-active .side-panel {
    padding-top: 16px;
  }

  .schedule-header {
    align-items: flex-start;
  }

  .grid-title-time {
    display: none;
  }

  .time-grid-wrap {
    overflow: hidden;
    max-height: none;
    padding-top: 8px;
  }

  .time-grid {
    --time-column-width: 42px;
    --grid-header-height: 44px;
    --grid-all-day-height: 28px;
    min-width: 0;
    grid-auto-rows: minmax(17px, 1fr);
  }

  .grid-cell.header {
    position: relative;
    z-index: 3;
    min-height: 44px;
    align-items: center;
    padding: 0 2px 8px;
    overflow: visible;
    background: var(--surface-strong);
  }

  .day-heading {
    font-size: 11px;
    line-height: 1.15;
  }

  body.room-active .proposal-panel {
    align-self: stretch;
    justify-self: stretch;
  }

  .grid-cell.time-label {
    font-size: 10px;
    padding-right: 4px;
  }

  .slot::after {
    right: 3px;
    bottom: 2px;
    font-size: 8px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 18px;
  }
}

/* ── Responsive: Small Phone ── */

@media (max-width: 480px) {
  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
  }

  .brand-mark span {
    font-size: 20px;
  }

  .room-code-row {
    grid-template-columns: 1fr 44px;
  }

  #copyRoomCode,
  .create-fields .primary-action {
    grid-column: 1 / -1;
  }

  .auth-grid,
  .final-actions,
  .proposal-actions,
  .vote-actions {
    grid-template-columns: 1fr;
  }

  .brand-kicker,
  .eyebrow,
  .field-label,
  .create-room label {
    font-size: 11px;
  }

  h2 {
    font-size: 17px;
  }

  .proposal-top h2 {
    font-size: 28px;
  }

  .entry-card {
    padding: 16px;
  }

  .side-panel,
  .schedule-panel,
  .proposal-panel {
    padding: 14px;
  }

  .proposal-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .recommendation-item {
    grid-template-columns: minmax(0, 1fr) 88px;
  }
}
