:root {
  --ink: #14231f;
  --muted: #65716d;
  --green-950: #0b2e28;
  --green-900: #123f36;
  --green-800: #185448;
  --green-100: #dfece7;
  --green-50: #eef6f2;
  --gold: #d99d3f;
  --gold-dark: #9d6c23;
  --gold-soft: #f5e5c4;
  --paper: #fffdf8;
  --canvas: #f5f1e8;
  --line: #dfddd5;
  --danger: #a63737;
  --danger-soft: #fae8e6;
  --warning: #885f16;
  --warning-soft: #fff1c9;
  --success: #18704e;
  --success-soft: #e0f2e8;
  --shadow-sm: 0 4px 18px rgb(20 35 31 / 8%);
  --shadow-lg: 0 20px 60px rgb(9 38 33 / 18%);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 90% -10%, rgb(217 157 63 / 14%), transparent 34rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

body.has-bottom-nav {
  padding-bottom: calc(76px + var(--safe-bottom));
}

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

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

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--green-800);
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  color: white;
  background: var(--green-950);
}

.skip-link:focus {
  transform: none;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: calc(68px + var(--safe-top));
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 18px 12px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  color: white;
  background: rgb(18 63 54 / 96%);
  box-shadow: 0 8px 24px rgb(9 38 33 / 12%);
  backdrop-filter: blur(16px);
}

.brand-lockup,
.header-actions,
.inline-actions,
.split-actions,
.status-row {
  display: flex;
  align-items: center;
}

.brand-lockup {
  min-width: 0;
  gap: 10px;
}

.brand-lockup img {
  width: 108px;
  height: auto;
  padding: 3px 7px;
  border-radius: 9px;
  background: #fffaf0;
}

.channel-badge {
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 38%);
  border-radius: 999px;
  color: var(--green-950);
  background: #ffd873;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  gap: 8px;
}

.account-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 50%;
  color: white;
  background: rgb(255 255 255 / 10%);
  font-size: 0.8rem;
  font-weight: 800;
}

.page-gutter,
.content-width {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding-inline: 18px;
}

.center-state {
  display: grid;
  min-height: calc(100vh - 70px);
  min-height: calc(100dvh - 70px);
  place-content: center;
  justify-items: center;
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  animation: spin 0.8s linear infinite;
  border: 3px solid var(--green-100);
  border-top-color: var(--green-800);
  border-radius: 50%;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.blocking-message {
  max-width: 720px;
  margin: 80px auto;
  padding: 24px;
  border: 1px solid #ecc4bf;
  border-radius: var(--radius);
  color: #7f2929;
  background: var(--danger-soft);
  box-shadow: var(--shadow-sm);
  white-space: pre-line;
}

.login-view {
  display: grid;
  min-height: calc(100vh - 70px);
  min-height: calc(100dvh - 70px);
  place-items: center;
  padding: 32px 18px;
}

.login-card {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid rgb(18 63 54 / 9%);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.login-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 32px;
  place-items: center;
  border-radius: 17px;
  color: var(--green-950);
  background: var(--gold);
  font-size: 2rem;
  font-weight: 300;
}

.login-card h1 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 7vw, 2.2rem);
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.form-stack,
.field {
  display: grid;
}

.form-stack {
  gap: 18px;
  margin-top: 28px;
}

.field {
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field textarea,
.field select,
.input-like {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #cfd4d1;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-weight: 500;
  outline: none;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.65;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input-like:focus {
  border-color: var(--green-800);
  box-shadow: 0 0 0 3px rgb(24 84 72 / 12%);
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 0.87rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.button-primary {
  color: white;
  background: var(--green-900);
  box-shadow: 0 7px 18px rgb(18 63 54 / 20%);
}

.button-primary:not(:disabled):hover {
  background: var(--green-800);
}

.button-secondary {
  border-color: var(--green-800);
  color: var(--green-800);
  background: transparent;
}

.button-danger {
  border-color: #e3b4b0;
  color: var(--danger);
  background: var(--danger-soft);
}

.button-quiet {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}

.button-small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.82rem;
}

.button-block {
  width: 100%;
}

.bottom-nav {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: calc(66px + var(--safe-bottom));
  justify-content: space-around;
  padding: 6px 12px var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgb(255 253 248 / 96%);
  box-shadow: 0 -10px 30px rgb(20 35 31 / 8%);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  display: grid;
  min-width: 76px;
  min-height: 54px;
  place-items: center;
  gap: 1px;
  cursor: pointer;
  border: 0;
  border-radius: 15px;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 800;
}

.bottom-nav button > span:first-child {
  font-size: 1.25rem;
}

.bottom-nav button[aria-current="page"] {
  color: var(--green-900);
  background: var(--green-50);
}

.project-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 46px;
  color: white;
  background:
    linear-gradient(115deg, rgb(8 44 38 / 97%), rgb(18 63 54 / 86%)),
    var(--green-900);
}

.project-hero::after {
  position: absolute;
  right: -70px;
  bottom: -140px;
  width: 290px;
  height: 290px;
  content: "";
  border: 1px solid rgb(217 157 63 / 34%);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgb(217 157 63 / 5%), 0 0 0 72px rgb(217 157 63 / 4%);
}

.project-hero .content-width {
  position: relative;
  z-index: 1;
}

.project-hero h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 11vw, 5.3rem);
  line-height: 1.03;
}

.project-hero .english-name {
  margin-bottom: 34px;
  color: #e7c783;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.project-secondary-logo {
  width: min(320px, 72vw);
  max-height: 82px;
  margin: 0 0 24px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgb(255 255 255 / 92%);
  object-fit: contain;
  object-position: left center;
}

.project-hero .headline {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(1.15rem, 4.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.5;
}

.project-hero .summary {
  max-width: 720px;
  color: rgb(255 255 255 / 76%);
  line-height: 1.75;
}

.location-line {
  display: flex;
  max-width: 720px;
  align-items: flex-start;
  gap: 9px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 15%);
  color: rgb(255 255 255 / 84%);
  font-size: 0.9rem;
  line-height: 1.6;
}

.public-section {
  padding-block: 48px;
}

.assistant-view {
  padding: 38px 0 96px;
}

.assistant-shell {
  display: grid;
  gap: 18px;
}

.assistant-messages {
  display: grid;
  gap: 12px;
}

.assistant-message {
  width: min(92%, 760px);
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.assistant-message-user {
  justify-self: end;
  color: white;
  background: var(--green-900);
}

.assistant-message.is-error {
  border-color: #e3b4b0;
  color: var(--danger);
  background: var(--danger-soft);
}

.assistant-message strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.assistant-message p {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-form {
  position: sticky;
  bottom: calc(72px + var(--safe-bottom));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 253 248 / 96%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.public-section + .public-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-bottom: 5px;
  font-size: clamp(1.45rem, 6vw, 2.4rem);
}

.section-heading p {
  margin-bottom: 0;
}

.facts-grid,
.listing-grid,
.feature-grid,
.gallery-grid,
.dashboard-grid,
.form-grid {
  display: grid;
  gap: 14px;
}

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

.fact-card,
.panel,
.listing-card,
.feature-card,
.release-card,
.empty-card {
  border: 1px solid rgb(18 63 54 / 9%);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.fact-card {
  min-height: 108px;
  padding: 17px;
}

.fact-card dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.fact-card dd {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.45;
}

.listing-grid,
.feature-grid,
.gallery-grid {
  grid-template-columns: minmax(0, 1fr);
}

.listing-card {
  overflow: hidden;
}

.listing-preview,
.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--green-50);
}

.listing-preview {
  aspect-ratio: 16 / 10;
}

.listing-preview img,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 24px;
  color: var(--green-800);
  text-align: center;
}

.listing-body {
  padding: 20px;
}

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

.listing-topline h3 {
  margin-bottom: 5px;
  font-size: 1.25rem;
}

.listing-number {
  color: var(--muted);
  font-size: 0.82rem;
}

.area-pill,
.status-pill,
.kind-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.area-pill {
  padding: 7px 10px;
  color: var(--green-900);
  background: var(--green-100);
  font-size: 0.82rem;
}

.listing-description {
  margin: 17px 0;
  color: #485651;
  line-height: 1.7;
  white-space: pre-line;
}

.price-block {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.price-value {
  color: var(--gold-dark);
  font-size: 1.35rem;
  font-weight: 950;
}

.price-basis {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.price-hidden {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.optional-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.optional-list li {
  padding: 6px 9px;
  border-radius: 8px;
  color: #45534e;
  background: #f2f1ed;
  font-size: 0.78rem;
}

.floorplan-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.floorplan-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green-900);
  background: #faf9f5;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.feature-card {
  padding: 22px;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card > p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-items {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.feature-item {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.feature-item strong {
  display: block;
  margin-bottom: 5px;
}

.feature-item p {
  margin: 0;
  color: #53605c;
  font-size: 0.9rem;
  line-height: 1.65;
}

.gallery-grid {
  grid-auto-flow: dense;
}

.gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.gallery-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 34px 14px 12px;
  color: white;
  background: linear-gradient(transparent, rgb(6 30 26 / 78%));
  font-size: 0.82rem;
  font-weight: 700;
}

.disclaimer {
  padding: 22px;
  border-radius: var(--radius);
  color: #6a6861;
  background: #e9e6de;
  font-size: 0.76rem;
  line-height: 1.9;
  white-space: pre-line;
}

.empty-card {
  padding: 38px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.admin-view {
  padding: 30px 0 60px;
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-heading h1 {
  margin-bottom: 5px;
  font-size: clamp(1.65rem, 7vw, 2.5rem);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  font-weight: 800;
}

.admin-tabs button[aria-current="page"] {
  border-color: var(--green-900);
  color: white;
  background: var(--green-900);
}

.admin-content {
  margin-top: 22px;
}

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

.panel {
  padding: 20px;
}

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

.panel-header h2,
.panel-header h3 {
  margin-bottom: 5px;
}

.panel-header p {
  margin-bottom: 0;
}

.status-pill {
  gap: 5px;
  padding: 5px 9px;
  font-size: 0.72rem;
}

.status-ready {
  color: var(--success);
  background: var(--success-soft);
}

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

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

.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f4ef;
  font-size: 0.86rem;
  line-height: 1.5;
}

.checklist .is-complete {
  color: var(--success);
  background: var(--success-soft);
}

.warning-list {
  margin-top: 12px;
}

.warning-list li {
  color: var(--warning);
  background: var(--warning-soft);
}

.metric {
  font-size: 2rem;
  font-weight: 950;
}

.metric-label {
  color: var(--muted);
  font-size: 0.8rem;
}

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

.admin-listing {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-listing.is-inactive {
  opacity: 0.7;
}

.admin-listing-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-listing h3 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.admin-listing-meta {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.admin-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.icon-button {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  padding: 6px 9px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green-900);
  background: #faf9f5;
  font-size: 0.8rem;
  font-weight: 800;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.switch-row,
.confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #faf9f5;
}

.switch-row input,
.confirm-row input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--green-900);
}

.switch-row span,
.confirm-row span {
  flex: 1;
  font-size: 0.86rem;
  line-height: 1.5;
}

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

.media-upload-actions {
  margin: -4px 0 18px;
}

.media-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9f5;
}

.media-thumb {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  color: var(--green-800);
  background: var(--green-50);
  font-size: 0.78rem;
  font-weight: 900;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-info {
  padding: 10px;
}

.media-name {
  overflow: hidden;
  margin: 7px 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.kind-pill {
  padding: 3px 7px;
  color: var(--green-800);
  background: var(--green-100);
  font-size: 0.66rem;
}

.publish-box {
  padding: 22px;
  border: 1px solid rgb(217 157 63 / 34%);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--paper), #fff7e8);
  box-shadow: var(--shadow-sm);
}

.publish-box h2 {
  margin-bottom: 8px;
}

.publish-box .button {
  margin-top: 16px;
}

.release-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.release-card {
  padding: 14px;
}

.release-card strong {
  display: block;
  margin-bottom: 5px;
}

.release-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sheet-dialog {
  width: min(100% - 20px, 760px);
  max-height: min(92vh, 920px);
  max-height: min(92dvh, 920px);
  margin: auto auto 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px 24px 0 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.sheet-dialog::backdrop {
  background: rgb(5 26 22 / 55%);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 253 248 / 96%);
  backdrop-filter: blur(12px);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.dialog-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #efeee9;
  font-size: 1.25rem;
}

.dialog-body {
  padding: 20px;
}

.dialog-media-section {
  margin-top: 28px;
}

.dialog-note {
  margin-top: 22px;
}

.dialog-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgb(255 253 248 / 96%);
  backdrop-filter: blur(12px);
}

.toast-region {
  position: fixed;
  z-index: 1000;
  top: calc(76px + var(--safe-top));
  right: 14px;
  left: 14px;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.toast {
  width: min(100%, 480px);
  margin-bottom: 8px;
  padding: 12px 15px;
  animation: toast-in 0.22s ease-out;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 13px;
  color: white;
  background: rgb(11 46 40 / 96%);
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  line-height: 1.5;
}

.toast.is-error {
  background: rgb(126 40 40 / 97%);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .page-gutter,
  .content-width {
    padding-inline: 28px;
  }

  .facts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listing-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .media-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sheet-dialog {
    margin: auto;
    border-radius: 24px;
  }
}

@media (min-width: 980px) {
  body.has-bottom-nav {
    padding-bottom: 0;
  }

  .app-header {
    padding-inline: max(32px, calc((100vw - 1180px) / 2));
  }

  .bottom-nav {
    position: sticky;
    z-index: 45;
    top: calc(68px + var(--safe-top));
    bottom: auto;
    min-height: 54px;
    justify-content: center;
    gap: 12px;
    padding: 6px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }

  .bottom-nav button {
    display: flex;
    min-width: auto;
    min-height: 40px;
    padding: 7px 15px;
  }

  .bottom-nav button > span:first-child {
    font-size: 1rem;
  }

  .project-hero {
    padding-block: 86px 76px;
  }

  .public-section {
    padding-block: 68px;
  }

  .facts-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel.span-two {
    grid-column: span 2;
  }

  .media-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
