.login-screen {
  display: grid;
  height: auto;
  min-height: 100dvh;
  place-items: center;
  overflow: auto;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: radial-gradient(ellipse at 85% 12%, #e6eee9, transparent 55%), var(--canvas);
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 32rem;
  width: min(64rem, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--paper);
  box-shadow: 0 24px 80px #1c3a2918;
  animation: account-in 230ms ease-out both;
}
@media (min-width: 60rem) and (hover: hover) and (pointer: fine) {
  .login-layout:has(.login-art) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 64rem; }
}
.login-art { position: relative; min-width: 0; min-height: 32rem; align-self: stretch; overflow: hidden; background: #50483c; }
.city-story { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 850ms ease-in-out; }
.city-story.visible { opacity: 1; z-index: 1; }
.city-story img { display: block; width: 100%; height: 100%; object-fit: cover; }
.city-story figcaption { position: absolute; inset: auto 0 0; padding: 4rem 1.75rem 1.55rem;
  color: white; background: linear-gradient(transparent, #101e20bd); }
.city-story figcaption strong { display: block; font-size: 1.65rem; line-height: 1.2; }
.city-story figcaption span { display: block; margin-top: .5rem; font-size: .9rem; }
.story-controls { display: flex; position: absolute; top: 1rem; right: 1rem; gap: .25rem; z-index: 2; }
.story-controls button { min-width: 2.35rem; min-height: 2.35rem; padding: 0; border: 1px solid #ffffff65;
  border-radius: 50%; background: #142522bb; color: white; font-size: 1.2rem; }
.story-controls button:hover { background: #163d34; }
.story-library { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(15rem,100%),1fr)); gap: 1rem; align-items: start; }
.story-library img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .65rem; }
.story-library details, .story-library p, .story-library form { margin-top: .5rem; }
@media (prefers-reduced-motion: reduce) { .city-story { transition: none; } }
.login-content { display: grid; align-content: center; justify-items: start; gap: 1.45rem; padding: clamp(1.4rem, 5vw, 4.2rem); }
.login-copy h1 { font-size: clamp(1.85rem, 4vw, 2.55rem); line-height: 1.2; }
.login-copy p { margin-block-start: 0.45rem; color: var(--muted); }
.account-form { display: grid; width: 100%; gap: 0.85rem; }
.account-form > button { justify-self: start; min-height: 2.75rem; padding-inline: 1.15rem; }
.account-form .login-submit { display: flex; justify-self: stretch; justify-content: space-between; }
.guest-entry { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.4rem; border: 1px solid var(--selection-border); border-radius: var(--control-radius); background: var(--soft); color: var(--accent-dark); font-weight: 650; text-decoration: none; }
.guest-entry:hover { background: var(--selection-hover); }
.account-field { display: grid; gap: 0.3rem; }
.account-field label { font-weight: 650; font-size: 0.9rem; }
.account-field input { width: 100%; min-height: 2.85rem; padding-inline: 0.75rem; border-color: #bfcfc5; }
.password-entry { position: relative; }
.password-entry > input { padding-inline-end: 4rem; }
.password-toggle { position: absolute; inset-inline-end: 0.22rem; inset-block: 0.2rem; min-height: 0; color: var(--accent); font-size: 0.84rem; }
.account-feedback { border-radius: 0.7rem; padding: 0.65rem 0.8rem; background: var(--soft); color: var(--accent-dark); font-size: 0.9rem; }
.account-feedback.error { background: var(--error-soft); color: var(--error); }

.rail-account { margin-block-start: auto; padding-block-start: 0.7rem; border-top: 1px solid var(--line); }
.account-link {
  width: 100%; min-height: 3.7rem; justify-content: start; gap: 0.52rem; padding: 0.4rem;
  border-radius: 0.85rem; background: var(--paper); text-align: start;
  transition: background-color var(--motion), border-color var(--motion), box-shadow var(--motion), translate var(--motion);
}
.account-link:is(:hover, :focus-visible, [aria-current]) { background: var(--soft); border-color: var(--selection-border); box-shadow: var(--lift); }
.account-link:not([aria-current]):is(:hover, :focus-visible) { translate: 0 -2px; }
.account-avatar { flex: none; object-fit: cover; border-radius: 50%; background: var(--soft); }
.account-link .account-avatar { width: 2.55rem; height: 2.55rem; }
.account-link-copy { display: grid; justify-items: start; gap: 0.18rem; min-width: 0; }
.account-link-copy strong { max-width: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 0.86rem; }
.account-chevron { flex: none; width: 0.42rem; height: 0.42rem; margin-inline: auto 0.25rem; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; rotate: 45deg; transition: translate var(--motion); }
.account-link:hover .account-chevron { translate: 2px 0; }
.edition-badge { white-space: nowrap; width: max-content; border: 1px solid transparent; border-radius: 999px; padding: 0.1rem 0.48rem; font-size: 0.73rem; font-weight: 700; line-height: 1.4; }
.edition-badge[data-edition="free"] { color: #185743; background: #dff4e9; border-color: #cde9db; }
.edition-badge[data-edition="beta"] { color: #56418a; background: #eee6ff; border-color: #e4d8fd; }
.edition-badge[data-edition="member"] { color: #593681; background: linear-gradient(112deg, #efe5ff 35%, #ffedbc); border-color: #e3cf9a; }
.edition-badge[data-edition="admin"] { color: #235484; background: #e1efff; border-color: #c7dff6; }

.workspace[data-account-view="true"] > :is(.conversation, .itinerary, .mobile-views) { display: none; }
.account-workspace {
  grid-column: 2 / -1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--desk);
  animation: account-in 175ms ease-out both;
}
.account-content { width: min(56rem, 100%); margin-inline: auto; display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 2.5rem); }
.account-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.account-heading h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
.account-heading .hint { margin-block-start: 0.25rem; }
.account-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.8rem;
  padding: clamp(0.85rem, 2vw, 1.35rem); border: 1px solid var(--line); border-radius: var(--surface-radius);
  background: linear-gradient(105deg, #f2faf4, #fff 68%); box-shadow: var(--lift);
}
.account-identity { display: grid; min-width: 0; flex: 1 1 10rem; overflow-wrap: anywhere; }
.account-identity strong { font-size: 1.18rem; }
.account-identity span { color: var(--muted); font-size: 0.87rem; }
.account-banner .account-avatar { border: 3px solid var(--paper); box-shadow: 0 1px 4px #172b2633; }
.account-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; align-items: start; }
.account-card { display: grid; gap: 0.8rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--surface-radius); background: var(--paper); }
.account-exit { display: flex; justify-content: flex-end; }
@keyframes account-in { from { opacity: 0; translate: 0 6px; } }

.admin-screen { height: auto; min-height: 100dvh; overflow: auto; background: var(--desk); }
.admin-entry { text-decoration: none; color: var(--accent-dark); }
.admin-entry:hover { border-color: var(--accent); }
.admin-entry span, .unfinished-list time { color: var(--muted); font-size: 0.86rem; }
.unfinished-list { padding-inline-start: 1.3rem; }
.unfinished-list li { padding-block: 0.25rem; }
.admin-screen summary, .account-card > summary { cursor: pointer; font-weight: 650; }
.admin-search, .admin-pages { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.admin-search input { flex: 1 1 12rem; min-width: 0; }
.admin-row { border-top: 1px solid var(--line); }
.admin-row > summary { display: flex; gap: 0.7rem; align-items: center; padding-block: 0.85rem; }
.admin-row > summary:hover { color: var(--accent); }
.admin-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: 0.9rem; }
.admin-fields > label { display: grid; gap: 0.25rem; align-content: start; }
.admin-fields input:not([type=radio]), .admin-fields select { width: 100%; min-width: 0; }
.avatar-choice { display: flex; gap: 0.75rem; border: 0; padding: 0; margin: 0; }
.avatar-choice label { display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.avatar-choice input { width: 1rem; min-height: 0; }
.avatar-choice img { border-radius: 50%; }
.admin-screen details[open] > form { margin-block: 0.8rem; }
.delete-account { color: var(--error); margin-block: 0.8rem; }

@media (width < 75rem) { .account-workspace { grid-column: 1 / -1; } }
@media (width < 47.5rem) {
  .workspace[data-account-view="true"] { grid-template-rows: minmax(0, 1fr); }
  .account-workspace { grid-row: 1; }
  .account-cards { grid-template-columns: minmax(0, 1fr); }
  .login-layout { grid-template-columns: minmax(0, 1fr); max-width: 32rem; }
  .login-content { gap: 1rem; }
  .account-field input { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .login-layout, .account-workspace { animation: none; }
  .account-link, .account-chevron { transition: none; translate: none !important; }
}
.report-page { overflow: auto; height: auto; }
.report-page main { max-width: 65rem; margin: 2rem auto; padding: 1rem; overflow-wrap: anywhere; }
.report-page pre { white-space: pre-wrap; max-height: 55vh; overflow: auto; }
