:root {
  --bg: #f6f7f5;
  --ink: #141414;
  --muted: #667085;
  --line: #dde3ea;
  --surface: #ffffff;
  --soft: #f1f5f4;
  --blue: #2563eb;
  --teal: #0f9f8f;
  --coral: #e65b45;
  --yellow: #fee500;
  --shadow: 0 18px 55px rgba(20, 20, 20, 0.11);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(15, 159, 143, 0.08), transparent 34%),
    var(--bg);
  overflow-wrap: break-word;
  transition: background 180ms ease;
  word-break: keep-all;
}

body.role-home {
  background:
    linear-gradient(180deg, rgba(15, 159, 143, 0.1), rgba(230, 91, 69, 0.04) 48%, var(--bg) 100%),
    #f7f6f2;
}

body.role-participant {
  background:
    linear-gradient(180deg, rgba(15, 159, 143, 0.13), rgba(37, 99, 235, 0.035) 42%, var(--bg) 100%),
    #eef8f5;
}

body.role-host {
  background:
    linear-gradient(180deg, rgba(230, 91, 69, 0.14), rgba(255, 184, 108, 0.08) 44%, var(--bg) 100%),
    #fff3ee;
}

body.role-home .app-bar {
  background: rgba(247, 246, 242, 0.9);
}

body.role-participant .app-bar {
  background: rgba(238, 248, 245, 0.9);
}

body.role-host .app-bar {
  background: rgba(255, 243, 238, 0.92);
}

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

input,
select,
textarea,
code {
  overflow-wrap: normal;
  word-break: normal;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.86);
  background: rgba(246, 247, 245, 0.88);
  padding: 0 clamp(16px, 4vw, 38px);
  backdrop-filter: blur(16px);
}

.brand {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.role-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px;
}

.role-tabs button,
.role-tabs a {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.role-tabs .is-active {
  background: var(--ink);
  color: #fff;
}

.workspace {
  display: flex;
  justify-content: center;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vh, 42px) clamp(18px, 4vw, 42px);
}

.mobile-stage {
  overflow: hidden;
  width: min(430px, 100%);
  min-height: 760px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screen {
  display: none;
  min-height: 760px;
  padding: 22px;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
}

.is-hidden {
  display: none !important;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 8vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.visual-hero {
  position: relative;
  display: flex;
  min-height: 350px;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  color: #fff;
}

.visual-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
}

.visual-hero div {
  position: relative;
  z-index: 1;
  padding: 22px;
}

.visual-hero .label {
  color: #bff5ec;
}

.visual-hero p {
  max-width: 310px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

.host-hero {
  min-height: 330px;
}

#entryScreen,
#participantEntryScreen,
#hostEntryScreen {
  padding: 20px;
}

#entryScreen .visual-hero,
#participantEntryScreen .visual-hero,
#hostEntryScreen .visual-hero {
  min-height: clamp(286px, 34vh, 320px);
}

#entryScreen .visual-hero div,
#participantEntryScreen .visual-hero div,
#hostEntryScreen .visual-hero div {
  padding: 20px;
}

#entryScreen h1,
#participantEntryScreen h1,
#hostEntryScreen h1 {
  font-size: clamp(2.18rem, 3vw, 2.68rem);
}

#entryScreen .action-zone,
#participantEntryScreen .action-zone,
#hostEntryScreen .action-zone {
  gap: 12px;
  margin-top: 16px;
}

#entryScreen .guest-form,
#participantEntryScreen .guest-form,
#hostEntryScreen .guest-form {
  gap: 10px;
}

#entryScreen label,
#participantEntryScreen label,
#hostEntryScreen label {
  gap: 5px;
}

#entryScreen input,
#participantEntryScreen input,
#hostEntryScreen input,
#entryScreen .primary,
#entryScreen .secondary,
#participantEntryScreen .primary,
#participantEntryScreen .secondary,
#hostEntryScreen .primary,
#hostEntryScreen .secondary {
  min-height: 46px;
}

.role-choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.role-choice-card {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 17px;
  text-align: left;
}

.role-choice-card span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.role-choice-card strong {
  font-size: 1.2rem;
  line-height: 1.18;
}

.role-choice-card small {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.role-choice-card.host-choice span {
  color: var(--coral);
}

.role-choice-card:focus-visible,
.role-choice-card:hover {
  border-color: rgba(20, 20, 20, 0.24);
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.08);
  transform: translateY(-1px);
}

.entry-help-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  padding: 13px 14px;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.5;
}

.action-zone {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.guest-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  min-height: 104px;
  padding: 13px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, 0.13);
}

.primary,
.secondary,
.danger {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 900;
}

.primary {
  border: 0;
  background: var(--ink);
  color: #fff;
}

.primary.yellow {
  background: var(--yellow);
  color: #191600;
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger {
  border: 0;
  background: var(--coral);
  color: #fff;
}

.primary:disabled,
.secondary:disabled {
  cursor: not-allowed;
  background: #d9dde3;
  color: #677282;
}

.primary.is-selected-reaction:disabled {
  background: var(--teal);
  color: #fff;
}

.secondary.is-selected-reaction:disabled {
  border-color: rgba(96, 111, 132, 0.34);
  background: #eef2f5;
  color: var(--ink);
}

.full {
  width: 100%;
}

.notice-box,
.quota-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  padding: 12px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.step-head {
  margin-bottom: 18px;
}

.step-head h1 {
  font-size: clamp(1.85rem, 7vw, 2.55rem);
}

.info-list {
  display: grid;
  gap: 8px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.info-list span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.info-list strong {
  text-align: right;
}

.check-card {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.check-card label,
.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  line-height: 1.45;
}

.check-card input,
.inline-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 1px;
  accent-color: var(--teal);
}

.bottom-actions {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.bottom-actions.single {
  grid-template-columns: 1fr;
}

.progress-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 22px;
}

.progress-row span {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.progress-row .is-active,
.progress-row .is-done {
  background: var(--teal);
}

.profile-form,
.profile-step {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.profile-step {
  display: none;
  gap: 16px;
  margin: 0;
  border: 0;
  padding: 0;
}

.profile-step.is-active {
  display: flex;
}

.profile-step h1 {
  font-size: clamp(1.78rem, 7vw, 2.35rem);
}

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

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

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-grid.compact .extra {
  display: none;
}

.chip-grid.is-expanded .extra {
  display: inline-flex;
}

.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  font-weight: 800;
}

.chip.is-selected {
  border-color: var(--teal);
  background: rgba(15, 159, 143, 0.1);
  color: #08766b;
}

.custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.custom-row .secondary {
  border-radius: 8px;
}

.cohost-helper {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.cohost-helper strong {
  font-size: 0.92rem;
}

.cohost-helper span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: keep-all;
}

#interestStatus {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.photo-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.photo-row img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.photo-row-preview {
  display: block;
  overflow: hidden;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.photo-row-preview.is-active {
  cursor: zoom-in;
}

.photo-row-preview:disabled {
  cursor: default;
}

.photo-row-preview:focus-visible,
.photo-preview-open:focus-visible {
  outline: 3px solid rgba(15, 159, 143, 0.28);
  outline-offset: 2px;
}

.photo-row p {
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.photo-status {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.photo-status.is-done {
  color: #08766b;
}

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

.photo-preview-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.photo-preview-item.is-main {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(15, 159, 143, 0.18);
}

.photo-preview-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-open {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 0;
  cursor: zoom-in;
}

.photo-main-badge {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #08766b;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 900;
}

.photo-main-button,
.photo-remove-button {
  position: absolute;
  z-index: 2;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 900;
}

.photo-main-button {
  right: 6px;
  top: 6px;
}

.photo-main-button:disabled {
  background: rgba(15, 159, 143, 0.9);
  color: #fff;
  cursor: default;
}

.photo-remove-button {
  right: 6px;
  bottom: 6px;
}

.photo-main-button:focus-visible,
.photo-remove-button:focus-visible {
  outline: 3px solid rgba(15, 159, 143, 0.28);
  outline-offset: 2px;
}

.photo-preview-grid:empty {
  display: none;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.76rem;
  font-weight: 900;
}

.status-pill.waiting {
  background: rgba(47, 111, 237, 0.1);
  color: var(--blue);
}

.status-pill.approved {
  background: rgba(15, 159, 143, 0.12);
  color: #08766b;
}

.status-pill.revision {
  background: rgba(242, 109, 93, 0.12);
  color: var(--coral);
}

.approval-status-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: left;
}

.approval-status-card img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
}

.approval-status-card strong,
.approval-status-card span {
  display: block;
}

.approval-status-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.approval-steps {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  text-align: left;
}

.approval-steps div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.approval-steps span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.feed-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.feed-head h1 {
  margin-bottom: 0;
  font-size: 1.56rem;
}

.icon-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.icon-actions button,
.back,
.danger-link {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 900;
}

.danger-link {
  color: var(--coral);
}

.compact-button {
  min-height: 38px;
  padding: 0 15px;
}

.quota-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quota-card span {
  text-align: right;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-card img {
  width: 100%;
  aspect-ratio: 4 / 4.8;
  object-fit: cover;
}

.profile-copy {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.profile-copy h2 {
  margin-bottom: 0;
}

.profile-copy p {
  margin-bottom: 0;
}

.path {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.reaction-status {
  border: 1px solid rgba(15, 159, 143, 0.22);
  border-radius: 8px;
  background: rgba(15, 159, 143, 0.08);
  color: #08766b;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.45;
  word-break: keep-all;
}

.reaction-status.is-pass {
  border-color: rgba(96, 111, 132, 0.24);
  background: #f3f6f8;
  color: var(--muted);
}

.reaction-status.is-hidden {
  display: none;
}

.feed-decision {
  margin: -4px 0 14px;
}

.feed-nav-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: -2px 0 14px;
}

.feed-nav-actions .slim {
  min-height: 44px;
  padding: 10px 12px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid rgba(221, 227, 234, 0.86);
  background: rgba(255, 255, 255, 0.92);
  padding-top: 12px;
  backdrop-filter: blur(12px);
}

.detail-image {
  width: 100%;
  aspect-ratio: 4 / 4.8;
  margin: 14px 0;
  border-radius: 8px;
  object-fit: cover;
}

.lead {
  color: var(--ink);
  font-size: 1.02rem;
}

.centered {
  justify-content: center;
  text-align: center;
}

.match-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}

.match-visual span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: var(--soft);
  font-weight: 900;
}

.match-visual i {
  width: 52px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
}

.chat-item,
.compact-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.chat-list-items,
.host-list-stack {
  display: grid;
  gap: 10px;
}

.compact-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.participant-row {
  grid-template-columns: 52px minmax(0, 1fr);
}

.compact-row.empty-list-card {
  grid-template-columns: 1fr;
  align-items: start;
}

.compact-row.empty-list-card strong {
  max-width: 100%;
  line-height: 1.35;
}

.participant-row > div {
  min-width: 0;
}

.participant-row img {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.participant-row strong {
  display: block;
}

.compact-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.participant-row .status-pill {
  margin-top: 7px;
  font-style: normal;
}

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

.participant-status-actions .status-pill {
  margin-top: 0;
}

.participant-reset-button {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--soft);
  font-weight: 900;
}

.chat-item p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row span {
  overflow: visible;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.chat-head h1 {
  margin-bottom: 0;
  font-size: 1.3rem;
}

.chat-head p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.chat-head .danger-link {
  margin-left: auto;
}

.suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px 0;
  padding-bottom: 2px;
}

.suggestions button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  white-space: nowrap;
}

.messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
}

.messages p {
  max-width: 78%;
  margin: 0;
  border-radius: 8px;
  padding: 11px 13px;
}

.messages .system {
  align-self: center;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 0.84rem;
}

.messages .me {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 8px;
  margin-top: auto;
}

.composer input,
.composer button {
  border-radius: 999px;
}

.composer button {
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.host-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.host-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.host-tabs .is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.host-panel {
  display: none;
  gap: 12px;
}

.host-panel.is-active {
  display: grid;
}

.host-room-list {
  display: grid;
  gap: 12px;
}

.host-profile-preview,
.host-profile-summary {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.host-profile-preview img,
.host-profile-summary img {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
}

.host-profile-preview img.is-previewable {
  cursor: zoom-in;
}

.host-profile-preview img.is-previewable:focus-visible {
  outline: 3px solid rgba(15, 159, 143, 0.28);
  outline-offset: 2px;
}

.host-profile-preview strong,
.host-profile-summary strong {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-profile-preview p,
.host-profile-summary p,
.host-profile-preview span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.host-profile-summary {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  margin-bottom: 14px;
  background: var(--soft);
}

.host-profile-summary img {
  width: 58px;
  height: 58px;
}

.host-profile-summary .label {
  margin-bottom: 4px;
}

.host-profile-summary button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.approval-todo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(15, 159, 143, 0.35);
  border-radius: 8px;
  background: rgba(15, 159, 143, 0.08);
  padding: 12px;
}

.approval-todo.is-empty {
  border-color: var(--line);
  background: var(--soft);
}

.approval-todo strong,
.approval-todo span {
  display: block;
}

.approval-todo strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.96rem;
}

.approval-todo span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.host-photo-field {
  position: relative;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.host-photo-field button {
  border-radius: 8px;
}

.host-photo-field .photo-status {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  white-space: nowrap;
}

.host-room-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.host-room-card.is-featured {
  border-color: rgba(15, 159, 143, 0.35);
  box-shadow: 0 12px 36px rgba(15, 159, 143, 0.12);
}

.host-room-card h2 {
  margin: 8px 0 6px;
  font-size: 1.22rem;
}

.host-room-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.room-dday {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.room-dday strong {
  border-radius: 999px;
  background: rgba(15, 159, 143, 0.1);
  color: #08766b;
  padding: 4px 8px;
  font-size: 0.78rem;
}

.room-dday span {
  font-size: 0.82rem;
}

.room-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.room-status.open {
  background: rgba(15, 159, 143, 0.1);
  color: #08766b;
}

.room-status.draft {
  background: rgba(102, 112, 133, 0.12);
  color: var(--muted);
}

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

.room-meta span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.room-meta button {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  white-space: nowrap;
}

.link-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.link-box span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.link-box code {
  overflow: hidden;
  border: 1px solid rgba(15, 159, 143, 0.18);
  border-radius: 8px;
  background: rgba(15, 159, 143, 0.08);
  color: #08766b;
  padding: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-request-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.approval-request-card.is-approved {
  border-color: rgba(15, 159, 143, 0.32);
  background: rgba(15, 159, 143, 0.05);
}

.approval-request-card.needs-revision {
  border-color: rgba(242, 109, 93, 0.34);
  background: rgba(242, 109, 93, 0.05);
}

.approval-request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.approval-request-head small {
  color: var(--muted);
  font-weight: 900;
}

.approval-profile-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.approval-photo-main,
.approval-photo-thumb {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.approval-photo-main {
  width: 72px;
  height: 72px;
}

.approval-photo-main:disabled {
  cursor: default;
  opacity: 0.74;
}

.approval-photo-main img,
.approval-photo-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

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

.approval-photo-grid:empty {
  display: none;
}

.approval-photo-thumb {
  position: relative;
  aspect-ratio: 1;
}

.approval-photo-thumb img {
  width: 100%;
  height: 100%;
}

.approval-photo-thumb span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.76);
  color: #fff;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.approval-profile-row p,
.approval-profile-row span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.host-danger-zone {
  display: grid;
  gap: 8px;
}

.extend-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.extend-control label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.extend-control select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-weight: 900;
}

.extend-control button {
  min-height: 48px;
  border-radius: 8px;
}

.extend-hint {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: keep-all;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.sheet.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.sheet-bg {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(20, 20, 20, 0.35);
}

.sheet-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(430px, calc(100vw - 24px));
  margin: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 20px 70px rgba(20, 20, 20, 0.22);
}

.sheet-panel h2,
.sheet-panel p {
  margin-bottom: 0;
}

.photo-viewer {
  place-items: center;
}

.photo-viewer-panel {
  gap: 14px;
}

.photo-viewer-panel img {
  width: 100%;
  max-height: min(68vh, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  object-fit: contain;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(340px, calc(100vw - 36px));
  transform: translateY(12px);
  opacity: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 15px;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 860px) {
  .app-bar {
    min-height: 56px;
    padding: 0 12px;
  }

  .brand {
    font-size: 1rem;
  }

  .role-tabs button,
  .role-tabs a {
    padding: 0 9px;
    font-size: 0.75rem;
  }

  .workspace {
    display: block;
    width: min(100%, 430px);
    padding: 0;
  }

  .mobile-stage {
    height: calc(100vh - 56px);
    height: calc(100svh - 56px);
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    height: calc(100vh - 56px);
    height: calc(100svh - 56px);
    min-height: calc(100vh - 56px);
    min-height: calc(100svh - 56px);
    overflow-y: auto;
    padding: 18px;
  }

  .visual-hero {
    min-height: 330px;
  }
}

@media (max-width: 420px) {
  .field-pair,
  .photo-row,
  .approval-status-card,
  .approval-profile-row,
  .approval-todo,
  .extend-control,
  .custom-row,
  .chat-item,
  .compact-row {
    grid-template-columns: 1fr;
  }

  .chat-item .secondary {
    width: 100%;
  }

  .quota-card {
    display: grid;
  }

  .quota-card span {
    text-align: left;
  }

  .room-meta {
    grid-template-columns: 1fr;
  }

  .host-tabs {
    grid-template-columns: repeat(5, minmax(50px, 1fr));
    gap: 4px;
  }

  .host-tabs button {
    padding: 0 6px;
    font-size: 0.74rem;
  }

  .host-profile-summary {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .host-profile-summary button {
    width: 100%;
    grid-column: 1 / -1;
  }
}
