:root {
  color-scheme: light;
  --ink: #1b1b1b;
  --deep: #111111;
  --teal: #3b3b3b;
  --green: #e60012;
  --green-soft: #fff0f1;
  --gold: #c91522;
  --gold-soft: #fff4f4;
  --red: #e60012;
  --paper: #ffffff;
  --canvas: #f3f3f3;
  --line: #dedede;
  --muted: #6b6b6b;
  --quiet: #9b9b9b;
  --shadow: 0 3px 12px rgba(0, 0, 0, .07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e5e5e5;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

#app {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--canvas);
  box-shadow: 0 0 28px rgba(0, 0, 0, .13);
}

.role-preview-banner {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  color: #fff;
  background: #7f1720;
  box-shadow: 0 3px 12px rgba(96, 0, 8, .22);
}

.role-preview-banner > span {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
}

.role-preview-banner svg {
  width: 18px;
}

.role-preview-banner small {
  grid-column: 2 / -1;
  opacity: .78;
  font-size: 10px;
}

.role-preview-banner button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  color: #7f1720;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  border: 0;
  border-radius: 18px;
}

.role-preview-banner + .screen .app-header {
  top: 54px;
}

.demo-environment-banner {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  color: #fff;
  background: #252525;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .22);
}

.demo-environment-banner > span {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 3px 7px;
  min-width: 0;
  font-size: 13px;
}

.demo-environment-banner svg {
  grid-row: 1 / 3;
  width: 18px;
}

.demo-environment-banner small {
  opacity: .78;
  font-size: 10px;
}

.demo-environment-banner em {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #252525;
  background: #fff;
  border-radius: 15px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.demo-environment-banner + .screen .app-header {
  top: 54px;
}

.screen {
  min-height: 100dvh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.screen.no-nav {
  padding-bottom: 24px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  color: #fff;
  background: var(--deep);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.app-header .head-copy {
  min-width: 0;
  flex: 1;
}

.app-header h1 {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header p {
  margin: 3px 0 0;
  color: #c7c7c7;
  font-size: 11px;
}

.icon-btn {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.icon-btn:active {
  background: rgba(255, 255, 255, .1);
}

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;
  top: 1px;
  right: 0;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--deep);
  border-radius: 9px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  place-items: center;
}

.icon-btn svg,
.nav-item svg,
.btn svg,
.field-icon svg,
.section-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.content {
  padding: 14px;
}

.content.tight {
  padding-top: 10px;
}

.hero {
  padding: 20px 18px 18px;
  color: #fff;
  background: var(--deep);
}

.hero .eyebrow {
  margin: 0 0 8px;
  color: #c0c0c0;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
}

.hero .hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.role-badge,
.status-badge,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.role-badge {
  flex: 0 0 auto;
  color: #d7e4e5;
  border: 1px solid #5a5a5a;
}

.status-badge {
  color: var(--green);
  background: var(--green-soft);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  border-top: 1px solid #3e3e3e;
  border-bottom: 1px solid #3e3e3e;
}

.metric {
  min-width: 0;
  padding: 13px 8px 12px;
  border-left: 1px solid #3e3e3e;
}

.metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.metric strong {
  display: block;
  color: #fff;
  font-size: 20px;
  line-height: 1.15;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: #bdbdbd;
  font-size: 10px;
  white-space: nowrap;
}

.panel {
  margin-bottom: 12px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel.flush {
  padding: 0;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.section-title h2 {
  margin: 0;
  color: var(--deep);
  font-size: 15px;
}

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

.combo-launch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  color: var(--deep);
  background: #fff;
  border: 1px solid #bac6c7;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.combo-launch svg {
  width: 15px;
  height: 15px;
}

.section-icon {
  display: grid;
  color: var(--green);
  place-items: center;
}

.text-link {
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 11px;
  text-align: left;
  background: #f7f9f9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.quick-action .qa-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--teal);
  background: #e8eeee;
  border-radius: 6px;
  place-items: center;
}

.quick-action b {
  display: block;
  color: var(--deep);
  font-size: 13px;
}

.quick-action span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

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

.room-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 78px 14px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 7px rgba(23, 56, 61, .05);
}

.room-thumb,
.room-placeholder {
  width: 86px;
  height: 68px;
  border-radius: 5px;
}

.room-thumb {
  display: block;
  object-fit: cover;
  background: #e8eeee;
}

.room-thumb.plan {
  object-fit: contain;
}

.room-placeholder {
  display: grid;
  color: var(--quiet);
  background: #edf1f1;
  font-size: 11px;
  place-items: center;
}

.room-main {
  min-width: 0;
}

.room-main b {
  display: block;
  overflow: hidden;
  color: var(--deep);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 4px;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  font-size: 9px;
  font-style: normal;
  vertical-align: 1px;
}

.room-main span {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-price {
  color: var(--gold);
  font-size: 17px;
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.room-price small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.room-arrow {
  color: #a4b1b2;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 102px;
  gap: 8px;
  margin-bottom: 10px;
}

.new-room-alert {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 16px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 8px 10px;
  color: var(--deep);
  text-align: left;
  background: #fff4f4;
  border: 1px solid #f0b8bc;
  border-radius: 7px;
}

.new-room-alert > span {
  display: grid;
  width: 28px;
  height: 28px;
  color: var(--red);
  background: #ffe2e4;
  border-radius: 5px;
  place-items: center;
}

.new-room-alert > span svg,
.new-room-alert > svg {
  width: 17px;
  height: 17px;
}

.new-room-alert b {
  font-size: 13px;
}

.new-room-alert small {
  color: #8a3a40;
  font-size: 10px;
  white-space: nowrap;
}

.new-room-alert > svg {
  color: #b44a52;
}

.attention-panel {
  padding-bottom: 5px;
}

.attention-list {
  margin: 0 -4px;
}

.attention-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 47px;
  padding: 7px 4px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid #e6ebeb;
}

.attention-list button:first-child {
  border-top: 0;
}

.attention-list span {
  min-width: 0;
}

.attention-list b,
.attention-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-list b {
  color: var(--deep);
  font-size: 12px;
}

.attention-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.attention-list strong {
  color: var(--red);
  font-size: 12px;
  white-space: nowrap;
}

.attention-list svg {
  width: 15px;
  height: 15px;
  color: #a7b2b3;
}

.result-count {
  color: var(--muted);
  font-size: 11px;
}

.search {
  position: relative;
}

.search svg {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 17px;
  height: 17px;
  color: var(--quiet);
}

.search input,
.toolbar select {
  width: 100%;
  height: 38px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c4d0d1;
  border-radius: 6px;
  outline: 0;
}

.search input {
  padding: 0 10px 0 34px;
}

.toolbar select {
  padding: 0 8px;
  font-size: 12px;
}

.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 0 10px;
  color: var(--teal);
  background: transparent;
  border: 1px solid #bdcccc;
  border-radius: 16px;
  font-size: 11px;
}

.filter.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.filter-refresh {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  margin-left: auto;
  color: var(--teal);
  background: #fff;
  border: 1px solid #bdcccc;
  border-radius: 50%;
}

.filter-refresh svg {
  width: 15px;
  height: 15px;
}

.filter-refresh:disabled {
  opacity: .45;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: -2px 2px 10px;
  color: var(--muted);
  font-size: 11px;
}

.filter-summary em {
  margin-left: auto;
  color: var(--red);
  font-style: normal;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  color: #fff;
  text-decoration: none;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.btn.block {
  width: 100%;
}

.btn.secondary {
  color: var(--deep);
  background: #f3f6f6;
  border-color: #cbd6d7;
}

.btn.gold {
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

.btn.wechat {
  color: #fff;
  background: #07c160;
  border-color: #07c160;
}

.btn.custom-note {
  color: #fff;
  background: #171717;
  border-color: #171717;
}

.wechat-mark {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.btn.ghost {
  color: var(--teal);
  background: transparent;
  border-color: #acc0c2;
}

.btn:disabled {
  color: #7f8c8e;
  background: #dce3e3;
  border-color: #dce3e3;
  cursor: not-allowed;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login {
  min-height: 100dvh;
  padding: calc(44px + env(safe-area-inset-top)) 24px 24px;
  background: var(--paper);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
}

.brand-mark > img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: #fff;
}

.brand-copy b {
  display: block;
  color: var(--deep);
  font-size: 18px;
}

.beta-channel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ef0018;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  vertical-align: 2px;
}

.demo-channel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #173f43;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  vertical-align: 2px;
}

.brand-copy span {
  color: var(--muted);
  font-size: 10px;
}

.login h1 {
  margin: 0;
  color: var(--deep);
  font-size: 26px;
}

.login .lead {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.demo-login-notice {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: -10px 0 22px;
  padding: 12px;
  color: #173f43;
  background: #edf5f4;
  border: 1px solid #c8dddd;
  border-radius: 8px;
}

.demo-login-notice > svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.demo-login-notice span {
  display: grid;
  gap: 2px;
}

.demo-login-notice b { font-size: 13px; }
.demo-login-notice small { color: #557174; font-size: 11px; line-height: 1.45; }

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  background: #e8eeee;
  border: 1px solid #d5dfdf;
  border-radius: 7px;
}

.auth-mode button {
  min-height: 40px;
  padding: 0 8px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.auth-mode button.active {
  color: #fff;
  background: var(--deep);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--deep);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  color: var(--ink);
  background: #f8fafa;
  border: 1px solid #c9d5d5;
  border-radius: 6px;
  outline: 0;
}

.field input,
.field select {
  height: 46px;
  padding: 0 12px;
}

.field textarea {
  min-height: 78px;
  padding: 11px 12px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(49, 93, 99, .1);
}

.field.inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
}

.field.inline .btn {
  min-height: 46px;
  padding: 0 8px;
  font-size: 12px;
}

.login-foot {
  margin-top: 24px;
  color: var(--quiet);
  text-align: center;
  font-size: 11px;
}

.invite-source {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 0 18px;
  padding: 11px;
  background: var(--green-soft);
  border: 1px solid #efc3c6;
  border-radius: 7px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  place-items: center;
}

.invite-source b {
  display: block;
  color: var(--deep);
  font-size: 13px;
}

.invite-source span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.gallery {
  position: relative;
  height: 250px;
  margin: 12px 12px 0;
  overflow: hidden;
  background: #eef1f1;
  border: 1px solid var(--line);
  border-radius: 8px;
  touch-action: pan-y;
}

.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .28s ease;
  will-change: transform;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 34px;
  height: 42px;
  padding: 0;
  color: #fff;
  background: rgba(17, 17, 17, .46);
  border: 0;
  transform: translateY(-50%);
  place-items: center;
}

.gallery-arrow.prev { left: 8px; border-radius: 5px; }
.gallery-arrow.next { right: 8px; border-radius: 5px; }
.gallery-arrow svg { width: 20px; height: 20px; }

.gallery-empty {
  display: grid;
  place-items: center;
  color: #829094;
  background: #e9eeee;
}

.gallery-empty span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gallery-empty svg {
  width: 22px;
  height: 22px;
}

.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(14, 35, 39, .78);
  border-radius: 4px;
  font-size: 11px;
}

.gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}

.gallery-dots span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, .58);
  border-radius: 50%;
}

.gallery-dots span.active { background: #fff; }

.detail-card {
  position: relative;
  z-index: 2;
  margin: 12px 12px 0;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.combo-form {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.combo-count {
  color: var(--muted);
  font-size: 12px;
}

.combo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 7px 9px;
  color: var(--muted);
  background: #f5f7f7;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
}

.combo-toolbar select {
  min-width: 128px;
  padding: 6px 28px 6px 9px;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.combo-room-list {
  display: grid;
  gap: 7px;
}

.combo-room {
  display: grid;
  grid-template-columns: 22px 58px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 70px;
  padding: 7px;
  background: #f7f9f9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.combo-room.selected {
  background: #eef8f2;
  border-color: #56a77b;
}

.combo-room input {
  width: 19px;
  height: 19px;
  accent-color: #07c160;
}

.combo-room img,
.combo-placeholder {
  width: 58px;
  height: 50px;
  border-radius: 4px;
}

.combo-room img { object-fit: cover; }

.combo-placeholder {
  display: grid;
  color: var(--quiet);
  background: #e9eeee;
  font-size: 9px;
  place-items: center;
}

.combo-room > span:not(.combo-placeholder) { min-width: 0; }
.combo-room b { display: block; color: var(--deep); font-size: 13px; }
.combo-room small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.combo-room strong { color: var(--gold); font-size: 14px; }
.combo-options { margin-top: 10px; }

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-title h2 {
  margin: 0;
  color: var(--deep);
  font-size: 22px;
}

.detail-title .price {
  color: var(--gold);
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-title .price small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.chip {
  color: #991820;
  background: var(--gold-soft);
}

.chip.cool {
  color: var(--teal);
  background: #edf2f2;
}

.rent-total {
  padding: 11px 12px;
  color: #5a2428;
  background: #fff7f7;
  border: 1px solid #efc7ca;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.rent-total b {
  color: var(--red);
  font-size: 18px;
}

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

.share-rent-result,
.share-discount-result,
.rent-formula {
  margin-bottom: 12px;
  padding: 12px;
  background: #edf3f2;
  border: 1px solid #d2dfdd;
  border-radius: 6px;
}

.share-rent-result {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.share-rent-result span,
.share-discount-result span,
.rent-calculator-results span {
  color: var(--muted);
  font-size: 11px;
}

.share-rent-result b {
  margin-left: auto;
  color: var(--green);
  font-size: 23px;
}

.share-rent-result small,
.share-discount-result small,
.rent-calculator-results small {
  color: var(--muted);
  font-size: 10px;
}

.share-discount-result {
  background: #fff7e8;
  border-color: #ecd9ae;
}

.share-discount-result > span,
.share-discount-result > strong,
.share-discount-result > small {
  display: block;
}

.share-discount-result > span b {
  color: var(--deep);
}

.share-discount-result > strong {
  margin: 7px 0 4px;
  color: var(--deep);
  font-size: 13px;
}

.share-discount-result > strong b {
  color: #a86e12;
  font-size: 23px;
}

.share-rent-error {
  min-height: 17px;
  margin: -4px 0 9px;
  color: var(--red);
  font-size: 11px;
}

.rent-calculator-panel {
  padding: 16px;
}

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

.rent-room-heading b,
.rent-room-heading small {
  display: block;
}

.rent-room-heading b {
  color: var(--deep);
  font-size: 15px;
}

.rent-room-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.rent-room-heading > span {
  flex: none;
  padding: 4px 8px;
  color: var(--red);
  background: #fff1f2;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.rent-room-tools {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 9px 0 7px;
}

.rent-room-tools button {
  padding: 4px 10px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
  font-size: 10px;
}

.rent-room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 216px;
  padding: 1px 3px 3px 1px;
  overflow-y: auto;
}

.rent-room-card {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 9px;
  color: var(--deep);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  font: inherit;
}

.rent-room-card.selected {
  background: #fff4f4;
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(214, 28, 37, .08);
}

.rent-room-card span,
.rent-room-card b,
.rent-room-card small {
  display: block;
  min-width: 0;
}

.rent-room-card b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rent-room-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.rent-room-card i {
  display: grid;
  width: 18px;
  height: 18px;
  flex: none;
  place-items: center;
  color: #fff;
  background: var(--paper);
  border: 1px solid #bdc8c9;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.rent-room-card.selected i {
  background: var(--red);
  border-color: var(--red);
}

.rent-room-empty {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
}

.rent-calculator-grid {
  margin-top: 15px;
}

.rent-formula {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.rent-combined-result {
  padding: 14px;
  background: #fff9ed;
  border: 1px solid #e6c987;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(168, 110, 18, .08);
}

.rent-combined-heading,
.rent-combined-value,
.rent-weighted-values,
.rent-monthly-total,
.rent-detail-heading,
.rent-live-main,
.rent-live-meta {
  display: flex;
  align-items: center;
}

.rent-combined-heading {
  justify-content: space-between;
  gap: 10px;
  color: #7e5819;
  font-size: 10px;
  font-weight: 700;
}

.rent-combined-heading small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.rent-combined-value {
  gap: 10px;
  margin: 8px 0 10px;
}

.rent-combined-value > b {
  color: #a86e12;
  font-size: 30px;
  line-height: 1;
}

.rent-combined-value > strong {
  padding: 4px 8px;
  color: #7e5819;
  background: rgba(230, 201, 135, .34);
  border-radius: 999px;
  font-size: 10px;
}

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

.rent-weighted-values span {
  padding: 7px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
  border-radius: 5px;
  font-size: 9px;
}

.rent-weighted-values b {
  display: block;
  margin-top: 2px;
  color: var(--deep);
  font-size: 14px;
}

.rent-monthly-total {
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  color: var(--muted);
  border-top: 1px dashed rgba(126, 88, 25, .22);
  font-size: 9px;
}

.rent-monthly-total > b {
  color: #5f6870;
  font-size: 13px;
}

.rent-monthly-total > small {
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.rent-detail-heading {
  justify-content: space-between;
  margin: 3px 1px 7px;
}

.rent-detail-heading b {
  color: var(--deep);
  font-size: 11px;
}

.rent-detail-heading span {
  color: var(--muted);
  font-size: 9px;
}

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

.rent-calculator-results > div {
  min-width: 0;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rent-calculator-results span,
.rent-calculator-results b,
.rent-calculator-results small {
  display: block;
}

.rent-calculator-results b {
  margin: 7px 0 3px;
  color: var(--deep);
  font-size: 24px;
}

.rent-calculator-results .discount b {
  color: #a86e12;
}

.rent-discount-list {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.rent-discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  background: #fff9ed;
  border: 1px solid #ecd9ae;
  border-radius: 6px;
}

.rent-discount-row > div,
.rent-discount-row > b,
.rent-discount-row small,
.rent-discount-row strong {
  display: block;
  min-width: 0;
}

.rent-discount-row > div > b {
  overflow: hidden;
  color: var(--deep);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rent-discount-row > div > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.rent-discount-row > strong {
  flex: none;
  color: #a86e12;
  text-align: right;
  font-size: 18px;
}

.rent-discount-row > strong small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.rent-result-empty {
  margin-top: 2px;
  padding: 14px;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  font-size: 10px;
}

.rent-calculator-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.rent-live-summary,
.share-rent-live-summary {
  position: fixed;
  z-index: 45;
  right: max(0px, calc((100vw - 480px) / 2));
  bottom: var(--rent-keyboard-inset, 0px);
  left: max(0px, calc((100vw - 480px) / 2));
  display: none;
  padding: 10px 12px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255, 251, 241, .98);
  border-top: 1px solid #e2bf71;
  box-shadow: 0 -6px 18px rgba(44, 41, 30, .14);
  backdrop-filter: blur(12px);
}

body.rent-calculator-editing .bottom-nav {
  display: none;
}

body.rent-calculator-editing .rent-live-summary {
  display: block;
}

body.share-rent-editing .share-rent-live-summary {
  display: block;
}

body.rent-calculator-editing .rent-calculator-panel {
  padding-bottom: 150px;
}

body.share-rent-editing .share-pricing-editor {
  padding-bottom: 108px;
}

.rent-live-main {
  gap: 8px;
}

.rent-live-main > span {
  color: #7e5819;
  font-size: 10px;
  font-weight: 700;
}

.rent-live-main > strong {
  margin-left: auto;
  color: #a86e12;
  font-size: 24px;
  line-height: 1;
}

.rent-live-main > b {
  padding: 3px 6px;
  color: #7e5819;
  background: #f3dfaf;
  border-radius: 999px;
  font-size: 9px;
}

.rent-live-meta {
  gap: 9px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}

.rent-live-meta span:last-child {
  margin-left: auto;
  color: #697178;
}

.rent-live-rooms {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  padding-top: 7px;
  overflow-x: auto;
  border-top: 1px solid rgba(126, 88, 25, .15);
  scrollbar-width: none;
}

.rent-live-rooms::-webkit-scrollbar {
  display: none;
}

.rent-live-rooms span {
  flex: none;
  padding: 4px 7px;
  color: #8b672d;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(168, 110, 18, .18);
  border-radius: 999px;
  font-size: 8px;
}

.rent-live-rooms b {
  color: var(--deep);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin: 18px 0;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.fact b {
  display: block;
  margin-top: 3px;
  color: var(--deep);
  font-size: 15px;
}

.detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.recipient-field {
  margin-bottom: 2px;
  text-align: left;
}

.recipient-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.recipient-field input {
  height: 42px;
  background: #fff;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
  padding: 12px;
  background: #f8fafa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.option.selected {
  background: var(--green-soft);
  border-color: #e56f77;
}

.option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--green);
}

.option b {
  display: block;
  color: var(--deep);
  font-size: 13px;
}

.option span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.link-box {
  margin-bottom: 14px;
  padding: 11px;
  overflow-wrap: anywhere;
  color: var(--teal);
  text-align: left;
  background: #f2f6f6;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.note-list,
.people-list {
  display: grid;
  gap: 8px;
}

.notification-list {
  display: grid;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.notification-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 82px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
}

.notification-item:first-child {
  border-top: 0;
}

.notification-item.unread {
  background: #fff7f7;
}

.notification-status {
  width: 8px;
  height: 8px;
  background: #c8c8c8;
  border-radius: 50%;
}

.notification-item.unread .notification-status {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 0, 18, .1);
}

.notification-copy {
  min-width: 0;
}

.notification-copy b,
.notification-copy span,
.notification-copy small {
  display: block;
}

.notification-copy b {
  color: var(--deep);
  font-size: 13px;
  line-height: 1.45;
}

.notification-copy > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.notification-copy .notification-followup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 6px 8px;
  color: var(--deep);
  background: #fff1f2;
  border-radius: 5px;
}

.notification-copy .notification-followup em {
  padding: 1px 4px;
  color: var(--red);
  background: #fff;
  border-radius: 3px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.notification-copy .notification-followup strong {
  min-width: 0;
  color: inherit;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.notification-copy .notification-followup.empty {
  color: var(--quiet);
  background: #f5f6f6;
}

.notification-copy .notification-followup.empty em {
  color: var(--muted);
}

.notification-copy .notification-detail {
  color: var(--quiet);
  font-size: 10px;
}

.notification-item > svg {
  width: 16px;
  color: var(--quiet);
}

.notification-note {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.note-item,
.person-item {
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.note-top,
.person-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.note-item h3,
.person-item h3 {
  margin: 0;
  color: var(--deep);
  font-size: 14px;
}

.note-item p,
.person-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.note-combo-rooms {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: var(--deep);
  font-size: 11px;
  line-height: 1.45;
}

.note-combo-rooms span {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: var(--red);
  background: #fff0f1;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
}

.note-combo-rooms b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.note-stats,
.person-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #e4eaea;
}

.note-stat,
.person-stat {
  text-align: center;
}

.note-stat b,
.person-stat b {
  display: block;
  color: var(--deep);
  font-size: 14px;
}

.note-stat span,
.person-stat span {
  color: var(--muted);
  font-size: 9px;
}

.note-followup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  align-items: start;
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  color: var(--ink);
  text-align: left;
  background: #f7f8f8;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.note-followup span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.note-followup b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.45;
}

.note-followup small {
  grid-column: 2;
  color: var(--quiet);
  font-size: 9px;
}

.invite-lead {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.invite-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 13px 8px;
  background: #f3f7f6;
  border: 1px solid #d7e2df;
  border-radius: 7px;
}

.invite-steps div {
  min-width: 0;
  padding: 0 6px;
  text-align: center;
}

.invite-steps div + div {
  border-left: 1px solid #d7e2df;
}

.invite-steps span {
  display: grid;
  width: 23px;
  height: 23px;
  margin: 0 auto 6px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.invite-steps b,
.invite-steps small {
  display: block;
}

.invite-steps b {
  color: var(--deep);
  font-size: 11px;
}

.invite-steps small {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.invite-ready {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  color: #a3141e;
  background: var(--green-soft);
  border: 1px solid #efbfc3;
  border-radius: 7px;
}

.invite-ready > svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.invite-ready b,
.invite-ready small {
  display: block;
}

.invite-ready b {
  font-size: 13px;
}

.invite-ready small {
  margin-top: 2px;
  color: #7a5b5e;
  font-size: 10px;
}

.invite-actions {
  display: grid;
  gap: 8px;
}

.invite-generate {
  margin-top: 2px;
}

.invite-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.invite-details summary {
  padding: 12px 2px 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-align: center;
}

.invite-details[open] summary {
  margin-bottom: 8px;
}

.invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 11px;
  background: #f7f9f9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.invite-code strong {
  min-width: 0;
  color: var(--deep);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 1px;
}

.invite-code span {
  color: var(--muted);
  font-size: 10px;
}

.invite-qr {
  display: grid;
  justify-items: center;
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  background: #f7f9f9;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.invite-qr img {
  width: 210px;
  max-width: 76vw;
  aspect-ratio: 1;
  background: #fff;
  image-rendering: pixelated;
}

.invite-qr b {
  margin-top: 9px;
  color: var(--deep);
  font-size: 13px;
}

.invite-qr span {
  max-width: 260px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

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

.profile-row .avatar {
  width: 50px;
  height: 50px;
  font-size: 17px;
}

.profile-row h2 {
  margin: 0;
  color: var(--deep);
  font-size: 18px;
}

.profile-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.menu-list {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.menu-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid #e4eaea;
}

.menu-item:first-child {
  border-top: 0;
}

.menu-item svg {
  width: 18px;
  color: var(--teal);
}

.menu-item span {
  color: var(--muted);
  font-size: 11px;
}

.role-preview-content {
  display: grid;
  gap: 12px;
}

.role-preview-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff7f7;
  border-color: #f3c7ca;
}

.role-preview-intro > span {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  place-items: center;
}

.role-preview-intro svg {
  width: 21px;
}

.role-preview-intro h2,
.role-preview-title {
  margin: 0;
  color: var(--deep);
  font-size: 16px;
}

.role-preview-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.role-preview-roles {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.role-preview-role {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 3px 8px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-preview-role.active {
  background: #fff2f3;
  border: 2px solid var(--red);
}

.role-preview-role > span {
  display: grid;
  width: 22px;
  height: 22px;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  place-items: center;
}

.role-preview-role > span:empty {
  background: #fff;
  border: 1px solid #bbb;
}

.role-preview-role svg {
  width: 14px;
}

.role-preview-role b {
  font-size: 14px;
}

.role-preview-role small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.role-preview-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  margin-top: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.role-preview-switch:first-of-type {
  margin-top: 12px;
}

.role-preview-switch span {
  display: grid;
  gap: 3px;
}

.role-preview-switch b {
  font-size: 13px;
}

.role-preview-switch small {
  color: var(--muted);
  font-size: 10px;
}

.role-preview-switch input {
  width: 24px;
  height: 24px;
  accent-color: var(--red);
}

.role-preview-switch.disabled {
  opacity: .58;
}

.role-preview-start {
  min-height: 54px;
}

.role-preview-actions {
  display: grid;
  gap: 10px;
}

.role-preview-actions .btn {
  margin: 0;
}

.pwa-preview-login-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 12px;
  color: var(--deep);
  background: #fff2f3;
  border: 1px solid #f3c7ca;
  border-radius: 8px;
}

.pwa-preview-login-notice > svg {
  flex: 0 0 20px;
  width: 20px;
  color: var(--red);
}

.pwa-preview-login-notice span {
  display: grid;
  gap: 4px;
}

.pwa-preview-login-notice b {
  font-size: 13px;
}

.pwa-preview-login-notice small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.role-preview-footnote {
  margin: -2px 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: max(0px, calc((100vw - 480px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 480px) / 2));
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 5), 1fr);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -3px 12px rgba(23, 56, 61, .07);
}

.nav-item {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 4px 2px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
  place-items: center;
}

.bottom-nav .nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav.compact .nav-item {
  gap: 4px;
  font-size: 10px;
}

.bottom-nav.compact .nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-icon {
  position: relative;
  display: grid;
  place-items: center;
}

.nav-dot {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
}

.nav-item.active {
  color: var(--green);
  font-weight: 800;
}

.empty {
  padding: 24px 14px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.guide-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  padding-bottom: 0;
  overflow: hidden;
}

.guide-body {
  min-height: 0;
  padding: 12px 14px 8px;
  overflow-y: auto;
}

.guide-options {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.guide-options label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.guide-option-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.guide-share-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  color: var(--teal);
  background: var(--paper);
  border: 1px solid #b9cccb;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.guide-share-button:disabled {
  opacity: .55;
}

.guide-share-button svg {
  width: 15px;
  height: 15px;
}

.guide-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

@media (max-width: 390px) {
  .guide-options {
    align-items: flex-start;
  }

  .guide-option-actions {
    flex-wrap: wrap;
  }
}

.guide-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  background: #ececec;
  border-radius: 6px;
}

.guide-mode button {
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 15px;
}

.guide-mode button.active {
  color: #fff;
  background: var(--deep);
  font-weight: 700;
}

.guide-mode-status {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  color: var(--ink);
  background: #ececec;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
}

.guide-messages {
  display: grid;
  gap: 10px;
}

.guide-turn {
  display: grid;
  gap: 7px;
}

.guide-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.guide-message span {
  display: block;
  max-width: calc(100% - 42px);
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 17px;
  line-height: 1.65;
}

.guide-message.assistant span {
  color: var(--ink);
  background: var(--paper);
}

.guide-message.pending {
  align-items: center;
}

.guide-message.pending .guide-waiting {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.guide-waiting em {
  font-style: normal;
}

.guide-waiting i {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.guide-waiting b {
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  animation: guide-wait 1.1s ease-in-out infinite;
}

.guide-waiting b:nth-child(2) {
  animation-delay: .14s;
}

.guide-waiting b:nth-child(3) {
  animation-delay: .28s;
}

@keyframes guide-wait {
  0%, 70%, 100% { opacity: .28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.guide-message.user {
  justify-content: flex-end;
}

.guide-message.user span {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.guide-speak {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--teal);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.guide-speak svg {
  width: 18px;
  height: 18px;
}

.guide-media {
  display: grid;
  grid-auto-columns: minmax(78%, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  padding-right: 3px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.guide-media::-webkit-scrollbar {
  display: none;
}

.guide-media figure {
  min-width: 0;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  scroll-snap-align: start;
}

.guide-media figure > button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
}

.guide-media img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #eef2f2;
  border-radius: 5px;
}

.guide-media figcaption {
  padding: 6px 3px 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}


.guide-room-results {
  display: grid;
  gap: 7px;
}

.guide-room-results > button {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 16px;
  gap: 9px;
  min-height: 72px;
  padding: 7px;
  align-items: center;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
}

.guide-room-results img,
.guide-room-placeholder {
  display: grid;
  width: 64px;
  height: 56px;
  object-fit: cover;
  place-items: center;
  color: var(--quiet);
  background: #edf2f2;
  border-radius: 5px;
  font-size: 9px;
}

.guide-room-results b,
.guide-room-results small {
  display: block;
}

.guide-room-results b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-room-results span > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.guide-room-results strong {
  color: #b7791f;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.guide-room-results strong small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.guide-room-results svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.guide-followups {
  display: flex;
  gap: 6px;
  padding-left: 1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-followups::-webkit-scrollbar {
  display: none;
}

.guide-followups button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  color: var(--ink);
  background: #f0f0f0;
  border: 1px solid #dedede;
  border-radius: 19px;
  font-size: 14px;
}

.guide-preset-label {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.guide-presets {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-presets::-webkit-scrollbar {
  display: none;
}

.guide-presets button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 13px;
  color: var(--teal);
  background: var(--paper);
  border: 1px solid #bdcccc;
  border-radius: 20px;
  font-size: 15px;
}

.guide-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  margin-bottom: calc(76px + env(safe-area-inset-bottom));
  padding: 9px 12px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.guide-compose input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #f5f8f8;
  border: 1px solid #c8d4d5;
  border-radius: 6px;
  font-size: 16px;
  outline: 0;
}

.guide-compose button {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 6px;
  place-items: center;
}

.guide-compose button.stop {
  background: #24282c;
}

.guide-compose button svg {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 90px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 14px;
  color: #fff;
  background: rgba(20, 44, 48, .94);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 10px);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

.update-dialog {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
}

body.update-dialog-open {
  overflow: hidden;
}

.update-dialog[hidden] {
  display: none;
}

.update-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 23, .68);
  backdrop-filter: blur(3px);
}

.update-dialog-card {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d5dfde;
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(5, 24, 28, .32);
}

.update-dialog-badge {
  display: inline-flex;
  padding: 5px 9px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.update-dialog-card h2 {
  margin: 13px 0 7px;
  color: var(--deep);
  font-size: 24px;
}

.update-dialog-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.update-version-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0 14px;
  padding: 12px 14px;
  color: #63777a;
  background: #edf3f2;
  border: 1px solid #d4e0df;
  border-radius: 7px;
  font-size: 13px;
}

.update-version-row b {
  margin-left: auto;
  color: #8ca09f;
}

.update-version-row strong {
  color: var(--green);
  font-size: 17px;
}

.update-release-notes {
  margin: 0;
  padding: 0 0 0 19px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.8;
}

.update-release-notes:empty {
  display: none;
}

.update-required-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #9c371f;
  background: #fff0eb;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.6;
}

.update-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin-top: 20px;
}

.update-dialog-actions button {
  min-height: 44px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

.update-dialog-actions .secondary {
  color: var(--green);
  background: #fff;
  border: 1px solid #a9bdbc;
}

.update-dialog-actions .primary {
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
}

.update-dialog-actions .primary:disabled {
  opacity: .65;
}

.file-center-entry {
  border-color: #bdd8ce;
  background: #f1f8f5;
}

.file-upload-panel h2 {
  margin-top: 0;
}

.incoming-file {
  padding: 10px;
  border-radius: 7px;
  color: #215e4c;
  background: #e8f5ef;
}

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

.file-picker-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
  font-weight: 800;
}

.file-picker-row span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-center-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.file-center-info b,
.file-center-info small {
  display: block;
  overflow-wrap: anywhere;
}

.file-center-info small {
  margin-top: 3px;
  color: var(--muted);
}

.file-center-actions {
  display: flex;
  grid-column: 2;
  gap: 8px;
  justify-content: flex-end;
}

.file-center-actions button {
  flex: 1 1 0;
  max-width: 88px;
}

.file-center-list article button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-2);
}

.report-content {
  padding-top: 10px;
}

.report-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  margin-bottom: 10px;
  padding: 4px;
  background: #e7e7e7;
  border-radius: 8px;
}

.report-tabs button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.report-tabs button.active {
  color: var(--deep);
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .1);
}

.report-tabs button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: 5px;
  padding: 0 5px;
  color: #fff;
  background: var(--red);
  border-radius: 10px;
  font-size: 9px;
  place-items: center;
}

.report-form-panel {
  padding: 16px;
}

.report-intro {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-intro > span {
  display: grid;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--deep);
  border-radius: 8px;
  place-items: center;
}

.report-intro svg {
  width: 22px;
  height: 22px;
}

.report-intro h2,
.report-company-head h2,
.report-detail-head h2 {
  margin: 0;
  color: var(--deep);
}

.report-intro h2 {
  font-size: 17px;
}

.report-intro p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.demo-report-quota {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -3px 0 16px;
  padding: 11px 12px;
  color: #7f1720;
  background: #fff2f3;
  border: 1px solid #f2c6c9;
  border-radius: 8px;
}

.demo-report-quota > svg {
  flex: 0 0 auto;
  width: 20px;
}

.demo-report-quota b,
.demo-report-quota small {
  display: block;
}

.demo-report-quota b {
  font-size: 12px;
}

.demo-report-quota small {
  margin-top: 2px;
  color: #93636a;
  font-size: 9px;
}

.demo-report-quota.exhausted {
  color: #555;
  background: #f3f3f3;
  border-color: #ddd;
}

.demo-account-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.demo-account-card > span {
  display: grid;
  width: 36px;
  height: 36px;
  color: #fff;
  background: #252525;
  border-radius: 18px;
  place-items: center;
}

.demo-account-card svg {
  width: 19px;
}

.demo-account-card h2,
.demo-account-card p {
  margin: 0;
}

.demo-account-card h2 {
  font-size: 15px;
}

.demo-account-card p,
.demo-account-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.report-form-panel .field label em {
  color: var(--red);
  font-size: 9px;
  font-style: normal;
}

.report-area-input {
  position: relative;
}

.report-area-input input {
  padding-right: 42px;
}

.report-area-input span {
  position: absolute;
  top: 0;
  right: 12px;
  display: grid;
  height: 46px;
  color: var(--muted);
  font-size: 12px;
  place-items: center;
}

.report-preference {
  padding: 0;
  margin: 0 0 14px;
  border: 0;
}

.report-preference legend {
  margin-bottom: 7px;
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
}

.report-preference > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.report-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.report-choice span {
  display: inline-grid;
  min-height: 36px;
  padding: 0 15px;
  color: var(--muted);
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  place-items: center;
}

.report-choice input:checked + span {
  color: var(--red);
  background: var(--green-soft);
  border-color: #ee9299;
}

.report-submit,
.report-stop {
  margin-top: 4px;
}

.report-output-panel {
  overflow: hidden;
}

.report-output-panel.generating {
  border-color: #ebb0b4;
}

.report-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-progress-head b,
.report-progress-head small {
  display: block;
}

.report-progress-head b {
  color: var(--deep);
  font-size: 14px;
}

.report-progress-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.report-progress-head strong {
  color: var(--red);
  font-size: 18px;
}

.report-progress-track {
  height: 5px;
  margin: 11px 0 12px;
  overflow: hidden;
  background: #ececec;
  border-radius: 4px;
}

.report-progress-track i {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: inherit;
  transition: width .25s ease;
}

.report-stage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.report-stage-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #9a9a9a;
  font-size: 9px;
}

.report-stage-list li i {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: #d4d4d4;
  border-radius: 50%;
}

.report-stage-list li.done,
.report-stage-list li.active {
  color: var(--deep);
  font-weight: 700;
}

.report-stage-list li.done i,
.report-stage-list li.active i {
  background: var(--red);
}

.report-stage-list li.active i {
  box-shadow: 0 0 0 3px rgba(230, 0, 18, .13);
}

.report-live-status {
  display: flex;
  min-height: 40px;
  margin-bottom: 10px;
  padding: 9px 11px;
  align-items: center;
  gap: 9px;
  color: #5f5f5f;
  background: #f6f7f7;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.report-live-status > i {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  background: #7f8a8d;
  border-radius: 50%;
}

.report-live-status.active {
  color: #a0000c;
  background: #fff3f4;
}

.report-live-status.active > i {
  background: var(--red);
  animation: report-live-pulse 1.35s ease-out infinite;
}

.report-live-status.paused {
  color: #8a5a00;
  background: #fff8e7;
}

.report-live-status.paused > i { background: #d48a00; }
.report-live-status.complete > i { background: #159447; }

@keyframes report-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(230, 0, 18, .34); }
  70% { box-shadow: 0 0 0 7px rgba(230, 0, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 0, 18, 0); }
}

.report-output-wrap {
  position: relative;
}

.report-follow-latest {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  min-height: 40px;
  padding: 0 14px;
  align-items: center;
  gap: 7px;
  color: #fff;
  background: #171a1c;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .24);
  font-size: 12px;
  font-weight: 800;
}

.report-follow-latest[hidden] { display: none; }
.report-follow-latest svg { width: 15px; transform: rotate(90deg); }

.report-waiting-placeholder {
  display: grid;
  min-height: 170px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.report-waiting-placeholder > span {
  display: flex;
  height: 22px;
  align-items: center;
  gap: 5px;
}

.report-waiting-placeholder > span i {
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  animation: report-waiting-dot 1.2s ease-in-out infinite;
}

.report-waiting-placeholder > span i:nth-child(2) { animation-delay: .15s; }
.report-waiting-placeholder > span i:nth-child(3) { animation-delay: .3s; }
.report-waiting-placeholder b { margin-top: 5px; color: var(--deep); font-size: 14px; }
.report-waiting-placeholder small { margin-top: 3px; font-size: 10px; }

@keyframes report-waiting-dot {
  0%, 60%, 100% { opacity: .32; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-5px); }
}

.report-document {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #2d2d2d;
  font-size: 16px;
  line-height: 1.7;
}

.report-output-panel .report-document {
  max-height: 48vh;
  padding: 13px;
  overflow: auto;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
}

.report-document h2,
.report-document h3,
.report-document h4,
.report-document h5 {
  margin: 18px 0 7px;
  color: var(--deep);
  line-height: 1.4;
}

.report-document h2:first-child,
.report-document h3:first-child {
  margin-top: 0;
}

.report-document h2 { font-size: 22px; }
.report-document h3 { font-size: 19px; }
.report-document h4,
.report-document h5 { font-size: 17px; }

.report-document p {
  margin: 0 0 9px;
}

.report-document ul,
.report-document ol {
  margin: 0 0 10px;
  padding-left: 21px;
}

.report-document code {
  padding: 1px 4px;
  background: #eee;
  border-radius: 3px;
  font-size: 14px;
}

.report-table-wrap {
  max-width: 100%;
  margin: 10px 0;
  overflow-x: auto;
}

.report-table-wrap table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table-wrap th,
.report-table-wrap td {
  padding: 7px;
  text-align: left;
  border: 1px solid #ddd;
}

.report-table-wrap th {
  background: #f0f0f0;
}

.report-history-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.report-history-tools label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-history-tools label svg {
  width: 17px;
  color: var(--muted);
}

.report-history-tools input {
  min-width: 0;
  border: 0;
  outline: 0;
}

.report-history-tools > button,
.report-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 11px;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}

.report-history-tools > button svg,
.report-back-button svg {
  width: 15px;
}

.report-history-tools > button.active {
  color: var(--red);
  background: var(--green-soft);
  border-color: #ee9299;
}

.report-company-group {
  padding: 0 13px;
  overflow: hidden;
}

.report-company-head {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 13px 0;
}

.report-company-head > span {
  display: grid;
  width: 35px;
  height: 35px;
  color: var(--red);
  background: var(--green-soft);
  border-radius: 7px;
  place-items: center;
}

.report-company-head svg {
  width: 18px;
}

.report-company-head h2 {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.report-company-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.report-version-list > article {
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
}

.report-version-list > article.archived .report-version-main {
  opacity: .62;
}

.report-version-list > article.archived .report-version-badge::after {
  content: "已归档";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 42px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
}

.report-version-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 9px;
  width: 100%;
  align-items: center;
  padding: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
}

.report-version-main > span:nth-child(2) {
  min-width: 0;
}

.report-version-main b,
.report-version-main small {
  display: block;
  overflow-wrap: anywhere;
}

.report-version-main b {
  font-size: 12px;
}

.report-version-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.report-version-main > svg {
  width: 15px;
  color: #aaa;
}

.report-version-badge {
  position: relative;
  display: grid;
  width: 34px;
  height: 30px;
  color: #fff;
  background: var(--deep);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  place-items: center;
}

.report-version-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 9px 0 0 43px;
}

.report-version-actions button,
.report-detail-actions button,
.report-detail-head button {
  display: inline-flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 5px;
  color: #555;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
}

.report-version-actions button svg,
.report-detail-actions button svg,
.report-detail-head button svg {
  width: 13px;
}

.report-version-actions button.danger {
  color: var(--red);
}

.report-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 48px 14px;
}

.report-empty > svg {
  width: 34px;
  height: 34px;
  color: #999;
}

.report-empty b {
  color: var(--deep);
  font-size: 14px;
}

.report-empty button {
  min-height: 36px;
  margin-top: 6px;
  padding: 0 14px;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.report-back-button {
  margin-bottom: 10px;
}

.report-detail-card {
  padding: 16px;
}

.report-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 13px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.report-detail-head span,
.report-detail-head p {
  color: var(--muted);
  font-size: 9px;
}

.report-detail-head h2 {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.report-detail-head p {
  margin: 5px 0 0;
}

.report-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.report-file-actions {
  display: grid;
  gap: 6px;
}

.report-room-cards {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(76px + env(safe-area-inset-top));
}

.report-room-cards.revealing {
  animation: report-room-reveal .42s ease both;
}

@keyframes report-room-reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .report-room-cards.revealing { animation: none; }
}

.report-room-cards h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.report-room-cards > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.report-room-cards .room-list { gap: 8px; }
.report-room-cards .room-card { margin-top: 0; }

.viewing-registration-pane {
  display: grid;
  gap: 12px;
}

.viewing-paste-panel,
.viewing-review-panel {
  padding: 16px;
}

.viewing-paste-panel textarea {
  min-height: 150px;
  font-size: 13px;
  line-height: 1.55;
}

.viewing-parse-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-top: -5px;
  color: var(--muted);
  font-size: 10px;
}

.viewing-parse-status.error { color: #b42318; }

.viewing-parse-status button {
  min-height: 28px;
  padding: 0 9px;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.viewing-review-panel .section-head p,
.viewing-history .section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.viewing-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.viewing-field {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.viewing-field:first-child { border-top: 0; }

.viewing-field label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 7px 8px;
  color: #444;
  background: #f7f8f8;
  border-right: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.3;
}

.viewing-field input,
.viewing-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 7px 9px;
  background: #fff;
  border: 0;
  border-radius: 0;
  font-size: 12px;
}

.viewing-field textarea {
  min-height: 58px;
  resize: vertical;
}

.viewing-field.missing input,
.viewing-field.missing textarea {
  background: #fff9e8;
}

.viewing-field label small {
  color: #a66c00;
  font-weight: 700;
}

.viewing-form-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.viewing-form-actions.one { grid-template-columns: 1fr; }
.viewing-form-actions .btn {
  min-height: 58px;
  padding: 7px 6px;
  font-size: 14px;
  line-height: 1.35;
}

.viewing-history {
  padding-top: 4px;
}

.viewing-history > .section-head > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 9px;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
}

.viewing-record-section {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

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

.viewing-record-title h2,
.viewing-record-title p { margin: 0; }
.viewing-record-title h2 { font-size: 14px; }
.viewing-record-title p { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.viewing-record-title > span {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  color: #fff;
  text-align: center;
  background: var(--red);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  line-height: 24px;
}

.viewing-pending-list { display: grid; gap: 7px; }
.viewing-pending-item { display: grid; gap: 9px; padding: 11px; }
.viewing-pending-item b,
.viewing-pending-item small { display: block; }
.viewing-pending-item b { margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.viewing-pending-item small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.viewing-status.pending { padding: 3px 6px; color: #9a6700; background: #fff4cc; border-radius: 4px; font-size: 9px; font-weight: 800; }

.viewing-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.viewing-pending-actions .confirm,
.viewing-pending-actions .original { flex: 1 1 120px; }
.viewing-pending-actions .danger { flex: 0 0 72px; }

.viewing-pending-actions button,
.viewing-table button {
  min-height: 34px;
  padding: 0 8px;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
}

.viewing-pending-actions .confirm { color: #fff; background: var(--deep); border-color: var(--deep); }
.viewing-pending-actions .danger,
.viewing-table .danger { color: var(--red); }

.viewing-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.viewing-table {
  width: max-content;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 9px;
}

.viewing-table th,
.viewing-table td {
  max-width: 180px;
  padding: 7px 8px;
  overflow-wrap: anywhere;
  text-align: left;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.viewing-table th { color: #444; background: #f2f3f3; white-space: nowrap; }
.viewing-table tr:last-child td { border-bottom: 0; }
.viewing-table th:last-child,
.viewing-table td:last-child { border-right: 0; }
.viewing-table button { min-height: 28px; white-space: nowrap; }
.viewing-table-actions { display: flex; gap: 5px; }
.viewing-pending-actions .original,
.viewing-table .original { color: var(--deep); background: #f1f5f5; }

.viewing-raw-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(8, 18, 19, .58);
}

.viewing-raw-dialog {
  width: min(100%, 720px);
  max-height: min(78vh, 760px);
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.viewing-raw-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px 13px;
  border-bottom: 1px solid var(--line);
}

.viewing-raw-dialog-head span { color: var(--red); font-size: 10px; font-weight: 800; }
.viewing-raw-dialog-head h2 { margin: 4px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.viewing-raw-dialog-head button {
  width: 34px;
  height: 34px;
  color: #555;
  background: #f3f4f4;
  border: 0;
  border-radius: 50%;
  font-size: 23px;
  line-height: 30px;
}

.viewing-raw-dialog pre,
.viewing-raw-loading {
  max-height: calc(min(78vh, 760px) - 82px);
  margin: 0;
  padding: 17px;
  overflow: auto;
  color: #252929;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 13px;
  line-height: 1.75;
}

.viewing-raw-loading { color: var(--muted); }

@media (max-width: 460px) {
  .viewing-form-actions { gap: 5px; }
  .viewing-form-actions .btn { min-height: 56px; font-size: 13px; }
}

@media (max-width: 380px) {
  .content {
    padding: 11px;
  }

  .hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .metric {
    padding-right: 5px;
    padding-left: 5px;
  }

  .room-card {
    grid-template-columns: 76px minmax(0, 1fr) 70px 12px;
    gap: 7px;
  }

  .room-thumb,
  .room-placeholder {
    width: 76px;
    height: 62px;
  }

  .room-main b {
    font-size: 14px;
  }

  .room-price {
    font-size: 15px;
  }

  .update-dialog {
    padding: 0;
    align-items: end;
  }

  .update-dialog-card {
    width: 100%;
    max-height: calc(100vh - 30px);
    padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }

  .report-form-panel,
  .report-detail-card {
    padding: 13px;
  }

  .report-choice span {
    min-height: 34px;
    padding: 0 11px;
    font-size: 11px;
  }

  .report-version-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  body {
    padding: 18px 0;
  }

  #app {
    min-height: calc(100dvh - 36px);
    border-radius: 10px;
    overflow: hidden;
  }

  .screen,
  .login {
    min-height: calc(100dvh - 36px);
  }

  .bottom-nav {
    bottom: 18px;
  }
}
