:root {
  --bg: #050505;
  --bg-soft: #11100e;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --panel-solid: #15130f;
  --ink: #fff7e8;
  --muted: rgba(255, 247, 232, 0.72);
  --soft: rgba(255, 247, 232, 0.54);
  --line: rgba(231, 197, 128, 0.26);
  --gold: #d9ad5a;
  --gold-bright: #f2d28a;
  --red: #a63f2c;
  --green: #4fa17d;
  --blue: #7aa7d9;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 4%, rgba(217, 173, 90, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 16%, rgba(166, 63, 44, 0.14), transparent 28rem),
    linear-gradient(150deg, #030303 0%, #11100e 52%, #050505 100%);
  color: var(--ink);
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

[hidden] {
  display: none !important;
}

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 10px 16px;
  color: #1a1207;
  background: var(--gold-bright);
  text-align: center;
  font-weight: 900;
}

.app-frame {
  width: min(1240px, calc(100% - 24px));
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 0 96px;
  box-sizing: border-box;
}

.app-entry-screen {
  width: min(100%, 468px);
  min-height: 100vh;
  display: grid;
  align-content: stretch;
  margin: 0 auto;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
}

.app-entry-screen::before,
.app-entry-screen::after {
  content: "";
  position: fixed;
  left: 50%;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  pointer-events: none;
  transform: translateX(-50%);
  filter: blur(34px);
  opacity: 0.22;
}

.app-entry-screen::before {
  top: 7%;
  background: rgba(244, 217, 145, 0.16);
}

.app-entry-screen::after {
  bottom: 10%;
  background: rgba(166, 63, 44, 0.12);
}

.app-entry-card {
  position: relative;
  min-height: calc(100vh - 28px - env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto auto auto;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(244, 217, 145, 0.32);
  border-radius: 38px;
  background:
    linear-gradient(156deg, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(8, 7, 6, 0.88);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 64px rgba(217, 173, 90, 0.13);
  backdrop-filter: blur(20px) saturate(145%);
}

.app-entry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.13), transparent 25%, transparent 74%, rgba(255, 255, 255, 0.045)),
    linear-gradient(180deg, rgba(244, 217, 145, 0.11), transparent 42%);
  opacity: 0.82;
}

.app-entry-card::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(244, 217, 145, 0.12);
  border-radius: 29px;
  pointer-events: none;
}

.app-entry-card.is-auth-page {
  grid-template-rows: auto auto 1fr;
  align-content: start;
}

.app-entry-card.is-auth-page .app-entry-hero,
.app-entry-card.is-auth-page .signup-role-grid,
.app-entry-card.is-auth-page .app-entry-notice,
.app-entry-card.is-auth-page .app-entry-role-prompt {
  display: none;
}

.app-entry-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.app-entry-brand,
.app-entry-safe,
.app-entry-guide {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.app-entry-brand {
  gap: 9px;
  min-height: 36px;
  padding: 6px 10px 6px 7px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
}

.app-entry-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: url("assets/logo.png") center / cover no-repeat;
  box-shadow: 0 0 18px rgba(217, 173, 90, 0.34);
}

.app-entry-safe {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(244, 217, 145, 0.24);
  color: var(--gold-bright);
  background: rgba(244, 217, 145, 0.075);
}

.app-entry-auth-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 12px 0;
  padding: 12px;
  border: 1px solid rgba(244, 217, 145, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(244, 217, 145, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.24);
}

.app-entry-auth-nav button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
}

.app-entry-auth-nav span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: #1a1207;
  background: linear-gradient(135deg, #ffe9a8 0%, #edc766 58%, #b77d26 100%);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.app-entry-hero {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 22px 24px 20px;
  text-align: center;
}

.app-entry-logo-stage {
  position: relative;
  width: min(228px, 58vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.app-entry-logo-stage::before,
.app-entry-logo-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.app-entry-logo-stage::before {
  inset: -16px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  background:
    conic-gradient(from 230deg, transparent, rgba(244, 217, 145, 0.26), transparent 32%),
    radial-gradient(circle, rgba(217, 173, 90, 0.09), transparent 70%);
  animation: app-ring-spin 18s linear infinite;
}

.app-entry-logo-stage::after {
  inset: 3px;
  border: 1px solid rgba(244, 217, 145, 0.5);
  box-shadow:
    0 0 0 6px rgba(244, 217, 145, 0.045),
    0 0 0 14px rgba(244, 217, 145, 0.018),
    0 0 42px rgba(217, 173, 90, 0.26);
  background: linear-gradient(135deg, rgba(244, 217, 145, 0.28), transparent 48%);
  opacity: 0.72;
}

.app-entry-logo {
  position: relative;
  z-index: 1;
  --hero-logo-x: 0;
  width: 90%;
  height: 90%;
  padding: 2px;
  border: 1px solid rgba(242, 210, 138, 0.78);
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  object-fit: cover;
  background: #050505;
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 0 6px rgba(244, 217, 145, 0.045),
    0 0 46px rgba(217, 173, 90, 0.2);
  animation:
    app-hero-logo-float 5.8s ease-in-out infinite,
    app-hero-logo-glow 4.2s ease-in-out infinite;
}

.app-entry-eyebrow {
  margin: 0;
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 900;
}

.app-entry-guide {
  min-height: 30px;
  justify-content: center;
  margin: -2px 0 1px;
  padding: 0 14px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  color: #f0c96f;
  background: rgba(244, 217, 145, 0.07);
  box-shadow: 0 0 26px rgba(217, 173, 90, 0.08);
}

.app-entry-hero h1 {
  margin: 0;
  font-size: clamp(38px, 11.2vw, 56px);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

.app-entry-copy {
  max-width: 342px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.app-entry-trust-strip {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(244, 217, 145, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.28);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

.app-entry-trust-strip span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  color: rgba(255, 250, 234, 0.86);
  background: rgba(244, 217, 145, 0.045);
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
}

.app-entry-notice {
  position: relative;
  z-index: 1;
  margin: 0 12px 12px;
  padding: 13px 14px 13px 42px;
  border: 1px solid rgba(244, 217, 145, 0.24);
  border-radius: 18px;
  color: rgba(255, 250, 234, 0.78);
  background:
    linear-gradient(135deg, rgba(244, 217, 145, 0.095), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.26);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-entry-notice::before {
  content: "i";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 217, 145, 0.46);
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 950;
  transform: translateY(-50%);
}

.app-entry-role-prompt {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin: 0 12px 14px;
  padding: 18px 16px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  border-radius: 24px;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(244, 217, 145, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.24);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-entry-role-prompt strong {
  color: var(--gold-bright);
  font-size: 18px;
  font-weight: 950;
}

.app-entry-role-prompt p {
  max-width: 310px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.app-entry-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 18px 14px 14px;
  border: 1px solid rgba(244, 217, 145, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.32);
  box-shadow:
    0 -18px 50px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.app-entry-actions::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: rgba(244, 217, 145, 0.34);
  transform: translateX(-50%);
}

.app-entry-action {
  position: relative;
  min-height: 62px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(244, 217, 145, 0.26);
  border-radius: 20px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.055);
  font-size: 19px;
  font-weight: 950;
}

.app-entry-action.is-primary {
  border-color: rgba(242, 210, 138, 0.88);
  color: #1a1207;
  background: linear-gradient(135deg, #ffe9a8 0%, #edc766 48%, #ba7e25 100%);
  box-shadow:
    0 16px 36px rgba(217, 173, 90, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.app-entry-action::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.2) 46%, transparent 62%);
  opacity: 0;
  transform: translateX(-60%);
  animation: app-button-sheen 5.6s ease-in-out infinite;
}

.app-entry-actions p {
  grid-column: 1 / -1;
  margin: 1px 4px 0;
  color: var(--soft);
  font-size: 12.5px;
  line-height: 1.65;
  text-align: center;
}

.signup-role-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 12px 14px;
}

.app-entry-demo-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: 0 12px 14px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(244, 217, 145, 0.22);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(244, 217, 145, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.24);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-entry-demo-heading {
  display: grid;
  gap: 4px;
}

.app-entry-demo-heading p,
.app-entry-demo-heading h2,
.app-entry-demo-heading span {
  margin: 0;
}

.app-entry-demo-heading p {
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 900;
}

.app-entry-demo-heading h2 {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0;
}

.app-entry-demo-heading span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.app-entry-demo-grid {
  display: grid;
  gap: 10px;
}

.app-entry-demo-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 14px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  border-radius: 20px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-entry-demo-card span {
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
}

.app-entry-demo-card strong {
  font-size: 21px;
  font-weight: 950;
}

.app-entry-demo-card small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}

.app-entry-demo-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-entry-demo-shortcuts button {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(244, 217, 145, 0.18);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-size: 14px;
  font-weight: 900;
}

.signup-role-card,
.role-select-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 106px;
  padding: 16px;
  border: 1px solid rgba(244, 217, 145, 0.22);
  border-radius: 24px;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.045) inset;
}

.signup-role-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 217, 145, 0.2), transparent 66%);
  pointer-events: none;
}

.signup-role-card span,
.role-select-card span {
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 900;
}

.signup-role-card strong,
.role-select-card strong {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 950;
}

.signup-role-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.signup-role-card.is-active,
.app-entry-demo-card:hover,
.app-entry-demo-card:focus-visible,
.app-entry-demo-shortcuts button:hover,
.app-entry-demo-shortcuts button:focus-visible,
.role-select-card:hover,
.role-select-card:focus-visible {
  border-color: rgba(242, 210, 138, 0.86);
  color: #191107;
  background: linear-gradient(135deg, #ffe9a8 0%, #edc766 56%, #b77d26 100%);
  box-shadow: 0 16px 36px rgba(217, 173, 90, 0.22);
}

.signup-role-card.is-active span,
.signup-role-card.is-active small,
.app-entry-demo-card:hover span,
.app-entry-demo-card:hover small,
.app-entry-demo-card:focus-visible span,
.app-entry-demo-card:focus-visible small,
.role-select-card:hover span,
.role-select-card:hover small,
.role-select-card:focus-visible span,
.role-select-card:focus-visible small {
  color: rgba(25, 17, 7, 0.82);
}

.app-entry-auth-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: 0 12px 14px;
  padding: 18px 15px 16px;
  border: 1px solid rgba(244, 217, 145, 0.2);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), transparent 34%),
    linear-gradient(180deg, rgba(44, 42, 37, 0.9), rgba(19, 18, 16, 0.96));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.app-entry-card.is-auth-page .app-entry-auth-panel {
  margin-top: 12px;
}

.app-entry-form-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-weight: 900;
  font-size: 13px;
}

.app-entry-auth-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 7vw, 34px);
  letter-spacing: 0;
}

.app-entry-auth-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.app-entry-provider-row,
.app-entry-form {
  display: grid;
  gap: 10px;
}

.app-entry-provider-row .provider-button {
  min-height: 58px;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.07);
}

.provider-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

.provider-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.provider-label {
  min-width: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.provider-google {
  border-radius: 50%;
  background: #fff;
}

.provider-line {
  border-radius: 12px;
}

.app-entry-provider-row .provider-line-button .provider-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #06c755;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.app-entry-provider-row .provider-line-button .provider-mark img {
  width: 30px;
  height: 30px;
}

.app-entry-provider-row .provider-line-button .provider-label {
  color: var(--ink);
}

.provider-facebook {
  border-radius: 50%;
}

.provider-instagram {
  border-radius: 10px;
}

.caregiver-skill-grid,
.checkbox-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.checkbox-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
}

.checkbox-card input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--gold);
}

.checkbox-card:has(input:checked) {
  border-color: rgba(242, 210, 138, 0.78);
  background: rgba(242, 210, 138, 0.13);
}

.compact-list {
  gap: 9px;
}

.file-field small {
  color: var(--soft);
}

.role-select-grid {
  display: grid;
  gap: 10px;
}

.app-entry-consent {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
}

.app-entry-submit,
.app-entry-link-button {
  min-height: 52px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
}

.app-entry-submit {
  border: 1px solid rgba(242, 210, 138, 0.88);
  color: #1a1207;
  background: linear-gradient(135deg, #ffe9a8 0%, #edc766 48%, #ba7e25 100%);
  box-shadow: 0 14px 34px rgba(217, 173, 90, 0.24);
}

.app-entry-link-button {
  border: 1px solid rgba(244, 217, 145, 0.16);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.auth-check-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(239, 205, 127, 0.16), transparent 34%),
    linear-gradient(160deg, #050505 0%, #15110d 54%, #090807 100%);
}

.auth-check-card {
  width: min(420px, 100%);
  padding: 34px 24px;
  border: 1px solid rgba(244, 217, 145, 0.28);
  border-radius: 28px;
  background: rgba(16, 15, 13, 0.82);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.auth-check-card img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(244, 217, 145, 0.36);
  box-shadow: 0 0 34px rgba(217, 173, 90, 0.24);
}

.auth-check-card h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.auth-check-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.auth-check-loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.auth-check-loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: auth-dot 960ms ease-in-out infinite;
}

.auth-check-loader span:nth-child(2) {
  animation-delay: 120ms;
}

.auth-check-loader span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes auth-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

.app-header {
  position: sticky;
  top: 10px;
  z-index: 50;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(10, 10, 10, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(145%);
}

.brand-row,
.role-switch,
.toolbar,
.row-actions,
.button-row,
.status-line,
.fee-line,
.card-head,
.mini-grid,
.contact-row,
.handoff-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-row {
  justify-content: space-between;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 210, 138, 0.36);
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(242, 210, 138, 0.18),
    0 0 20px rgba(217, 173, 90, 0.18);
  transform-origin: center;
  animation:
    app-logo-breathe 4.6s ease-in-out infinite,
    app-logo-glow 3.8s ease-in-out infinite;
  will-change: transform, filter, box-shadow;
}

.brand-title {
  display: block;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.brand-subtitle,
.small-text,
.muted,
.meta,
.fee-line span,
.status-line span,
.card p,
.table-card small {
  color: var(--muted);
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.logout-button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
  white-space: nowrap;
  border-color: rgba(244, 217, 145, 0.12);
}

.role-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.role-button,
.tab-button,
.option-button,
.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.text-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.role-button,
.tab-button,
.option-button,
.secondary-button,
.icon-button,
.text-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.role-button {
  min-width: 0;
  padding: 0 8px;
  font-weight: 900;
}

.role-button.is-active,
.tab-button.is-active,
.option-button.is-selected {
  color: #1a1207;
  border-color: rgba(242, 210, 138, 0.88);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  padding: 0 16px;
  color: #1a1207;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(217, 173, 90, 0.22);
}

.danger-button {
  color: #fff8ef;
  background: linear-gradient(135deg, #d56b4e, #8f2f1e);
  box-shadow: 0 14px 36px rgba(166, 63, 44, 0.2);
}

.secondary-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.icon-button {
  width: 46px;
  padding: 0;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.icon-button:hover,
.text-button:hover,
.option-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.tab-button {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 900;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.hero-panel,
.panel,
.summary-card,
.table-card,
.price-sticky,
.mobile-nav {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(145%);
}

.hero-panel {
  overflow: hidden;
}

.hero-visual {
  display: grid;
  position: relative;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(242, 210, 138, 0.16), rgba(255, 255, 255, 0.03));
}

.hero-visual::before {
  --hero-logo-x: 0;

  content: "";
  position: absolute;
  top: -42px;
  right: -50px;
  width: 180px;
  aspect-ratio: 1;
  transform: translateX(var(--hero-logo-x)) translateY(0) scale(1);
  transform-origin: center;
  pointer-events: none;
  border: 1px solid rgba(242, 210, 138, 0.38);
  border-radius: 18px;
  background: url("assets/logo.png") center / cover no-repeat;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation:
    app-hero-logo-float 5.8s ease-in-out infinite,
    app-hero-logo-glow 4.2s ease-in-out infinite;
  will-change: transform, filter, box-shadow;
}

.hero-visual > * {
  position: relative;
  z-index: 1;
}

@keyframes app-logo-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.045);
  }
}

@keyframes app-logo-glow {
  0%,
  100% {
    filter: brightness(1);
    box-shadow:
      0 0 0 1px rgba(242, 210, 138, 0.18),
      0 0 18px rgba(217, 173, 90, 0.16);
  }

  50% {
    filter: brightness(1.12);
    box-shadow:
      0 0 0 1px rgba(242, 210, 138, 0.38),
      0 0 28px rgba(217, 173, 90, 0.32);
  }
}

@keyframes app-hero-logo-float {
  0%,
  100% {
    transform: translateX(var(--hero-logo-x, 0)) translateY(0) scale(1);
  }

  50% {
    transform: translateX(var(--hero-logo-x, 0)) translateY(-8px) scale(1.018);
  }
}

@keyframes app-hero-logo-glow {
  0%,
  100% {
    filter: brightness(1);
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }

  50% {
    filter: brightness(1.1);
    box-shadow:
      0 22px 52px rgba(0, 0, 0, 0.36),
      0 0 34px rgba(217, 173, 90, 0.2),
      0 0 0 1px rgba(242, 210, 138, 0.24) inset;
  }
}

@keyframes app-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes app-button-sheen {
  0%,
  58%,
  100% {
    opacity: 0;
    transform: translateX(-60%);
  }

  68% {
    opacity: 0.5;
    transform: translateX(72%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand img,
  .hero-visual::before,
  .app-entry-logo-stage::before,
  .app-entry-logo,
  .app-entry-action::after {
    animation: none;
    will-change: auto;
  }

  .brand img {
    transform: none;
  }

  .hero-visual::before {
    transform: translateX(var(--hero-logo-x, 0));
  }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 9vw, 52px);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 6vw, 34px);
  line-height: 1.18;
}

h3 {
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1.3;
}

p {
  line-height: 1.75;
}

.panel,
.summary-card,
.table-card {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 16px;
}

.panel-title,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.panel-title > *,
.section-title > *,
.card-head > * {
  min-width: 0;
}

.section-title {
  margin-top: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  min-height: 112px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.summary-card span {
  color: var(--muted);
  font-weight: 800;
}

.status-pill,
.role-pill,
.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.status-pill {
  color: #1a1207;
  background: var(--gold-bright);
}

.status-pill.pending,
.status-pill.screening,
.status-pill.pending_review {
  background: #f2d28a;
}

.status-pill.matching,
.status-pill.offered,
.status-pill.needs_resubmit {
  background: #f4c977;
}

.status-pill.assigned,
.status-pill.accepted,
.status-pill.in_progress,
.status-pill.verified,
.status-pill.approved {
  background: #98d6ba;
}

.status-pill.completed {
  background: #b7c9e5;
}

.status-pill.rejected,
.status-pill.suspended,
.status-pill.blacklisted,
.status-pill.incident,
.status-pill.disputed,
.status-pill.needs_rescue,
.status-pill.expired,
.status-pill.cancelled {
  color: #fff7e8;
  background: #9f3c2a;
}

.dispute-action-box,
.dispute-review-box,
.dispute-admin-card {
  border-color: rgba(213, 94, 72, 0.45);
}

.dispute-action-box textarea,
.dispute-admin-card textarea {
  min-height: 88px;
}

.role-pill,
.chip {
  color: var(--gold-bright);
  background: rgba(242, 210, 138, 0.12);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.step {
  min-height: 48px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.step.is-active {
  color: #1a1207;
  border-color: rgba(242, 210, 138, 0.88);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.form-grid {
  display: grid;
  gap: 12px;
}

.wide-field {
  grid-column: 1 / -1;
}

.field,
.check-field {
  display: grid;
  gap: 8px;
}

.field:has(input[type="date"]),
.field:has(input[type="time"]),
.field:has(input[type="datetime-local"]) {
  position: relative;
}

.field span,
.check-field span,
.field legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.important-field span,
.choice-field legend,
.check-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #1a1207;
  background: var(--gold-bright);
  font-size: 11px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

select {
  color: #fff;
  background: #2f2f2f;
}

select option {
  color: #111;
  background: #fff;
}

select option:checked {
  color: #fff;
  background: #1f6fd1;
}

.field select {
  color: #fff;
  background: #2f2f2f;
}

.field input,
.field select {
  padding: 0 12px;
}

.field input[type="date"],
.field input[type="time"],
.field input[type="datetime-local"] {
  color-scheme: dark;
  padding-right: 44px;
}

.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="time"]::-webkit-calendar-picker-indicator,
.field input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  width: 32px;
  height: 32px;
  cursor: pointer;
  opacity: 0;
  filter: none;
  background: transparent;
  box-shadow: none;
}

.field input[type="date"]:focus::-webkit-calendar-picker-indicator,
.field input[type="time"]:focus::-webkit-calendar-picker-indicator,
.field input[type="datetime-local"]:focus::-webkit-calendar-picker-indicator {
  background: transparent;
  box-shadow: none;
}

.field:has(input[type="date"])::after,
.field:has(input[type="time"])::after,
.field:has(input[type="datetime-local"])::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 24px;
  height: 24px;
  pointer-events: none;
  background: #fff;
  opacity: 0.96;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.22));
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.field:has(input[type="date"])::after,
.field:has(input[type="datetime-local"])::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2Zm13 8H4v10h16V10ZM4 8h16V6H4v2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2Zm13 8H4v10h16V10ZM4 8h16V6H4v2Z'/%3E%3C/svg%3E");
}

.field:has(input[type="time"])::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm1 3h-2v6l5 3 .95-1.76L13 11.9V7Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm1 3h-2v6l5 3 .95-1.76L13 11.9V7Z'/%3E%3C/svg%3E");
}

.password-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.password-input-wrap input {
  min-width: 0;
}

.password-toggle {
  width: auto;
  min-width: 62px;
  padding: 0 10px;
  color: #1a1207;
  background: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
}

.wide-button {
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}

.field textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(242, 210, 138, 0.86);
  box-shadow: 0 0 0 3px rgba(242, 210, 138, 0.14);
}

.field small,
.check-field small,
.radio-card small,
.helper-text {
  color: rgba(255, 247, 232, 0.72);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 247, 232, 0.42);
}

.check-grid,
.option-grid {
  display: grid;
  gap: 10px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(242, 210, 138, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.patient-status-section {
  box-shadow: inset 0 1px 0 rgba(242, 210, 138, 0.12);
}

.section-copy h3 {
  margin-bottom: 2px;
}

.choice-field {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.radio-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.radio-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.radio-card input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--gold);
}

.radio-card strong,
.radio-card small {
  display: block;
}

.radio-card:hover,
.radio-card:focus-within,
.check-card:hover,
.check-card:focus-within {
  border-color: rgba(242, 210, 138, 0.72);
  box-shadow: 0 0 0 3px rgba(242, 210, 138, 0.12);
}

.radio-card.is-selected,
.check-card:has(input:checked) {
  border-color: rgba(242, 210, 138, 0.86);
  background: rgba(242, 210, 138, 0.12);
}

.patient-alert-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recipient-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-detail-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-detail-compact-grid .field {
  gap: 6px;
}

.service-detail-compact-grid .field input {
  min-height: 44px;
  padding-right: 10px;
  padding-left: 10px;
}

.service-detail-compact-grid .wide-field {
  grid-column: auto;
}

.recipient-compact-grid .field {
  gap: 6px;
}

.recipient-compact-grid .field input,
.recipient-compact-grid .field select {
  min-height: 44px;
  padding-right: 10px;
  padding-left: 10px;
}

.option-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-button {
  display: grid;
  align-content: center;
  min-height: 74px;
  padding: 10px;
  text-align: left;
}

.option-button strong {
  display: block;
  margin-bottom: 4px;
}

.option-button span {
  color: currentColor;
  opacity: 0.78;
  font-size: 12px;
}

.check-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.check-field input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--gold);
}

.check-card {
  align-items: start;
  min-height: 72px;
  cursor: pointer;
}

.compact-section {
  gap: 10px;
  padding: 12px;
}

.compact-section .helper-text {
  margin: 0;
  line-height: 1.5;
}

.condition-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.condition-compact-grid .check-field {
  min-height: 48px;
  padding: 9px;
}

.condition-compact-grid .check-field span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.compact-notice {
  padding: 10px;
  line-height: 1.55;
}

.check-card input {
  margin-top: 2px;
}

.check-card span,
.check-card strong,
.check-card small {
  display: block;
}

.price-sticky {
  position: sticky;
  bottom: 86px;
  z-index: 20;
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  background: rgba(8, 8, 8, 0.9);
}

.request-fee-shortcut {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(242, 210, 138, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(242, 210, 138, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(11, 10, 9, 0.86);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.request-fee-shortcut strong {
  display: block;
  color: var(--gold-bright);
  font-size: 18px;
  line-height: 1.35;
}

.request-fee-shortcut span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.request-fee-shortcut .primary-button {
  width: 100%;
}

.official-fee-table-card,
.draft-fee-estimate-card {
  margin-bottom: 14px;
  border-color: rgba(242, 210, 138, 0.34);
  background:
    linear-gradient(135deg, rgba(242, 210, 138, 0.1), rgba(255, 255, 255, 0.035)),
    var(--panel);
}

.official-fee-table-card h3,
.draft-fee-estimate-card h3 {
  margin: 0;
}

.fee-table-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  list-style: none;
  background: rgba(0, 0, 0, 0.16);
}

.fee-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fee-table-row:last-child {
  border-bottom: 0;
}

.fee-table-row span {
  min-width: 0;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.45;
}

.fee-table-row b {
  color: var(--ink);
  font-size: 18px;
  white-space: nowrap;
}

.fee-table-row.is-total {
  min-height: 70px;
  border-bottom-color: rgba(242, 210, 138, 0.34);
  background: rgba(242, 210, 138, 0.1);
}

.fee-table-row.is-total span {
  color: var(--gold);
}

.fee-table-row.is-total b {
  color: var(--gold-bright);
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1;
}

.fee-table-row.is-section {
  min-height: 42px;
  background: rgba(242, 210, 138, 0.08);
}

.fee-table-row.is-section span,
.fee-table-row.is-section b {
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.profile-modal {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(242, 210, 138, 0.42);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #17120a, #080808);
  box-shadow: var(--shadow);
}

.profile-modal h2 {
  margin: 0;
}

.completion-feedback-modal {
  width: min(640px, 100%);
}

.caregiver-details-modal {
  width: min(760px, 100%);
  max-height: calc(100dvh - 28px);
}

.caregiver-details-modal .notice {
  line-height: 1.8;
}

.family-relation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.price-total span {
  color: var(--muted);
  font-weight: 900;
}

.price-total strong {
  color: var(--gold-bright);
  font-size: 30px;
  line-height: 1;
}

.reservation-consent-block,
.legal-consent-check {
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.08);
  padding: 14px;
}

.reservation-consent-block h4 {
  margin: 0 0 10px;
  color: var(--text);
}

.reservation-consent-block a,
.legal-consent-check a,
.legal-footer a {
  color: var(--gold-bright);
  font-weight: 800;
  text-decoration: none;
}

.reservation-consent-block a:focus-visible,
.legal-consent-check a:focus-visible,
.legal-footer a:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.55);
  outline-offset: 3px;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 18px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.fee-list,
.record-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fee-line {
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fee-line b {
  white-space: nowrap;
}

.table-list,
.card-list {
  display: grid;
  gap: 12px;
}

.caregiver-rules-layout {
  align-items: start;
}

.caregiver-motivation-panel {
  grid-column: 1 / -1;
}

.rules-priority-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.table-card {
  display: grid;
  gap: 12px;
}

.card-head {
  align-items: flex-start;
  justify-content: space-between;
}

.card-head > div {
  min-width: 0;
}

.meta {
  margin: 0;
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-item {
  min-height: 58px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
}

.member-order-summary-grid .detail-item {
  min-height: 52px;
}

.member-order-details {
  display: grid;
  gap: 10px;
}

.member-order-details summary {
  min-height: 46px;
  display: grid;
  place-items: center;
  list-style: none;
  border: 1px solid rgba(242, 210, 138, 0.42);
  border-radius: 16px;
  color: #211607;
  background: linear-gradient(135deg, #ffe8a3 0%, #e8c15f 56%, #b77d29 100%);
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}

.member-order-details summary::-webkit-details-marker {
  display: none;
}

.member-order-details summary::after {
  content: "＋";
  margin-left: 8px;
}

.member-order-details[open] summary::after {
  content: "－";
}

.member-order-details-body {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.button-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-row .primary-button,
.button-row .secondary-button,
.button-row .danger-button {
  flex: 1 1 140px;
}

.notice {
  padding: 12px;
  border: 1px solid rgba(242, 210, 138, 0.34);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(242, 210, 138, 0.09);
  line-height: 1.75;
}

.notice strong {
  color: var(--gold-bright);
}

.tracking-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(90, 170, 255, 0.32);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 42, 64, 0.72), rgba(20, 20, 22, 0.76));
}

.tracking-card.is-delayed {
  border-color: rgba(242, 210, 138, 0.5);
  background: linear-gradient(135deg, rgba(71, 52, 19, 0.6), rgba(20, 20, 22, 0.76));
}

.tracking-card.is-locked {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

.tracking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tracking-status {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(90, 170, 255, 0.24);
  font-size: 12px;
  font-weight: 900;
}

.tracking-map {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 78% 30%, rgba(242, 210, 138, 0.2), transparent 22%),
    rgba(8, 18, 28, 0.94);
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.tracking-route {
  position: absolute;
  left: 22%;
  right: 18%;
  top: 52%;
  height: 3px;
  transform: rotate(-16deg);
  transform-origin: center;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(90, 170, 255, 0.9), rgba(242, 210, 138, 0.9));
}

.tracking-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  transition: left 480ms ease, top 480ms ease;
}

.tracking-pin svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.caregiver-pin {
  color: #fff;
  background: #1f6fd1;
}

.destination-pin {
  right: 14%;
  top: 24%;
  color: #1d170d;
  background: var(--gold-bright);
}

.tracking-delay {
  margin: 0;
  color: var(--gold-bright);
  font-weight: 900;
}

.compact-grid {
  grid-template-columns: 1fr;
}

.admin-grid,
.caregiver-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.admin-tabs .tab-button {
  min-height: 44px;
}

.pricing-row,
.availability-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pricing-row input {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.careops-hero,
.careops-card,
.careops-status-card,
.masked-lobby-box,
.caregiver-availability-panel {
  border-color: rgba(234, 197, 113, 0.46);
}

.careops-status-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(234, 197, 113, 0.32);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(30, 28, 23, 0.92), rgba(15, 14, 12, 0.94));
}

.status-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(234, 197, 113, 0.34);
  border-radius: 999px;
  color: #fff7df;
  background: rgba(234, 197, 113, 0.12);
  font-weight: 800;
}

.availability-buttons {
  justify-content: flex-start;
}

.masked-lobby-box .detail-item strong {
  color: #fff;
}

.assignment-buckets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.assignment-bucket {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(234, 197, 113, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.assignment-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.assignment-bucket-head h3,
.assignment-bucket-head .eyebrow {
  margin: 0;
}

.assignment-bucket-list {
  gap: 12px;
}

.assignment-bucket-list .table-card {
  margin: 0;
}

.sensitive-box {
  padding: 12px;
  border: 1px solid rgba(217, 173, 90, 0.42);
  border-radius: var(--radius);
  background: rgba(217, 173, 90, 0.08);
}

.sensitive-box h4 {
  margin: 0 0 8px;
}

.post-completion-feedback {
  display: grid;
  gap: 14px;
}

.feedback-section,
.voluntary-tip-box {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.voluntary-tip-box {
  border-color: rgba(242, 210, 138, 0.34);
  background: rgba(242, 210, 138, 0.09);
}

.voluntary-tip-box strong {
  color: var(--gold-bright);
  font-size: 16px;
}

.tip-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tip-choice {
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
}

.feedback-rating-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.feedback-rating-field legend {
  margin-bottom: 4px;
  font-weight: 950;
}

.feedback-star-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.feedback-star-button {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 10px 8px;
  border: 1px solid rgba(242, 210, 138, 0.28);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.feedback-star-button span {
  color: var(--gold-bright);
  font-size: 15px;
  letter-spacing: 0;
  white-space: nowrap;
}

.feedback-star-button small {
  color: var(--muted);
  font-weight: 850;
}

.feedback-star-button.is-selected {
  border-color: rgba(242, 210, 138, 0.82);
  color: #15100a;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}

.feedback-star-button.is-selected span,
.feedback-star-button.is-selected small {
  color: #15100a;
}

.monthly-best-card {
  border-color: rgba(242, 210, 138, 0.48);
  background:
    linear-gradient(135deg, rgba(242, 210, 138, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
}

.monthly-best-card h3 {
  color: var(--gold-bright);
}

.rule-highlight-card {
  border-color: rgba(242, 210, 138, 0.48);
  background:
    linear-gradient(145deg, rgba(242, 210, 138, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.045);
}

.rule-highlight-card h3 {
  color: var(--gold-bright);
}

.audit-log {
  max-height: 360px;
  overflow: auto;
}

.audit-log li,
.record-list li {
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 88px;
  left: 14px;
  z-index: 80;
  padding: 13px 14px;
  border: 1px solid rgba(242, 210, 138, 0.36);
  border-radius: var(--radius);
  color: #1a1207;
  background: var(--gold-bright);
  box-shadow: var(--shadow);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 55;
  display: grid;
  grid-template-columns: repeat(var(--nav-items, 4), minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: rgba(10, 10, 10, 0.9);
}

.mobile-nav.is-scrollable {
  overflow-x: auto;
  grid-template-columns: repeat(var(--nav-items, 4), minmax(62px, 1fr));
  scrollbar-width: none;
}

.mobile-nav.is-scrollable::-webkit-scrollbar {
  display: none;
}

.mobile-nav button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 58px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.mobile-nav button.is-active {
  color: #1a1207;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.contact-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.contact-row a {
  flex: 1 1 150px;
}

.qr-image {
  width: 128px;
  height: 128px;
  border: 8px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  object-fit: cover;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(242, 210, 138, 0.34);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

@media (min-width: 720px) {
  .app-frame {
    width: min(1240px, calc(100% - 40px));
    padding-top: 20px;
  }

  .app-header {
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
  }

  .role-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .form-grid.two,
  .admin-grid,
  .caregiver-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .check-grid,
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-alert-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .option-grid.service-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .toast {
    right: 20px;
    left: auto;
    max-width: 420px;
  }
}

@media (min-width: 1040px) {
  .layout.member-layout {
    grid-template-columns: minmax(0, 1.1fr) 390px;
    align-items: start;
  }

  .request-fee-shortcut {
    position: sticky;
    top: 128px;
  }

  .layout.admin-layout,
  .layout.caregiver-layout {
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    align-items: start;
  }

  .price-sticky {
    top: 128px;
    bottom: auto;
  }

  .mobile-nav {
    display: grid;
  }

  .app-frame {
    padding-bottom: 112px;
  }
}

@media (max-width: 430px) {
  .app-frame {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    padding-top: 10px;
    padding-bottom: 132px;
    overflow-x: hidden;
  }

  .app-header {
    position: relative;
    top: auto;
    z-index: 10;
    width: calc(100vw - 20px);
    padding: 10px;
    max-width: calc(100vw - 20px);
    margin-bottom: 18px;
    overflow: hidden;
  }

  .brand-title {
    font-size: 15px;
  }

  .brand img {
    width: 48px;
    height: 48px;
    padding: 3px;
    border-radius: 50%;
    background: #050505;
    object-fit: contain;
  }

  .brand-subtitle {
    display: none;
  }

  .role-switch {
    width: calc(100vw - 42px);
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .role-button {
    min-height: 42px;
    padding: 0 2px;
    font-size: 12px;
  }

  .hero-panel {
    margin-top: 0;
    margin-bottom: 20px;
  }

  .tabs {
    margin: 18px 0 20px;
    scroll-margin-top: 156px;
  }

  .tab-button {
    min-height: 82px;
    align-content: center;
  }

  .layout {
    gap: 18px;
    padding-bottom: 18px;
  }

  .price-sticky {
    position: static;
    z-index: 1;
    margin: 18px 0 22px;
  }

  .mobile-nav {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 70;
  }

  h1 {
    max-width: calc(100vw - 64px);
    font-size: 32px;
    overflow-wrap: anywhere;
  }

  .hero-panel {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    overflow: hidden;
  }

  .hero-visual > div:first-child {
    max-width: calc(100vw - 64px);
  }

  .step {
    min-height: 44px;
    font-size: 11px;
  }

  .detail-grid,
  .option-grid.two,
  .rules-priority-grid,
  .radio-card-grid,
  .patient-alert-grid,
  .signup-role-grid,
  .caregiver-skill-grid,
  .checkbox-card-grid {
    grid-template-columns: 1fr;
  }

  .recipient-compact-grid,
  .service-detail-compact-grid,
  .compact-option-grid,
  .option-grid.two.compact-option-grid,
  .condition-compact-grid,
  .patient-status-section .radio-card-grid,
  .patient-status-section .patient-alert-grid,
  .draft-fee-estimate-card .compact-estimate-grid,
  .price-sticky .compact-estimate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-detail-compact-grid .wide-field {
    grid-column: auto;
  }

  .service-detail-compact-grid .field span {
    font-size: 12px;
    line-height: 1.25;
  }

  .service-detail-compact-grid .field input {
    min-height: 46px;
    font-size: 17px;
  }

  .service-detail-compact-grid .urgent-boost-section,
  .service-detail-compact-grid > .check-field {
    grid-column: 1 / -1;
  }

  .compact-option-grid .option-button {
    min-height: 58px;
    padding: 9px;
  }

  .compact-option-grid .option-button strong {
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.25;
  }

  .compact-option-grid .option-button span {
    font-size: 11px;
    line-height: 1.25;
  }

  .condition-compact-grid .check-field {
    min-height: 48px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .condition-compact-grid .check-field input {
    width: 18px;
    height: 18px;
  }

  .patient-status-section .radio-card,
  .patient-status-section .check-card {
    min-height: 72px;
    padding: 10px;
    gap: 7px;
  }

  .patient-status-section .radio-card strong,
  .patient-status-section .check-card strong {
    font-size: 14px;
    line-height: 1.28;
  }

  .patient-status-section .radio-card small,
  .patient-status-section .check-card small {
    display: none;
  }

  .patient-status-section .radio-card input {
    width: 18px;
    height: 18px;
  }

  .draft-fee-estimate-card .compact-estimate-grid .detail-item,
  .price-sticky .compact-estimate-grid .detail-item {
    min-height: 78px;
    padding: 10px;
  }

  .draft-fee-estimate-card .compact-estimate-grid .detail-item strong,
  .price-sticky .compact-estimate-grid .detail-item strong {
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .tip-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feedback-star-grid {
    grid-template-columns: 1fr;
  }

  .feedback-star-button {
    min-height: 64px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    text-align: left;
  }

  .form-section {
    padding: 12px;
  }

  .radio-card,
  .check-card {
    min-height: 64px;
  }

  .price-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .price-total strong {
    font-size: 28px;
  }

  .fee-table-row {
    min-height: 50px;
    padding: 11px 12px;
  }

  .fee-table-row span {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .fee-table-row b {
    font-size: 16px;
  }

  .fee-table-row.is-total b {
    font-size: 30px;
  }
}

@media (max-width: 760px) {
  .app-frame {
    padding-bottom: 104px;
  }

  .assignment-buckets {
    grid-template-columns: 1fr;
  }

  .assignment-bucket {
    padding: 10px;
    border-radius: 16px;
  }

  .app-header {
    position: relative;
    top: auto;
    z-index: 10;
    margin-bottom: 12px;
    padding: 10px;
  }

  .hero-panel {
    margin-top: 0;
    margin-bottom: 12px;
  }

  .tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(96px, 1fr);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    margin: 10px 0 12px;
    padding-bottom: 2px;
    scroll-margin-top: 156px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(94px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 10px;
    scrollbar-width: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-button {
    min-height: 44px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .price-sticky {
    position: static;
    bottom: auto;
    z-index: 1;
    margin: 12px 0 16px;
  }

  .mobile-nav {
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 70;
    gap: 5px;
    padding: 6px;
    border-radius: 18px;
  }

  .mobile-nav button {
    min-height: 50px;
    border-radius: 14px;
    font-size: 11px;
  }

  .mobile-nav svg {
    width: 18px;
    height: 18px;
  }

  .panel,
  .summary-card,
  .table-card {
    padding: 13px;
  }

  .panel-title,
  .section-title {
    margin-bottom: 10px;
  }

  .table-list,
  .card-list,
  .layout {
    gap: 10px;
  }

  .summary-card {
    min-height: 86px;
  }

  .summary-card strong {
    font-size: 22px;
  }

  .detail-item {
    min-height: 50px;
    padding: 9px;
  }

  .notice {
    padding: 10px;
    line-height: 1.6;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

  p {
    line-height: 1.62;
  }

  .hero-visual {
    padding-top: clamp(216px, 58vw, 252px);
    background: linear-gradient(145deg, rgba(242, 210, 138, 0.16), rgba(255, 255, 255, 0.03));
  }

  .hero-visual::before {
    --hero-logo-x: -50%;

    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    width: min(208px, 54vw);
    aspect-ratio: 1;
    right: auto;
    transform: translateX(var(--hero-logo-x)) translateY(0) scale(1);
    border: 1px solid rgba(242, 210, 138, 0.38);
    border-radius: 18px;
    background: url("assets/logo.png") center / cover no-repeat;
    box-shadow:
      0 18px 44px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  }

  .hero-visual > * {
    position: relative;
    z-index: 1;
  }
}

.admin-sop-panel {
  margin-bottom: 18px;
}

.sop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sop-card {
  border: 1px solid rgba(232, 195, 111, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.sop-card h3 {
  margin: 0 0 10px;
  color: var(--gold-bright);
}

.sop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.sop-row:first-of-type {
  border-top: 0;
}

.sop-row strong {
  color: var(--text);
}

.intake-choice-layout,
.ai-chat-layout {
  align-items: start;
}

.intake-choice-panel {
  min-height: 420px;
}

.intake-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.intake-entry-card {
  position: relative;
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(244, 217, 145, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.intake-entry-card.is-ai {
  border-color: rgba(242, 210, 138, 0.42);
  background:
    linear-gradient(150deg, rgba(242, 210, 138, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.24);
}

.intake-entry-card h3,
.ai-summary-panel h3,
.ai-side-panel h3 {
  margin: 0;
  font-size: 28px;
}

.intake-entry-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.quick-condition-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.quick-condition-panel h3 {
  margin: 0;
  font-size: clamp(24px, 7vw, 34px);
}

.quick-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-condition-card {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.045);
}

.quick-condition-card input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--gold);
}

.quick-condition-card strong,
.quick-condition-card small {
  display: block;
}

.quick-condition-card strong {
  font-size: 14px;
  line-height: 1.3;
}

.quick-condition-card small {
  margin-top: 3px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.quick-condition-card.is-selected {
  border-color: rgba(242, 210, 138, 0.76);
  background: rgba(242, 210, 138, 0.12);
}

.entry-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 217, 145, 0.2);
  border-radius: 50%;
  color: var(--gold-bright);
  font-weight: 950;
  background: rgba(0, 0, 0, 0.28);
}

.ai-prefill-banner {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(122, 167, 217, 0.35);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(122, 167, 217, 0.12);
}

.ai-prefill-banner strong {
  color: #dbeaff;
}

.inline-back-button {
  margin-bottom: 12px;
}

.ai-chat-panel {
  display: grid;
  gap: 14px;
}

.ai-chat-shell {
  display: grid;
  gap: 12px;
  max-height: 460px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(244, 217, 145, 0.16);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
}

.ai-message {
  max-width: min(86%, 620px);
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 217, 145, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.ai-message span {
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 950;
}

.ai-message p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.ai-message.is-family {
  justify-self: end;
  background: rgba(242, 210, 138, 0.14);
}

.ai-message.is-system {
  max-width: 100%;
  background: rgba(122, 167, 217, 0.12);
}

.ai-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-chip {
  min-width: 136px;
  min-height: 48px;
}

.ai-free-text-field {
  margin-top: 4px;
}

.ai-summary-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(244, 217, 145, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(242, 210, 138, 0.1), transparent),
    rgba(255, 255, 255, 0.045);
}

.ai-staff-summary {
  white-space: pre-wrap;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(244, 217, 145, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.24);
  font-family: inherit;
  line-height: 1.7;
}

.warning-notice {
  border-color: rgba(217, 173, 90, 0.38);
  background: rgba(217, 173, 90, 0.12);
}

.admin-ai-panel {
  margin: 18px 0;
}

.compact-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 920px) {
  .compact-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .intake-entry-grid,
  .compact-summary-grid {
    grid-template-columns: 1fr;
  }

  .intake-entry-card {
    min-height: 220px;
  }

  .ai-message {
    max-width: 96%;
  }

  .sop-grid {
    grid-template-columns: 1fr;
  }
}
