:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #ebebf0;
  --text: #1c1c1e;
  --muted: #8e8e93;
  --border: #e5e5ea;
  --primary: #34c759;
  --primary-soft: #e8f9ee;
  --blue: #007aff;
  --blue-soft: #e3f0ff;
  --orange: #ff9500;
  --danger: #ff3b30;
  --shadow: 0 16px 40px rgba(28, 28, 30, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --shell-width: 430px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(52, 199, 89, 0.18), transparent 32%),
    linear-gradient(180deg, #f8faf8 0%, var(--bg) 22%, #ececf2 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}

#app {
  width: 100%;
  display: flex;
  justify-content: center;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  bottom: calc(var(--safe-bottom) + 92px);
  width: min(calc(100% - 32px), 360px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 40px rgba(28, 28, 30, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
}

.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.shell {
  width: min(100%, var(--shell-width));
  min-height: 100vh;
  padding:
    calc(var(--safe-top) + 14px)
    16px
    calc(var(--safe-bottom) + 96px);
}

.shell-room-chat {
  height: var(--app-height, 100vh);
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: padding-bottom 140ms ease, height 140ms ease;
  padding:
    calc(var(--safe-top) + 14px)
    16px
    calc(var(--safe-bottom) + 88px);
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.topbar-centered {
  justify-content: center;
}

.topbar-centered .topbar-left {
  justify-content: center;
}

.topbar-centered .topbar-right {
  display: none;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-btn,
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(229, 229, 234, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(28, 28, 30, 0.06);
  cursor: pointer;
}

.brand-logo {
  height: 56px;
  width: auto;
  display: block;
}

.hero-title {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 800;
  margin: 6px 0 0;
}

.hero-subtitle,
.muted {
  color: var(--muted);
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 229, 234, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: 16px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.prompt-box,
.field,
.chip,
.cta,
.secondary,
.place-vote-btn,
.status-pill,
.participant-row,
.scenario-card,
.meeting-card,
.place-card,
.date-chip {
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.prompt-box {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.scenario-card {
  min-height: 122px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.scenario-icon {
  font-size: 32px;
}

.scenario-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
  white-space: pre-line;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta,
.secondary {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.cta {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 28px rgba(52, 199, 89, 0.28);
}

.secondary {
  background: var(--card);
  border: 1px solid var(--border);
}

.place-picker-btn {
  background: var(--blue-soft);
  border-color: rgba(0, 122, 255, 0.18);
  color: var(--blue);
  font-weight: 700;
}

.place-selected-btn {
  width: auto;
  align-self: flex-start;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 2px;
}

.meeting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meeting-card {
  padding: 0;
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.meeting-card-delete {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: #f5f5f8;
  color: #4a4a52;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  z-index: 1;
}

.meeting-card-top,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-card-body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 220px;
}

.meeting-card-copy {
  max-width: calc(100% - 60px);
}

.meeting-title {
  font-size: 22px;
  line-height: 1.12;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.meeting-subtitle,
.small-text {
  font-size: 13px;
  color: var(--muted);
}

.meeting-subtitle {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.34;
  color: var(--muted);
}

.meeting-meta {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.42;
  color: var(--muted);
}

.meeting-common-days {
  margin: 0;
  font-size: 17px;
  line-height: 1.32;
  color: var(--text);
}

.meeting-common-days.found {
  display: inline-flex;
  align-self: flex-start;
  justify-content: flex-start;
  text-align: left;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: #1f7a37;
  font-weight: 500;
}

.meeting-card-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--orange);
  font-size: 17px;
  font-weight: 600;
  padding-top: 2px;
}

.meeting-card-link-arrow {
  font-size: 34px;
  line-height: 0.9;
  color: var(--muted);
}

.meeting-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-draft {
  color: var(--muted);
  background: #f0f0f4;
}

.status-collecting {
  color: var(--orange);
  background: #fff3e0;
}

.status-date {
  color: var(--primary);
  background: var(--primary-soft);
}

.status-place,
.status-confirmed {
  color: var(--blue);
  background: var(--blue-soft);
}

.header-block {
  margin-bottom: 4px;
}

.screen-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.screen-header-copy {
  flex: 1;
}

.screen-header h1,
.screen-header h2 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  white-space: pre-line;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.field,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 15px 16px;
  outline: none;
  color: var(--text);
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.field:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.12);
}

.time-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.helper-row,
.avatars-row,
.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatars-row {
  flex-wrap: wrap;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #fff;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar + .avatar {
  margin-left: -10px;
}

.hint-box {
  background: var(--primary-soft);
  color: var(--text);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.meeting-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.meeting-detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f7fa;
  border: 1px solid var(--border);
}

.meeting-detail-meta-label {
  font-size: 12px;
  color: var(--muted);
}

.meeting-detail-meta-value {
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
  font-weight: 600;
}

.screen-room-chat {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.room-chat-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.messenger-header {
  padding: 14px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.messenger-header-copy {
  min-width: 0;
}

.messenger-header-title {
  font-size: 20px;
}

.messenger-header-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
}

.messenger-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.74)),
    radial-gradient(circle at top left, rgba(52, 199, 89, 0.12), transparent 28%);
  border: 1px solid rgba(229, 229, 234, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-thread-root {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-composer-root {
  flex: 0 0 auto;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 12px;
}

.chat-history-loader {
  display: flex;
  justify-content: center;
}

.chat-history-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.18);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chat-history-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  justify-content: flex-start;
}

.chat-row-mine {
  justify-content: flex-end;
}

.chat-row-avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.chat-bubble {
  max-width: min(82%, 320px);
  padding: 10px 12px 8px;
  border-radius: 18px 18px 18px 8px;
  background: #fff;
  border: 1px solid rgba(229, 229, 234, 0.9);
  box-shadow: 0 8px 18px rgba(28, 28, 30, 0.06);
}

.chat-bubble-mine {
  background: linear-gradient(180deg, #dbf8c6 0%, #cdf1b5 100%);
  border-color: rgba(52, 199, 89, 0.18);
  border-radius: 18px 18px 8px 18px;
}

.chat-author {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}

.chat-message-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.42;
  color: var(--text);
  word-break: break-word;
}

.chat-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.chat-link:hover,
.chat-link:focus-visible {
  text-decoration: underline;
}

.chat-bubble-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.chat-empty-state {
  margin: auto 0;
  text-align: center;
  padding: 28px 18px;
}

.messenger-composer {
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(229, 229, 234, 0.9);
  backdrop-filter: blur(16px);
  transition: transform 140ms ease, bottom 140ms ease;
}

.messenger-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.messenger-error {
  color: var(--danger);
  margin: 0 0 8px;
  width: 100%;
}

.messenger-textarea {
  flex: 1 1 auto;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  resize: none;
  overflow-y: auto;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
}

.messenger-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.messenger-actions-end {
  justify-content: flex-end;
}

.messenger-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(52, 199, 89, 0.2);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.messenger-send-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-list-item {
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
}

.chat-list-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-list-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-list-title {
  font-size: 19px;
}

.chat-list-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.chat-list-subtitle {
  margin: 0;
  font-size: 13px;
}

.chat-list-preview {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  opacity: 0.78;
}

.hero-banner {
  padding: 18px;
}

.event-preview {
  min-height: 180px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.28)),
    linear-gradient(135deg, #5ed776, #2a9f52 52%, #11743b);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}

.event-preview::after {
  content: "";
  position: absolute;
  inset: auto -30px -50px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.event-preview-title {
  position: relative;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.detail-row + .detail-row {
  border-top: 1px solid var(--border);
}

.progress-bar {
  width: 100%;
  height: 7px;
  background: var(--card-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.date-chips,
.filters-row,
.place-vote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.participant-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.participant-pill.active {
  background: transparent;
  box-shadow: none;
}

.participant-pill.active .avatar,
.participant-pill.active .avatar-photo {
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.22);
}

.date-chip,
.chip,
.filter-chip,
.place-vote-btn {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--card-2);
  cursor: pointer;
}

.date-chip.active,
.chip.active,
.filter-chip.active,
.place-vote-btn.active {
  background: var(--primary);
  color: #fff;
}

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

.calendar-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.calendar-nav-row .mini-btn {
  flex: 0 0 42px;
}

.calendar-title-block {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--card-2);
  border-radius: 999px;
  padding: 3px;
}

.meetings-toggle {
  width: 100%;
  margin-bottom: 14px;
}

.room-section-toggle {
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
}

.toggle-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
}

.toggle-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(28, 28, 30, 0.08);
}

.threshold-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.threshold-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.threshold-stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--card-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.threshold-stepper-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.threshold-stepper-value {
  min-height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}

.threshold-stepper-number {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.threshold-stepper-label {
  font-size: 14px;
  color: var(--muted);
}

.calendar-toolbar.calendar-locked-ui,
.threshold-box.calendar-locked-ui {
  opacity: 0.56;
}

.calendar-grid.calendar-locked-ui .calendar-day:not(.empty):not(.day-confirmed),
.year-calendar.calendar-locked-ui .year-day:not(.empty):not(.day-confirmed) {
  opacity: 0.34;
  filter: grayscale(0.08);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar-day {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  padding: 6px 2px;
  touch-action: none;
}

.calendar-day.disabled {
  opacity: 0.38;
  cursor: default;
}

.calendar-day.weekend {
  background: #f3f3f6;
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.calendar-day.drag-preview-add,
.year-day.drag-preview-add {
  border-color: rgba(52, 199, 89, 0.6);
  background: var(--primary-soft);
}

.calendar-day.drag-preview-remove,
.year-day.drag-preview-remove {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.94);
}

.calendar-day.weekend.drag-preview-remove {
  background: #f3f3f6;
}

.calendar-day.day-mine-only {
  background: #e8f9ee;
  border-color: #34c759;
  box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.22);
  color: #1f7a37;
}

.calendar-day.best {
  background: #34c759;
  border-color: #34c759;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
  color: #fff;
}

.calendar-day.day-confirmed,
.year-day.day-confirmed {
  background: #34c759;
  border-color: #34c759;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72), 0 10px 22px rgba(52, 199, 89, 0.24), 0 0 0 2px rgba(52, 199, 89, 0.22);
  opacity: 1;
  transform: scale(1.03);
  z-index: 1;
}

.calendar-day.day-confirm-draft,
.year-day.day-confirm-draft {
  border-color: #34c759;
  box-shadow: inset 0 0 0 2px rgba(52, 199, 89, 0.24);
}

.calendar-day .num {
  font-size: 16px;
  font-weight: 700;
}

.calendar-day .meta {
  font-size: 10px;
  color: inherit;
  opacity: 0.75;
}

.year-calendar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.year-month {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.year-month-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  text-transform: capitalize;
}

.year-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.year-day {
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  touch-action: none;
}

.year-day-count {
  font-size: 9px;
  opacity: 0.8;
}

.year-day.day-mine-only {
  background: #e8f9ee;
  border-color: #34c759;
  box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.22);
  color: #1f7a37;
}

.year-day.best {
  background: #34c759;
  border-color: #34c759;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
  color: #fff;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.legend-mine {
  background: var(--primary-soft);
  border: 1px solid rgba(52, 199, 89, 0.6);
}

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

.participant-list {
  display: flex;
  flex-direction: column;
}

.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  border-radius: 16px;
}

.participant-row + .participant-row {
  border-top: 1px solid var(--border);
}

.participant-row-match {
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.16), rgba(52, 199, 89, 0.05) 72%, rgba(52, 199, 89, 0));
  box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.16);
  padding-left: 10px;
  padding-right: 10px;
}

.participant-name {
  font-size: 15px;
  font-weight: 500;
}

.participant-select-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.participant-select-btn.active .participant-name {
  color: #1f7a37;
}

.participant-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.participant-avatar-check {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #34c759;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #fff;
}

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

.participant-contact-btn {
  min-height: 36px;
  padding: 0 12px;
  flex: 0 0 auto;
}

.participant-remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  flex: 0 0 auto;
}

.participant-remove-btn:disabled {
  opacity: 0.5;
}

.participant-identity {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.participant-identity-button {
  cursor: pointer;
  text-align: left;
  background: transparent;
  border-radius: 0;
}

.bottom-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, var(--shell-width));
  padding: 12px 16px calc(var(--safe-bottom) + 16px);
  background: linear-gradient(180deg, rgba(242, 242, 247, 0), rgba(242, 242, 247, 0.94) 26%, rgba(242, 242, 247, 0.98) 100%);
  backdrop-filter: blur(18px);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, var(--shell-width));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 16px calc(var(--safe-bottom) + 12px);
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(229, 229, 234, 0.9);
  backdrop-filter: blur(18px);
}

html.chat-input-active .bottom-nav,
body.chat-input-active .bottom-nav {
  display: none;
}

html.chat-input-active .shell-room-chat,
body.chat-input-active .shell-room-chat {
  padding-bottom: var(--safe-bottom);
}

html.chat-input-active .chat-thread,
body.chat-input-active .chat-thread {
  padding-bottom: 24px;
}

.nav-btn {
  min-height: 52px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  cursor: pointer;
}

.nav-btn.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.success-circle {
  width: 68px;
  height: 68px;
  border-radius: 34px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  margin: 0 auto 8px;
}

.center-card {
  text-align: center;
  padding: 28px 20px;
}

.places-map-card {
  overflow: hidden;
  padding: 0;
}

.places-map {
  width: 100%;
  height: 260px;
  background: linear-gradient(180deg, #eef5ff 0%, #e8f9ee 100%);
}

.places-search-hint {
  margin-top: 8px;
  min-height: 18px;
}

.big-number {
  font-size: 36px;
  font-weight: 800;
}

.countdown-box {
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 14px;
}

.place-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}

.place-card.leading {
  border: 2px solid var(--primary);
}

.place-head {
  display: flex;
  gap: 12px;
}

.place-thumb {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.42), transparent 32%),
    linear-gradient(135deg, #5ed776, #2a9f52 55%, #11743b);
  flex-shrink: 0;
  overflow: hidden;
}

.place-thumb-map {
  background: #dfe7f5;
}

.place-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.place-name {
  font-size: 16px;
  font-weight: 700;
}

.place-meta,
.place-address {
  font-size: 13px;
  color: var(--muted);
}

.auth-wrap {
  min-height: 100vh;
  width: min(100%, var(--shell-width));
  padding:
    calc(var(--safe-top) + 22px)
    20px
    calc(var(--safe-bottom) + 28px);
  display: flex;
  align-items: center;
}

.auth-card {
  width: 100%;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(229, 229, 234, 0.9);
  box-shadow: 0 28px 60px rgba(28, 28, 30, 0.1);
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #5ae06f);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 16px 28px rgba(52, 199, 89, 0.28);
}

.auth-title {
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0 0 10px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}

.preview-tile {
  padding: 14px;
  border-radius: 16px;
  background: #f7f7fa;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.auth-note,
.error-text {
  font-size: 13px;
  color: var(--muted);
}

.error-text {
  color: var(--danger);
}

.loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.hidden {
  display: none !important;
}

@media (hover: hover) {
  .scenario-card:hover,
  .meeting-card:hover,
  .cta:hover,
  .secondary:hover,
  .calendar-day:hover,
  .place-card:hover,
  .mini-btn:hover,
  .icon-btn:hover {
    transform: translateY(-1px);
  }
}
