:root {
  --town-canvas-width: 941px;
  --town-ink: #4a3824;
  --town-muted: #78654b;
  --town-paper: #f3dfb4;
  --town-paper-light: #fff2cf;
  --town-line: #8b6738;
  --town-brass: #765326;
  --town-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --town-sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

html.nassfurt-town-ui {
  min-height: 100%;
  background: #102d3b;
  color-scheme: light;
}

html.nassfurt-town-ui,
html.nassfurt-town-ui body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html.nassfurt-town-ui body {
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(5, 17, 24, .72), transparent 20%, transparent 80%, rgba(5, 17, 24, .72)),
    #143747;
  color: var(--town-ink);
  font-family: var(--town-serif);
}

html.nassfurt-town-ui button,
html.nassfurt-town-ui input,
html.nassfurt-town-ui textarea,
html.nassfurt-town-ui select {
  font: inherit;
}

.town-map,
.town-map * {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html.nassfurt-town-ui .top-title,
html.nassfurt-town-ui .ticker,
html.nassfurt-town-ui .nav-bar,
html.nassfurt-town-ui .sidebar,
html.nassfurt-town-ui .content-head,
html.nassfurt-town-ui .footer,
html.nassfurt-town-ui .side-head,
html.nassfurt-town-ui .local-point-header,
html.nassfurt-town-ui .floating-card-folder,
html.nassfurt-town-ui .resident-launcher {
  display: none !important;
}

html.nassfurt-town-ui .site-shell {
  width: min(100%, var(--town-canvas-width));
  min-height: 100svh;
  margin: 0 auto;
  border: 0;
  background: var(--town-paper);
  box-shadow: 0 0 42px rgba(2, 14, 21, .58);
}

html.nassfurt-town-ui .page-grid,
html.nassfurt-town-ui .content {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Home: district 1 is the persistent stage; the welcome cast is a removable foreground. */

html.town-arcade-return-pending,
html.town-arcade-return-pending body {
  background: #0b202b !important;
}

html.town-arcade-return-pending body {
  opacity: 0 !important;
  pointer-events: none !important;
}

html.town-arcade-return-pending body > * {
  visibility: hidden !important;
}

html.nassfurt-town-ui
  .town-scene.town-arcade-open:not(:has(> [data-town-arcade-layer].is-open:not([hidden])))
  > * {
  visibility: hidden !important;
}

.town-route-home .site-shell,
.town-route-home .town-fixed-ui {
  display: none !important;
}

.town-route-home,
.town-route-home body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.town-route-home body {
  display: grid;
  place-items: center;
  background: #0b202b !important;
}

.town-home {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: min(100vw, 56.28dvh, var(--town-canvas-width));
  height: auto;
  min-height: 0;
  max-height: 100dvh;
  aspect-ratio: 941 / 1672;
  margin: 0;
  overflow: hidden;
  background: #102d3b;
  box-shadow: 0 0 42px rgba(2, 14, 21, .58);
}

.town-home-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--town-home-background) center / 100% 100% no-repeat;
  transform: translateZ(0);
}

.town-home-characters {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.town-home-character-layer {
  position: absolute;
  inset: 0;
  transition:
    transform 520ms cubic-bezier(.55, 0, .2, 1),
    opacity 260ms ease-out 170ms;
  will-change: transform, opacity;
}

.town-home-character-layer--eric {
  /*
   * The shared illustration is not visually divided at its exact midpoint:
   * Eric's pocket hand reaches beyond 50%.  Split inside the transparent gap
   * between the two figures so no part of Eric leaves with Alexia.
   */
  clip-path: inset(0 46% 0 0);
}

.town-home-character-layer--alexia {
  clip-path: inset(0 0 0 54%);
}

.town-home-character-master {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  user-select: none;
  filter: drop-shadow(0 1.2cqw 1.8cqw rgba(19, 27, 29, .3));
}

.town-home.is-entering .town-home-character-layer--eric {
  opacity: 0;
  transform: translateX(-62%);
}

.town-home.is-entering .town-home-character-layer--alexia {
  opacity: 0;
  transform: translateX(62%);
}

.town-route-map .town-home[data-town-stage-overlay="1"] {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  transform: translate(-50%, -50%);
}

.town-home-title,
.town-enter,
.town-home-counter-slot {
  transition:
    opacity 210ms ease-out,
    transform 260ms ease-out;
}

.town-home.is-entering .town-home-title,
.town-home.is-entering .town-enter,
.town-home.is-entering .town-home-counter-slot {
  opacity: 0;
  pointer-events: none;
}

.town-home.is-entering .town-home-title {
  transform: translate(-50%, -2.2cqw);
}

.town-home.is-entering .town-enter {
  transform: translateY(2.2cqw);
}

.town-enter img {
  width: 100%;
  object-fit: contain;
}

.town-home-title {
  position: absolute;
  top: 3.2%;
  left: 50%;
  z-index: 5;
  width: 78%;
  color: #314d62;
  text-align: center;
  text-shadow: 0 1px rgba(255, 255, 255, .72);
  transform: translateX(-50%);
}

.town-home-title > span {
  display: block;
  color: #6e7768;
  font-size: clamp(15px, 3.5cqw, 34px);
  line-height: 1;
  margin-bottom: .9cqw;
  transform: translateY(-1.2cqw);
}

.town-home-title h1 {
  margin: .6% 0 0;
  font: 500 clamp(38px, 9.5cqw, 88px)/1 var(--town-serif);
  letter-spacing: .17em;
}

.town-home-title h1::after {
  content: "";
  display: block;
  width: 74%;
  height: 1px;
  margin: 2.2% auto 1.5%;
  background: linear-gradient(90deg, transparent, #718696 18%, #718696 82%, transparent);
}

.town-home-title p {
  display: grid;
  gap: .32em;
  margin: 0;
  font: 500 clamp(10px, 2.35cqw, 22px)/1.08 var(--town-serif);
}

.town-enter {
  position: absolute;
  top: 76.2%;
  left: 14%;
  z-index: 6;
  display: grid;
  place-content: center;
  width: 72%;
  height: 12.8%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #57432d;
  text-align: center;
  cursor: pointer;
}

.town-enter > img {
  position: absolute;
  inset: 0;
  display: block;
  height: 100%;
  filter: drop-shadow(0 .75cqw 1cqw rgba(50, 35, 20, .32));
  pointer-events: none;
}

.town-enter-copy {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-top: 1.7%;
}

.town-enter strong {
  font: 600 clamp(19px, 4.6cqw, 42px)/1.08 var(--town-serif);
  letter-spacing: .12em;
}

.town-enter span {
  margin-top: 3.6%;
  font: 600 clamp(9px, 2.3cqw, 21px)/1 var(--town-serif);
}

.town-enter:focus-visible {
  outline: 3px solid rgba(255, 248, 216, .95);
  outline-offset: -14px;
  border-radius: 44%;
}

.town-home-counter-slot {
  position: absolute;
  right: 10%;
  bottom: 1.8%;
  left: 10%;
  z-index: 7;
  display: grid;
  gap: .42cqw;
  place-items: center;
  min-height: 2.6%;
  pointer-events: none;
}

html.nassfurt-town-ui .town-home-counter-source {
  display: none !important;
}

html.nassfurt-town-ui .town-home-visitor-count {
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 241, 200, .98);
  font: 900 clamp(14px, 2.85cqw, 27px)/1 var(--town-serif);
  letter-spacing: .12em;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(35, 24, 16, .96),
    0 0 .48cqw rgba(22, 15, 10, .82);
  box-shadow: none;
  outline: 0 !important;
}

.town-home-founded {
  color: rgba(255, 239, 197, .96);
  font: 900 clamp(14px, 2.85cqw, 27px)/1 var(--town-serif);
  letter-spacing: .1em;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(35, 24, 16, .96),
    0 0 .42cqw rgba(22, 15, 10, .78);
  white-space: nowrap;
}

.town-home > .town-home-counter-popup {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 12%;
  background: rgba(13, 31, 38, .56);
  backdrop-filter: blur(3px) saturate(.78);
  animation: counter-popup-in 220ms ease-out;
}

.town-home > .town-home-counter-popup .counter-popup-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2.2cqw;
  box-sizing: border-box;
  width: 100%;
  padding: 7cqw 7cqw 6cqw;
  border: max(2px, .55cqw) solid #7a582d;
  border-radius: 3.2cqw;
  outline: 0;
  background:
    radial-gradient(circle at 14% 16%, rgba(155, 119, 68, .08), transparent 18%),
    linear-gradient(rgba(255, 244, 208, .97), rgba(239, 213, 160, .98)),
    #f1d9a5;
  color: var(--town-ink);
  text-align: center;
  box-shadow:
    inset 0 0 0 .5cqw rgba(243, 215, 160, .9),
    0 0 0 1cqw rgba(84, 56, 25, .28),
    0 8cqw 18cqw rgba(5, 14, 18, .52);
}

.town-home > .town-home-counter-popup .counter-popup-kicker {
  justify-self: center;
  padding: 1cqw 2cqw;
  border: max(1px, .2cqw) solid rgba(104, 74, 39, .72);
  border-radius: 99px;
  background: rgba(255, 246, 216, .72);
  color: #6d5435;
  font: 700 clamp(7px, 1.7cqw, 16px)/1 var(--town-serif);
  letter-spacing: .16em;
}

.town-home > .town-home-counter-popup .counter-popup-card strong {
  font: 700 clamp(15px, 4.2cqw, 39px)/1.42 var(--town-serif);
}

.town-home > .town-home-counter-popup .counter-popup-label {
  justify-self: center;
  padding: 1.5cqw 3.3cqw;
  border: max(1px, .28cqw) solid #8b6738;
  border-radius: 99px;
  background: rgba(255, 239, 190, .9);
  color: #5a4025;
  font: 700 clamp(13px, 3.5cqw, 32px)/1 var(--town-serif);
  box-shadow: inset 0 0 0 max(1px, .2cqw) rgba(255, 250, 226, .9);
}

.town-home > .town-home-counter-popup .counter-popup-close {
  top: 2.7cqw;
  right: 2.7cqw;
  display: grid;
  place-items: center;
  width: 7cqw;
  height: 7cqw;
  padding: 0;
  border: max(1px, .25cqw) solid #765326;
  border-radius: 1.8cqw;
  background: #f0ddb0;
  color: #594128;
  font: 700 clamp(15px, 3.8cqw, 34px)/1 var(--town-serif);
  box-shadow: 0 .8cqw 1.6cqw rgba(45, 29, 13, .2);
}

/* The district scene is one 941 × 1672 composition. */

.town-route-map,
.town-route-map body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.town-route-map body {
  display: grid;
  place-items: center;
  background: #0b202b !important;
}

.town-route-map .site-shell,
.town-route-map .page-grid,
.town-route-map .content,
.town-route-map .content-inner,
.town-route-map .panel,
.town-route-map .panel-body {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

.town-route-map .content-inner > .panel:first-of-type {
  margin: 0 !important;
}

html.nassfurt-town-ui.town-route-map .site-shell {
  position: relative;
  width: min(100vw, 56.28dvh, 941px);
  height: auto;
  min-height: 0;
  max-height: 100dvh;
  aspect-ratio: 941 / 1672;
  overflow: hidden;
  background: transparent !important;
}

html.nassfurt-town-ui.town-route-map .page-grid,
html.nassfurt-town-ui.town-route-map .content,
html.nassfurt-town-ui.town-route-map .content-inner,
html.nassfurt-town-ui.town-route-map .content-inner > .panel:first-of-type,
html.nassfurt-town-ui.town-route-map .content-inner > .panel:first-of-type > .panel-body {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

html.nassfurt-town-ui.town-route-map .content-inner > .panel:first-of-type > .panel-body.tight {
  padding: 0 !important;
}

.town-route-map .content-inner > .page-title,
.town-route-map .content-inner > .panel:not(:first-of-type),
.town-route-map .content-inner > .new-thread-panel,
.town-route-map .panel:first-of-type > .panel-title,
.town-route-map .town-toolbar,
.town-route-map .town-deferred-control {
  display: none !important;
}

.town-route-map .town-map.town-scene {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  touch-action: pan-y pinch-zoom;
  overscroll-behavior-x: contain;
  width: 100%;
  height: 100% !important;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #e7d7ae;
  box-shadow: none;
}

.town-route-map .town-map.town-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--town-scene-background) center / 100% 100% no-repeat;
  pointer-events: none;
}

.town-scene > picture.responsive-scene-image {
  display: none !important;
}

.town-hall-entrance {
  position: absolute;
  inset: 0;
  z-index: 62;
  pointer-events: none;
}

.town-hall-building-hit,
.town-hall-sign,
.town-arcade-building-hit,
.town-arcade-sign,
.town-casino-building-hit,
.town-casino-sign {
  position: absolute;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.town-hall-building-hit {
  top: 10.2%;
  left: 36.2%;
  width: 27.8%;
  height: 24.6%;
}

.town-hall-sign {
  top: 18.2%;
  left: 36.5%;
  width: 27%;
  aspect-ratio: 1983 / 793;
  filter: drop-shadow(0 .45cqw .55cqw rgba(47, 31, 17, .36));
}

.town-hall-sign img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.town-hall-building-hit:focus-visible,
.town-hall-sign:focus-visible,
.town-arcade-sign:focus-visible,
.town-casino-building-hit:focus-visible,
.town-casino-sign:focus-visible {
  outline: clamp(2px, .42cqw, 4px) solid rgba(255, 244, 194, .96);
  outline-offset: clamp(2px, .5cqw, 5px);
}

.town-arcade-building-hit:focus,
.town-arcade-building-hit:focus-visible {
  outline: 0;
}

.town-casino-entrance {
  --casino-entry-rgb: 255, 229, 124;
  position: absolute;
  inset: 0;
  z-index: 62;
  pointer-events: none;
}

.town-casino-entrance.is-online {
  --casino-entry-rgb: 102, 242, 142;
}

.town-casino-entrance.is-crowded {
  --casino-entry-rgb: 255, 102, 94;
}

.town-casino-entry-effect {
  position: absolute;
  left: 54.6%;
  top: 5.5%;
  width: 31.5%;
  height: 43.5%;
  border-radius: 18% 14% 20% 18%;
  transform: skewX(-6deg);
  pointer-events: none;
}

.town-casino-entry-effect::before {
  content: "";
  position: absolute;
  left: 14%;
  top: 9%;
  width: 64%;
  height: 42%;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(var(--casino-entry-rgb), .28) 0 18%, rgba(var(--casino-entry-rgb), 0) 66%);
  opacity: .48;
  filter: blur(1px);
  animation: townCasinoEntryGlow 2.8s ease-in-out infinite;
}

.town-casino-entry-ring {
  position: absolute;
  left: 57%;
  top: 67%;
  width: 16%;
  aspect-ratio: 1;
  border: max(2px, .34cqw) solid rgba(var(--casino-entry-rgb), .72);
  border-radius: 999px;
  box-shadow:
    0 0 1.4cqw rgba(var(--casino-entry-rgb), .58),
    inset 0 0 .8cqw rgba(255, 255, 210, .5);
  animation: townCasinoEntryPulse 1.9s ease-in-out infinite;
}

.town-casino-entrance.is-crowded .town-casino-entry-ring {
  border-width: max(2px, .38cqw);
  border-color: rgba(255, 226, 222, .82);
  background: radial-gradient(circle, rgba(255, 250, 244, .13) 0 20%, rgba(255, 28, 42, .16) 48%, rgba(255, 0, 24, 0) 72%);
  box-shadow:
    0 0 .28cqw rgba(255, 255, 255, .48),
    0 0 1.1cqw rgba(255, 42, 52, .78),
    0 0 2.2cqw rgba(255, 0, 26, .48),
    inset 0 0 .48cqw rgba(255, 246, 236, .32);
  animation: townCasinoEntryCrowdedPulse 1.65s ease-in-out infinite;
}

@keyframes townCasinoEntryGlow {
  0%, 100% { opacity: .32; transform: scale(.96); }
  50% { opacity: .72; transform: scale(1.04); }
}

@keyframes townCasinoEntryPulse {
  0%, 100% { opacity: .58; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.16); }
}

@keyframes townCasinoEntryCrowdedPulse {
  0%, 100% { opacity: .68; transform: scale(.94); }
  50% { opacity: .94; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .town-casino-entry-effect::before,
  .town-casino-entry-ring {
    animation: none;
  }
}

.town-scene:not([data-town-district="5"]) > .town-casino-entrance {
  display: none !important;
}

.town-casino-building-hit {
  top: 17.4%;
  left: 54.8%;
  width: 34.8%;
  height: 25.6%;
}

.town-casino-sign {
  top: 20.2%;
  left: 58.8%;
  width: 27%;
  aspect-ratio: 1983 / 793;
  filter:
    drop-shadow(0 .45cqw .55cqw rgba(47, 31, 17, .36))
    drop-shadow(0 0 1.1cqw rgba(255, 221, 136, .34));
}

.town-casino-sign img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.town-arcade-entrance {
  position: absolute;
  inset: 0;
  z-index: 62;
  pointer-events: none;
}

.town-arcade-building-hit {
  top: 17.2%;
  left: 68.5%;
  width: 29%;
  height: 25.5%;
}

.town-arcade-sign {
  top: 20.2%;
  left: 69.5%;
  width: 27%;
  aspect-ratio: 1983 / 793;
  filter:
    drop-shadow(0 .45cqw .55cqw rgba(47, 31, 17, .36))
    drop-shadow(0 0 1.1cqw rgba(112, 190, 216, .22));
}

.town-arcade-sign img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.town-hall-mode {
  position: absolute;
  inset: 0;
  z-index: 65;
  display: block;
  overflow: hidden;
  background: #cbb993;
  pointer-events: auto;
}

.town-hall-mode[hidden] {
  display: none !important;
}

.town-hall-transition {
  position: absolute;
  inset: 0;
  z-index: 10120;
  display: block;
  opacity: 0;
  background: #000;
  pointer-events: none;
  transition: opacity 360ms cubic-bezier(.36, 0, .18, 1);
  will-change: opacity;
}

.town-hall-transition[hidden] {
  display: none !important;
}

.town-hall-transition.is-black {
  opacity: 1;
  transition-duration: 280ms;
}

.town-hall-transitioning > .town-hall-transition {
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .town-hall-transition {
    transition-duration: 130ms;
  }

  .town-hall-transition.is-black {
    transition-duration: 110ms;
  }
}

.town-hall-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.town-hall-service-ui {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.town-hall-dialogue {
  position: absolute;
  top: 24.6%;
  left: 8.5%;
  display: grid;
  box-sizing: border-box;
  width: 83%;
  height: 12.8%;
  place-content: center;
  gap: 1.1cqw;
  padding: 4.3% 11% 1.8%;
  background: url("/__resident-lab/assets/town/ui/notification-sign.webp") center / 100% 100% no-repeat;
  color: #49351f;
  text-align: center;
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: normal;
  filter: drop-shadow(0 .65cqw .75cqw rgba(42, 28, 14, .28));
  pointer-events: auto;
}

.town-hall-dialogue strong {
  display: block;
  font: 700 clamp(8px, 1.55cqw, 15px)/1 var(--town-serif);
  letter-spacing: .13em;
}

.town-hall-dialogue p {
  max-width: 100%;
  margin: 0;
  font: 700 clamp(10px, 2.05cqw, 19px)/1.38 var(--town-serif);
}

.town-hall-dialogue p > span {
  display: block;
}

.town-hall-menu {
  position: absolute;
  top: 69.4%;
  left: 13.5%;
  display: grid;
  box-sizing: border-box;
  width: 73%;
  height: 27.2%;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: .82cqw;
  padding: 2.2% 3%;
  border: .38cqw solid #745329;
  border-radius: 1.8cqw;
  background:
    linear-gradient(rgba(255, 246, 213, .94), rgba(231, 203, 148, .96)),
    #ecd29a;
  box-shadow:
    inset 0 0 0 .28cqw rgba(255, 252, 229, .72),
    0 .72cqw 1.5cqw rgba(42, 28, 14, .3);
  pointer-events: auto;
}

.town-hall-menu button {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  box-sizing: border-box;
  padding: .55cqw 1.2cqw .35cqw;
  border: .2cqw solid rgba(121, 91, 54, .72);
  border-radius: .8cqw;
  background:
    linear-gradient(180deg, rgba(255, 252, 237, .88), rgba(235, 218, 181, .9));
  color: #49351f;
  font: 800 clamp(9px, 1.72cqw, 16px)/1.05 var(--town-serif);
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: clip;
  box-shadow:
    inset 0 0 0 .18cqw rgba(255, 255, 247, .72),
    0 .22cqw .34cqw rgba(60, 38, 17, .16);
  cursor: pointer;
}

.town-hall-menu button.is-emphasis,
.town-hall-menu .is-emphasis {
  background:
    linear-gradient(180deg, rgba(242, 205, 164, .98), rgba(180, 92, 79, .98));
  color: #3d2b17;
  border-color: #7d4136;
}

.town-hall-menu button[data-town-hall-action="exit"] {
  background:
    linear-gradient(180deg, rgba(244, 204, 168, .98), rgba(183, 101, 65, .98));
  color: #3b2017;
  border-color: #6d3827;
}

.town-hall-menu button:last-child {
  grid-column: auto;
}

.town-hall-resident-action-copy {
  display: grid;
  place-items: center;
  gap: .24cqw;
  min-width: 0;
  line-height: 1;
  white-space: normal;
}

.town-hall-resident-action-copy strong,
.town-hall-resident-action-copy small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font: inherit;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.town-hall-resident-action-copy small {
  font-size: .72em;
  letter-spacing: -.02em;
}

.town-hall-new-place-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .8cqw;
  min-width: 0;
  min-height: 0;
}

.town-hall-new-place-form label {
  display: grid;
  grid-template-columns: 26% minmax(0, 1fr);
  align-items: center;
  gap: .9cqw;
  min-width: 0;
  color: #49351f;
  font: 800 clamp(8px, 1.45cqw, 13px)/1 var(--town-serif);
}

.town-hall-new-place-form input,
.town-hall-new-place-form select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: clamp(22px, 3.2cqw, 36px);
  padding: 0 1.2cqw;
  border: .22cqw solid #76532b;
  border-radius: .7cqw;
  background: rgba(255, 248, 221, .98);
  color: #49351f;
  font: 800 clamp(9px, 1.55cqw, 14px)/1 var(--town-sans);
}

.town-hall-new-place-form button {
  min-height: 0;
}

.town-hall-menu button:active {
  transform: translateY(.18cqw);
}

.town-hall-menu button:focus-visible {
  outline: clamp(2px, .35cqw, 3px) solid #234d66;
  outline-offset: -.5cqw;
}

.town-hall-open > .thread-marker,
.town-hall-open > .resident-map-bubble-layer,
.town-hall-open > .town-hall-entrance {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-hall-open > .town-scene-ui .town-scene-location,
.town-hall-open > .town-scene-ui .town-scene-admin-edit,
.town-hall-open > .town-scene-ui .town-scene-arrows,
.town-hall-open > .town-scene-ui .town-scene-shortcuts {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-hall-open.town-modal-open > .town-hall-mode {
  pointer-events: none;
}

.town-scene-ui {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.town-scene-top {
  position: absolute;
  top: 1.196%;
  left: 1.063%;
  z-index: 80;
  width: 97.768%;
  aspect-ratio: 920 / 259;
  pointer-events: none;
}

.town-top-image,
.town-scene-location > img,
.town-scene-arrows > img,
.town-scene-shortcuts > .town-shortcut-image,
.town-scene-shortcuts > .town-shortcut-frame-overlay,
.town-fixed-top > .town-top-image,
.town-fixed-shortcuts > .town-shortcut-image,
.town-fixed-shortcuts > .town-shortcut-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.town-shortcut-image {
  z-index: 0;
}

.town-shortcut-frame-overlay {
  z-index: 3;
}

.town-notice-window {
  position: absolute;
  top: 8%;
  left: 5%;
  display: flex;
  align-items: center;
  width: 90%;
  height: 25%;
  overflow: hidden;
  color: #51402d;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.town-notice-window [data-town-notice] {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  font: 600 clamp(10px, 1.85cqw, 18px)/1.05 var(--town-serif);
  white-space: nowrap;
  animation: town-notice-scroll var(--town-notice-duration, 24s) linear infinite;
}

@keyframes town-notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.town-map-button,
.town-menu-button {
  position: absolute;
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
  color: #55422d;
  cursor: pointer;
  pointer-events: auto;
}

.town-map-button {
  top: 44%;
  left: 1.3%;
  width: 15.3%;
  height: 53%;
}

.town-menu-button {
  top: 46.04%;
  right: 3.993%;
  width: 12.163%;
  height: 42.409%;
}

.town-menu-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  gap: clamp(3px, .65cqw, 6px);
  width: 35%;
  transform: translate(-50%, -50%);
}

.town-menu-icon i {
  display: block;
  width: 100%;
  height: clamp(3px, .62cqw, 6px);
  border-radius: 99px;
  background: #5a4229;
  box-shadow: 0 1px rgba(255, 244, 209, .64);
}

.is-explore-open .town-menu-icon i:nth-child(1),
.is-arcade-open .town-menu-icon i:nth-child(1),
.is-modal-open .town-menu-icon i:nth-child(1),
.is-town-hall-open .town-menu-icon i:nth-child(1),
.is-native-modal-open .town-menu-icon i:nth-child(1),
.town-route-settings .town-menu-icon i:nth-child(1) {
  transform: translateY(calc(clamp(3px, .65cqw, 6px) + clamp(3px, .62cqw, 6px))) rotate(45deg);
}

.is-explore-open .town-menu-icon i:nth-child(2),
.is-arcade-open .town-menu-icon i:nth-child(2),
.is-modal-open .town-menu-icon i:nth-child(2),
.is-town-hall-open .town-menu-icon i:nth-child(2),
.is-native-modal-open .town-menu-icon i:nth-child(2),
.town-route-settings .town-menu-icon i:nth-child(2) {
  opacity: 0;
}

.is-explore-open .town-menu-icon i:nth-child(3),
.is-arcade-open .town-menu-icon i:nth-child(3),
.is-modal-open .town-menu-icon i:nth-child(3),
.is-town-hall-open .town-menu-icon i:nth-child(3),
.is-native-modal-open .town-menu-icon i:nth-child(3),
.town-route-settings .town-menu-icon i:nth-child(3) {
  transform: translateY(calc((clamp(3px, .65cqw, 6px) + clamp(3px, .62cqw, 6px)) * -1)) rotate(-45deg);
}

.town-scene-location {
  position: absolute;
  top: 64%;
  left: 21.75%;
  z-index: 76;
  width: 56.5%;
  aspect-ratio: 699 / 234;
}

.town-location-copy {
  position: absolute;
  inset: 23% 13% 19%;
  display: grid;
  place-content: center;
  gap: .55cqw;
  color: #4c3a27;
  text-align: center;
}

.town-location-copy small {
  font: 600 clamp(6px, 1.2cqw, 11px)/1 var(--town-serif);
  letter-spacing: .17em;
}

.town-location-copy strong {
  font: 600 clamp(12px, 2.45cqw, 23px)/1.08 var(--town-serif);
  letter-spacing: .04em;
  white-space: nowrap;
}

.town-scene-admin-edit {
  position: absolute;
  top: 74.55%;
  left: 37%;
  z-index: 78;
  width: 26%;
  height: 2.1%;
  pointer-events: auto;
}

.town-scene-admin-periods {
  position: absolute;
  bottom: calc(100% + .8cqw);
  left: 50%;
  display: flex;
  width: max-content;
  gap: .7cqw;
  transform: translateX(-50%);
}

.town-scene-admin-edit:not(.is-active) .town-scene-admin-periods {
  display: none;
}

.town-scene-admin-periods button {
  width: clamp(28px, 7cqw, 54px);
  height: clamp(18px, 3.4cqw, 28px);
  padding: 0;
  border: .18cqw solid #765329;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 248, 216, .98), rgba(221, 187, 121, .98));
  color: #4d3822;
  font: 800 clamp(7px, 1.5cqw, 10px)/1 var(--town-sans) !important;
  box-shadow: 0 .25cqw .4cqw rgba(47, 29, 12, .24);
}

.town-scene-admin-periods button.is-active {
  border-color: #58371d;
  background: linear-gradient(180deg, #795236, #4f3425);
  color: #fff2cb;
}

.town-scene-admin-periods button[hidden] {
  display: none !important;
}

.town-scene-admin-edit[hidden] {
  display: none !important;
}

.town-scene-admin-edit > button[data-town-admin-edit] {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  box-sizing: border-box;
  padding: .1cqw .8cqw 0;
  border: .18cqw solid #765329;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 246, 207, .98), rgba(226, 190, 119, .98));
  color: #4d3822;
  font: 800 clamp(7px, 1.75cqw, 10px)/1 var(--town-sans) !important;
  letter-spacing: .01em !important;
  white-space: nowrap !important;
  box-shadow:
    inset 0 0 0 .2cqw rgba(255, 251, 225, .5),
    0 .28cqw .42cqw rgba(47, 29, 12, .26);
  cursor: pointer;
}

.town-scene-admin-edit.is-active > button[data-town-admin-edit] {
  border-color: #5f3b1f;
  background:
    linear-gradient(180deg, rgba(194, 128, 73, .98), rgba(126, 73, 39, .98));
  color: #fff1c9;
  box-shadow:
    inset 0 0 0 .2cqw rgba(255, 222, 166, .24),
    0 .28cqw .42cqw rgba(47, 29, 12, .3);
}

.town-scene.is-editing > .thread-marker:not(.edit-marker) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-scene > .thread-marker.edit-marker {
  appearance: none !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  touch-action: none !important;
  pointer-events: auto !important;
}

.town-scene > .thread-marker.edit-marker > .edit-bubble {
  border-color: #8b5a18 !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.48), transparent 30%),
    linear-gradient(180deg, rgba(255, 232, 151, .99), rgba(218, 166, 75, .99)) !important;
  color: #422b10 !important;
}

.town-scene > .thread-marker.edit-marker > .edit-bubble::after {
  border-color: #8b5a18 !important;
  background: #dca84e !important;
}

.town-scene.is-editing > .thread-marker[data-address],
.town-scene.is-editing :is(.town-hall-sign, .town-arcade-sign, .town-casino-sign) {
  z-index: 42 !important;
  cursor: grab !important;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: clamp(1px, .3cqw, 3px) dashed rgba(255, 239, 166, .94);
  outline-offset: clamp(2px, .35cqw, 4px);
}

.town-scene.is-admin-dragging,
.town-scene.is-admin-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.town-scene.is-editing > .thread-marker[data-address].is-dragging,
.town-scene.is-editing :is(.town-hall-sign, .town-arcade-sign, .town-casino-sign).is-dragging {
  z-index: 44 !important;
  cursor: grabbing !important;
  transition: none !important;
}

.town-scene.town-layout-pending > :is(.thread-marker, .town-hall-entrance, .town-arcade-entrance, .town-casino-entrance) {
  visibility: hidden !important;
}

.town-scene-arrows {
  position: absolute;
  top: 76.7%;
  left: 5.313%;
  z-index: 75;
  width: 89.267%;
  aspect-ratio: 840 / 174;
}

.town-scene[data-town-district="1"] .town-scene-arrows > img {
  clip-path: inset(0 0 0 50%);
}

.town-scene[data-town-district="5"] .town-scene-arrows > img {
  clip-path: inset(0 50% 0 0);
}

.town-scene-arrows button {
  position: absolute;
  top: 0;
  width: 39%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.town-scene-arrows [data-town-prev] {
  left: 0;
}

.town-scene-arrows [data-town-next] {
  right: 0;
}

.town-scene-arrows button:disabled {
  visibility: hidden;
  opacity: 0;
  cursor: default;
}

.town-scene-shortcuts {
  position: absolute;
  top: 87.321%;
  left: 3.188%;
  z-index: 75;
  width: 93.518%;
  aspect-ratio: 880 / 204;
}

.town-shortcut-buttons {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: auto;
}

.town-shortcut-buttons button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4.5% 6.5%;
  padding: 3.5%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #503b25;
  cursor: pointer;
}

.town-shortcut-buttons button.is-unavailable,
.town-shortcut-buttons button:disabled {
  opacity: .42;
  filter: grayscale(1);
  cursor: not-allowed;
}

.town-shortcut-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 .35cqw .28cqw rgba(66, 43, 20, .2));
  pointer-events: none;
}

.town-shortcut-art.is-persona-art {
  width: 88%;
  height: 88%;
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  object-position: center;
}

.town-shortcut-art.is-thread-art {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.town-shortcut-buttons button > b.town-shortcut-thread-title {
  position: absolute;
  top: 32%;
  right: 10%;
  left: 10%;
  display: flex;
  box-sizing: border-box;
  height: 38%;
  align-items: center;
  justify-content: center;
  padding-top: .35cqw;
  overflow: hidden;
  color: #4b3521;
  font: 800 clamp(6px, 1.45cqw, 13px)/1.08 var(--town-serif);
  letter-spacing: 0;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.town-shortcut-buttons button > b.town-shortcut-thread-title.is-ten-characters {
  top: 27.5%;
  height: 48%;
  flex-direction: column;
  gap: 0;
  padding-top: .45cqw;
  font-size: clamp(6px, 1.32cqw, 12px);
  line-height: 1.02;
  white-space: normal;
}

.town-shortcut-news-badge-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: visible;
  pointer-events: none;
}

.town-shortcut-news-badge-layer[hidden] {
  display: none !important;
}

.town-shortcut-news-badge {
  position: absolute;
  top: 1.5%;
  left: calc((var(--town-news-shortcut-index, 0) * 25%) + 20.5%);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: clamp(16px, 4.4cqw, 36px);
  height: clamp(16px, 4.4cqw, 36px);
  padding: 0 clamp(3px, .8cqw, 7px);
  border: clamp(1px, .28cqw, 2px) solid rgba(255, 250, 226, .96);
  border-radius: 999px;
  background: #a83d34;
  color: #fff9e8;
  box-shadow: 0 .32cqw .8cqw rgba(44, 23, 12, .46);
  font: 900 clamp(8px, 1.8cqw, 15px)/1 var(--town-sans);
  transform: translateX(-50%);
  pointer-events: none;
}

.town-shortcut-news-badge[hidden] {
  display: none !important;
}

.town-shortcut-thread-title.is-ten-characters > span {
  display: block;
  white-space: nowrap;
}

.town-map-button:focus-visible,
.town-menu-button:focus-visible,
.town-scene-arrows button:focus-visible,
.town-shortcut-buttons button:focus-visible {
  outline: 2px solid rgba(255, 249, 218, .98);
  outline-offset: -5px;
}

/* Thread locations stay in the safe middle zone and use their original link. */

.town-scene > .thread-marker {
  top: var(--town-marker-y, var(--y)) !important;
  left: var(--town-marker-x, var(--x)) !important;
  z-index: 20 !important;
  width: 15cqw !important;
  height: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  animation: none !important;
}

.town-scene > .thread-marker .thread-avatar,
.town-scene > .thread-marker .resident-marker-persona {
  display: block !important;
  width: 13.5cqw !important;
  height: 13.5cqw !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 .7cqw .55cqw rgba(37, 24, 11, .42));
}

html.nassfurt-town-ui .town-scene > .thread-marker.resident-marker img.thread-avatar.resident-marker-persona {
  width: 13.5cqw !important;
  height: 13.5cqw !important;
  min-width: 0 !important;
  max-width: none !important;
}

.town-shortcut-setting-panel {
  order: 0;
}

.town-sound-setting-panel {
  order: -2;
}

.town-sound-setting-fields {
  display: grid;
  gap: 6px;
}

.town-sound-setting-row {
  display: grid;
  grid-template-columns: minmax(46px, .42fr) minmax(118px, 1fr);
  align-items: center;
  gap: 8px;
}

.town-sound-setting-row > span {
  color: #5a432b;
  font: 900 11px/1 var(--town-sans);
  white-space: nowrap;
}

.town-sound-setting-row div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.town-sound-setting-row button {
  min-width: 52px;
  min-height: 28px;
  border: 1px solid #9a774b;
  border-radius: 7px;
  background: #fff4d6;
  color: #49351f;
  font: 800 11px/1 var(--town-sans);
  white-space: nowrap;
  cursor: pointer;
}

.town-sound-setting-row button[aria-pressed="true"] {
  background: linear-gradient(180deg, #f5d886, #c7943f);
  box-shadow: inset 0 0 0 2px rgba(255, 249, 221, .7);
}

.town-shortcut-setting-panel .panel-body {
  padding: 8px !important;
}

.town-shortcut-setting-note {
  margin: 0 0 6px;
  color: #5a4b37;
  font: 700 10px/1.35 var(--town-sans);
}

.town-shortcut-setting-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.town-shortcut-setting-fields label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.town-shortcut-setting-fields label > span {
  color: #5a432b;
  font: 800 10px/1.1 var(--town-sans);
}

.town-shortcut-setting-fields select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 4px 28px 4px 8px;
  border: 1px solid #9a774b;
  border-radius: 7px;
  background: #fff4d6;
  color: #49351f;
  font: 700 10px/1.15 var(--town-sans);
  box-shadow: inset 0 0 0 2px rgba(255, 250, 224, .7);
}

.town-shortcut-setting-fields option:disabled {
  color: #a79f91;
}

html.town-embedded-content .resident-account-simple {
  gap: 14px;
}

html.town-embedded-content .resident-account-simple .resident-account-identity {
  display: grid;
  gap: 4px;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #9a774b;
  border-radius: 8px;
  background: rgba(255, 244, 214, .92);
  color: #49351f;
}

html.town-embedded-content .resident-account-simple .resident-account-identity small {
  margin: 0;
  color: #6a573c;
  font: 900 11px/1.1 var(--town-sans);
  letter-spacing: .08em;
}

html.town-embedded-content .resident-account-simple .resident-account-identity strong {
  font: 900 16px/1.2 var(--town-sans);
}

html.town-embedded-content .resident-account-simple .resident-account-security,
html.town-embedded-content .resident-account-security--stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

html.town-embedded-content .resident-account-simple .resident-account-security .resident-button,
html.town-embedded-content .resident-account-security--stack .resident-button {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #9a774b;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff4d6, #dfc083);
  box-shadow: inset 0 0 0 2px rgba(255, 250, 224, .72);
  text-decoration: none;
}

.town-scene .resident-map-bubble-layer {
  display: none !important;
}

.town-scene > .thread-marker > .thread-bubble,
.town-scene > .thread-marker > .resident-map-bubble-source {
  position: absolute !important;
  right: auto !important;
  bottom: calc(100% + .8cqw) !important;
  left: 50% !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  visibility: visible !important;
  box-sizing: border-box !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  padding: 1.05cqw 1.85cqw !important;
  overflow: visible !important;
  border: .22cqw solid #77552d !important;
  border-radius: 1.05cqw 1.05cqw .7cqw .7cqw !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.42), transparent 30%),
    linear-gradient(180deg, rgba(255, 246, 216, .98), rgba(238, 214, 165, .98)) !important;
  color: #493622 !important;
  box-shadow:
    inset 0 0 0 .18cqw rgba(255, 253, 231, .88),
    inset 0 0 0 .38cqw rgba(138, 101, 58, .18),
    0 .55cqw 1cqw rgba(45, 28, 12, .25) !important;
  text-align: center !important;
  transform: translateX(-50%) !important;
  opacity: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.town-scene > .thread-marker > .thread-bubble::after,
.town-scene > .thread-marker > .resident-map-bubble-source::after {
  content: none !important;
  display: none !important;
}

.town-scene .thread-title {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  font: 800 clamp(8px, 1.85cqw, 17px)/1.15 var(--town-sans) !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.town-scene .thread-title-line {
  display: inline !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.town-scene .thread-owner-name {
  display: block !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: .32cqw .62cqw !important;
  overflow: hidden !important;
  border: .16cqw solid #7b5a32 !important;
  border-radius: .48cqw !important;
  background: rgba(244, 225, 181, .96) !important;
  color: #4d3925 !important;
  font: 800 clamp(8px,2.05cqw,18px)/1.05 var(--town-sans) !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.town-scene .thread-owner-name .user-name-with-level {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .38em !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.town-scene .thread-owner-name .user-name-text {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.town-scene .thread-owner-name .user-level-badge {
  flex: 0 0 auto !important;
  padding: .08em .34em .04em !important;
  border: 1px solid currentColor !important;
  border-radius: 0 !important;
  background: rgba(255,255,255,.62) !important;
  color: #6b4c2a !important;
  font-size: .76em !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
}

.town-scene .admin-delete-x,
.town-scene .gilda-map-marker {
  display: none !important;
}

.town-scene .thread-marker.is-bubble-pulse .thread-bubble,
.town-scene .thread-marker.is-bubble-pulse .resident-map-bubble-source {
  transform-origin: 50% 100% !important;
  animation: town-bubble-soft-pop 520ms cubic-bezier(.16, 1.22, .32, 1) both !important;
}

@keyframes town-bubble-soft-pop {
  0% { transform: translateX(-50%) scale(1); }
  36% { transform: translateX(-50%) scale(1.28); }
  68% { transform: translateX(-50%) scale(1.18); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Explore uses the exact placement from the retained UI-lab preview. */

.town-explore-layer {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.town-explore-layer[hidden] {
  display: none;
}

.town-explore-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 40, 43, .34);
}

.town-explore-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  pointer-events: auto;
}

.town-explore-board-image {
  position: absolute;
  top: 19%;
  left: 17%;
  z-index: 1;
  width: 66%;
  height: 71%;
  object-fit: fill;
  filter: drop-shadow(0 1.6cqw 1.9cqw rgba(31, 20, 8, .36));
  pointer-events: none;
}

.town-explore-board-guard {
  position: absolute;
  top: 19%;
  left: 17%;
  z-index: 1;
  width: 66%;
  height: 71%;
  pointer-events: auto;
}

.town-explore-copy {
  position: absolute;
  top: 19%;
  left: 17%;
  z-index: 2;
  width: 66%;
  height: 71%;
  color: #503c27;
  pointer-events: none;
}

.town-explore-copy header {
  position: absolute;
  inset: 0;
  text-align: center;
}

.town-explore-copy header small {
  position: absolute;
  top: 13.2%;
  left: 0;
  width: 100%;
  font: 600 clamp(11px, 2.25cqw, 21px)/1 var(--town-serif);
}

.town-explore-copy header h2 {
  position: absolute;
  top: 16.2%;
  left: 0;
  width: 100%;
  margin: 0;
  font: 500 clamp(30px, 6.7cqw, 63px)/.98 var(--town-serif);
  letter-spacing: .015em;
}

.town-explore-copy header p {
  position: absolute;
  top: 30%;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  height: 4.4%;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 0 .2cqw;
  font: 700 clamp(9px, 1.72cqw, 17px)/1 var(--town-serif);
  letter-spacing: .06em;
}

.town-explore-destinations {
  position: absolute;
  top: 36.4%;
  left: 21.5%;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  gap: .45%;
  box-sizing: border-box;
  width: 57%;
  height: 53.5%;
  overflow: hidden;
  contain: paint;
  pointer-events: auto;
}

.town-explore-destinations button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 25%) minmax(0, 1fr);
  gap: 4%;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 2.2% 3.6%;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid rgba(113, 81, 42, .24);
  background: linear-gradient(90deg, rgba(255, 252, 226, .14), rgba(255, 252, 226, .03));
  color: #503c27;
  text-align: left;
  cursor: pointer;
}

.town-explore-destinations button:last-child {
  border-bottom: 0;
}

.town-explore-destinations button > img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 78%;
  max-height: 8.2cqw;
  padding: 5%;
  border: 1px solid rgba(111, 78, 39, .48);
  border-radius: 15%;
  background: rgba(255, 249, 218, .48);
  object-fit: contain;
  box-shadow: inset 0 0 0 2px rgba(255, 252, 230, .42);
  filter: drop-shadow(0 .18cqw .18cqw rgba(67, 42, 18, .16));
}

.town-explore-destinations button.is-official-place {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2% 3.5%;
  background: transparent;
}

.town-explore-destinations button.is-official-place > img.town-explore-official-sign {
  width: 100%;
  height: 76%;
  max-height: none;
  aspect-ratio: 1240 / 300;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: fill;
  box-shadow: none;
  filter: drop-shadow(0 .2cqw .22cqw rgba(67, 42, 18, .24));
}

.town-explore-destinations button.is-thread-place {
  display: flex;
  container-type: inline-size;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.town-explore-thread-stage {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2172 / 724;
  overflow: hidden;
}

.town-explore-thread-portrait {
  position: absolute;
  top: 32.87%;
  left: 13.67%;
  z-index: 0;
  width: 11.93%;
  height: 35.78%;
  overflow: hidden;
  border-radius: 50%;
  background: #dcae61;
  pointer-events: none;
}

.town-explore-thread-underlay,
.town-explore-thread-persona,
.town-explore-thread-frame {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.town-explore-thread-activity {
  position: absolute;
  top: 10%;
  right: 10%;
  z-index: 4;
  min-width: 11%;
  padding: 1.2% 2%;
  border: .18cqw solid #20170d;
  background: #f4ce43;
  color: #171108;
  font: 900 clamp(5px, 2.3cqw, 12px)/1 var(--town-sans);
  letter-spacing: .01em;
  text-align: center;
  box-shadow: .18cqw .2cqw 0 rgba(39, 26, 13, .42);
  pointer-events: none;
}

.town-explore-thread-activity.is-now {
  animation: bob 900ms steps(2, end) infinite;
}

.town-explore-thread-activity.is-hot {
  background: #fffaf0;
}

.town-explore-thread-underlay {
  inset: -4%;
  z-index: 0;
  width: 108%;
  height: 108%;
  object-fit: cover;
}

.town-explore-thread-persona {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.town-explore-thread-persona.resident-persona-unlinked {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 253, 238, .96), rgba(197, 156, 91, .92));
  color: #563716;
  font: 800 9cqw/1 Georgia, var(--town-serif);
}

.town-explore-thread-frame {
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: drop-shadow(0 .2cqw .22cqw rgba(67, 42, 18, .24));
}

.town-explore-thread-copy,
.town-explore-thread-title,
.town-explore-thread-owner,
.town-explore-thread-stats {
  position: absolute;
  z-index: 3;
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  color: #563716;
  text-align: center;
  text-overflow: clip;
  text-shadow: 0 .05em rgba(255, 237, 179, .76);
  white-space: nowrap;
  pointer-events: none;
}

.town-explore-thread-copy {
  top: 18%;
  left: 29%;
  width: 42.5%;
  height: 58%;
  flex-direction: column;
  gap: 2%;
  padding: 0 3%;
}

.town-explore-thread-title,
.town-explore-thread-owner {
  position: static;
  width: 100%;
  height: 42%;
  padding: 0;
}

.town-explore-thread-title {
  font: 800 var(--town-explore-thread-title-size)/1 var(--town-serif);
  letter-spacing: .018em;
}

.town-explore-thread-owner {
  height: 30%;
  font: 800 var(--town-explore-thread-owner-size)/1 var(--town-sans);
  letter-spacing: .01em;
}

.town-explore-thread-stats {
  top: 67.4%;
  left: 70.8%;
  width: 15.6%;
  height: 11.2%;
  padding: 0 1.5%;
  font: 800 var(--town-explore-thread-stats-size)/1 var(--town-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.town-explore-destination-copy {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  min-height: 72%;
  gap: .3cqw;
  padding: 4% 5%;
  overflow: hidden;
  border: 1px solid rgba(111, 78, 39, .42);
  border-radius: .8cqw;
  background: rgba(255, 249, 218, .38);
  box-shadow: inset 0 0 0 2px rgba(255, 252, 230, .35);
}

.town-explore-destination-copy b {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font: 800 clamp(7px, 1.6cqw, 15px)/1.05 var(--town-serif);
  text-overflow: clip;
  white-space: nowrap;
}

.town-explore-destination-copy > span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font: 700 clamp(6px, 1.12cqw, 11px)/1.1 var(--town-sans);
  text-overflow: clip;
  white-space: nowrap;
}

.town-explore-destinations button:focus-visible {
  outline: 2px solid #876437;
  outline-offset: -5px;
}

.town-explore-open > .thread-marker,
.town-explore-open > .thread-marker *,
.town-explore-open .town-scene-location,
.town-explore-open .town-scene-arrows,
.town-explore-open .town-scene-shortcuts {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-scene.town-explore-open > .thread-marker > .thread-bubble,
.town-scene.town-explore-open > .thread-marker > .resident-map-bubble-source,
.town-scene.town-explore-open > .resident-map-bubble-layer {
  display: none !important;
}

/* Every facility opens inside the persistent town stage. */

.town-modal-layer {
  position: absolute;
  inset: 0;
  z-index: 140;
  display: block;
  pointer-events: auto;
}

.town-modal-layer.has-embedded-modal {
  /*
   * A page inside the cached facility iframe can open another modal. Keep its
   * content above the host-owned full-viewport veil (150), but below the
   * hanging Town rail (160) so its Back control remains clickable.
   */
  z-index: 155;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.town-modal-layer.has-embedded-modal .town-modal-backdrop {
  pointer-events: none;
}

/* .town-scene uses isolation, so a body-level veil always paints above every
 * iframe inside it regardless of the iframe's local z-index. Put the veil in
 * the same isolated Town stack. It must cover the complete Town stage and the
 * outer facility board, while the child iframe stays one layer above it. */
html.town-embedded-modal-open,
html.town-embedded-modal-open body {
  background: #06121b !important;
}

html.town-embedded-modal-open body::before {
  display: none;
}

.town-modal-layer.has-embedded-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(6, 18, 27, .7);
  -webkit-backdrop-filter: blur(3px) saturate(.82);
  backdrop-filter: blur(3px) saturate(.82);
  pointer-events: none;
}

.town-modal-layer.has-embedded-modal .town-modal-window {
  /* Do not form a stacking context here. The iframe's z-index: 3 must be
   * able to rise above the site-wide veil, while this outer board remains
   * below it and is therefore dimmed. */
  z-index: auto !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}

.town-modal-layer.has-embedded-modal .town-modal-frame {
  z-index: 3;
  filter: none !important;
  opacity: 1 !important;
}

/* An alert raised inside a facility iframe must sit above every Town veil,
 * including a stale body-level veil while the cached facility catches up.
 * The rail is intentionally hidden behind this short, blocking notice. */
.town-modal-layer.has-embedded-modal[data-town-embedded-modal-kind="dialog"] {
  z-index: 200;
}

.town-modal-layer.has-embedded-modal[data-town-embedded-modal-kind="dialog"] .town-modal-window {
  z-index: auto !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}

.town-modal-layer.has-embedded-modal[data-town-embedded-modal-kind="dialog"] .town-modal-frame {
  z-index: 3;
  filter: none !important;
  opacity: 1 !important;
}

.town-modal-layer[hidden] {
  display: none !important;
}

.town-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(13, 31, 38, .56);
  backdrop-filter: blur(3px) saturate(.78);
}

.town-modal-window {
  position: absolute;
  top: 18.5%;
  right: 10%;
  bottom: 10%;
  left: 10%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: none;
}

.town-modal-window::before {
  display: none;
}

.town-modal-header {
  position: absolute;
  top: 3.5%;
  right: 7.5%;
  left: 7.5%;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 7.2%;
  padding: 0 2.2%;
  border-bottom: 1px solid rgba(106, 72, 33, .3);
  background: transparent;
  color: var(--town-ink);
  box-shadow: none;
}

.town-modal-header > span {
  font: 700 clamp(7px, 1.55cqw, 14px)/1 var(--town-serif);
  letter-spacing: .16em;
}

.town-modal-header > strong {
  overflow: hidden;
  font: 600 clamp(12px, 3.1cqw, 28px)/1 var(--town-serif);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.town-modal-layer:not([data-town-modal-kind="settings"]) .town-modal-header {
  display: none;
}

.town-modal-frame {
  position: absolute;
  top: 4.5%;
  right: 5%;
  bottom: 4.5%;
  left: 5%;
  z-index: 1;
  width: 90%;
  height: 91%;
  border: 0;
  background: transparent;
}

.town-modal-frame[hidden] {
  display: none !important;
}

.town-modal-loading {
  position: absolute;
  inset: 4.5% 5%;
  z-index: 2;
  display: grid;
  place-items: center;
  background: transparent;
  color: #475467;
  font: 600 clamp(11px, 2.5cqw, 23px)/1.4 var(--town-serif);
  pointer-events: none;
}

.town-modal-loading[hidden] {
  display: none !important;
}

.town-modal-layer[data-town-modal-kind="settings"] .town-modal-window {
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: none;
}

.town-modal-layer[data-town-modal-kind="settings"] .town-modal-header {
  border-bottom-color: rgba(106, 72, 33, .3);
  background: transparent;
  color: var(--town-ink);
  box-shadow: none;
}

.town-modal-layer[data-town-modal-kind="settings"] .town-modal-header > span {
  color: #667085;
  letter-spacing: .11em;
}

.town-modal-layer[data-town-modal-kind="settings"] .town-modal-frame,
.town-modal-layer[data-town-modal-kind="settings"] .town-settings-native,
.town-modal-layer[data-town-modal-kind="settings"] .town-modal-loading {
  top: 11.2%;
  right: 7.7%;
  bottom: 6.2%;
  left: 7.7%;
  width: 84.6%;
  height: 82.6%;
  background: transparent;
}

.town-settings-native {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px 7px 12px;
  background: transparent;
  color: var(--town-ink);
  font-size: 10px;
  pointer-events: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.town-settings-native[hidden] {
  display: none !important;
}

.town-modal-layer[data-town-modal-kind="binder"] .town-modal-backdrop {
  background: rgba(13, 31, 38, .56);
  backdrop-filter: blur(3px) saturate(.78);
}

.town-modal-layer[data-town-modal-kind="binder"] .town-modal-window {
  inset: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.town-modal-layer[data-town-modal-kind="binder"] .town-modal-header,
.town-modal-layer[data-town-modal-kind="binder"] .town-modal-loading {
  display: none !important;
}

.town-modal-layer[data-town-modal-kind="binder"] .town-modal-frame {
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

/*
 * Shared 4:3 modal board.
 *
 * This is the horizontal 4:3 board converted into a real portrait PNG.  The
 * bitmap itself is vertical; no CSS rotation is used.  Its broader paper face
 * gives NEWS, PLACE and SETTING substantially more usable content width.
 */
.town-modal-layer:is(
  [data-town-modal-kind="place"],
  [data-town-modal-kind="settings"],
  [data-town-modal-kind="news"]
) .town-modal-window {
  top: 18%;
  right: 2.5%;
  bottom: 7%;
  left: 2.5%;
  background:
    url("/__resident-lab/assets/town/ui-generated/modal-board-4x3-portrait.png")
    center / 100% 100% no-repeat;
}

.town-modal-layer:is(
  [data-town-modal-kind="place"],
  [data-town-modal-kind="news"]
) .town-modal-frame,
.town-modal-layer:is(
  [data-town-modal-kind="place"],
  [data-town-modal-kind="news"]
) .town-modal-loading {
  top: 5.4%;
  right: 7.2%;
  bottom: 5.6%;
  left: 7.2%;
  width: 85.6%;
  height: 89%;
}

.town-modal-layer[data-town-modal-kind="settings"] .town-modal-header {
  top: 4.7%;
  right: 7.2%;
  left: 7.2%;
  height: 6%;
  padding: 0 1.8%;
}

.town-modal-layer[data-town-modal-kind="settings"] .town-modal-frame,
.town-modal-layer[data-town-modal-kind="settings"] .town-settings-native,
.town-modal-layer[data-town-modal-kind="settings"] .town-modal-loading {
  top: 11%;
  right: 7.2%;
  bottom: 5.6%;
  left: 7.2%;
  width: 85.6%;
  height: 83.4%;
}

.town-settings-native .my-page-section,
.town-settings-native .my-page-setting-grid,
.town-settings-native .setting-grid {
  margin: 0 !important;
}

.town-settings-native .my-page-setting-grid,
.town-settings-native .setting-grid {
  display: grid;
  gap: 5px !important;
}

.town-settings-native .town-settings-admin-entry {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: calc(100% - 16px);
  min-height: 36px;
  margin: 3px 8px 8px;
  padding: 7px 12px;
  border: 1px solid #8a6537;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 244, 214, .96), rgba(210, 174, 103, .96));
  color: #49351f;
  font: 900 11px/1.1 var(--town-sans);
  letter-spacing: .08em;
  text-align: center;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 250, 224, .66),
    0 2px 0 rgba(82, 54, 26, .36);
}

.town-settings-native .town-settings-admin-entry:active {
  transform: translateY(1px);
  box-shadow: inset 0 0 0 2px rgba(255, 250, 224, .66);
}

.town-settings-native .setting-panel {
  margin: 0 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.town-settings-native .setting-panel > .setting-title,
.town-settings-native .setting-panel > .panel-title {
  display: block !important;
  padding: 6px 8px !important;
  border: 0 !important;
  background: transparent !important;
  color: #49351f !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.town-route-map .town-settings-native .setting-panel:first-of-type > .panel-title {
  display: block !important;
}

.town-settings-native .setting-panel > .setting-body,
.town-settings-native .setting-panel > .panel-body {
  padding: 7px 8px !important;
}

.town-settings-native .resident-login-panel {
  gap: 6px !important;
}

.town-settings-native .resident-login-panel .resident-state-note {
  margin: 3px 0 !important;
  padding: 6px 8px !important;
  line-height: 1.3 !important;
}

.town-settings-native .resident-login-panel .resident-form {
  gap: 6px !important;
}

.town-settings-native .resident-login-panel .resident-form label {
  gap: 2px !important;
}

.town-settings-native .resident-login-panel .resident-form input {
  min-height: 36px !important;
  padding: 5px 8px !important;
}

.town-settings-native .resident-login-panel .resident-button {
  min-height: 36px !important;
  padding: 6px 9px !important;
}

.town-settings-native .resident-login-panel .resident-form-error {
  min-height: 10px !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

.town-settings-native .town-sound-setting-fields {
  gap: 3px !important;
}

.town-settings-native .town-sound-setting-row {
  gap: 4px !important;
}

.town-settings-native .town-sound-setting-row button {
  min-height: 22px !important;
}

.town-settings-native .town-shortcut-setting-panel .panel-body {
  padding: 5px !important;
}

.town-settings-native .town-shortcut-setting-note {
  margin-bottom: 2px !important;
  line-height: 1.2 !important;
}

.town-settings-native .town-shortcut-setting-fields {
  gap: 3px !important;
}

.town-settings-native .town-shortcut-setting-fields label {
  gap: 1px !important;
}

.town-settings-native .town-shortcut-setting-fields select {
  min-height: 24px !important;
  padding-block: 2px !important;
}

.town-settings-native .resident-account-simple {
  gap: 14px;
}

.town-settings-native .resident-account-simple .resident-account-identity {
  display: grid;
  gap: 4px;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #9a774b;
  border-radius: 8px;
  background: rgba(255, 244, 214, .92);
  color: #49351f;
}

.town-settings-native .resident-account-simple .resident-account-identity small {
  margin: 0;
  color: #6a573c;
  font: 900 11px/1.1 var(--town-sans);
  letter-spacing: .08em;
}

.town-settings-native .resident-account-simple .resident-account-identity strong {
  font: 900 16px/1.2 var(--town-sans);
}

.town-settings-native .resident-account-simple .resident-account-security,
.town-settings-native .resident-account-security--stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.town-settings-native .resident-account-simple .resident-account-security .resident-button,
.town-settings-native .resident-account-security--stack .resident-button {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #9a774b;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff4d6, #dfc083);
  box-shadow: inset 0 0 0 2px rgba(255, 250, 224, .72);
  text-decoration: none;
}

.town-modal-open > .thread-marker,
.town-modal-open > .resident-map-bubble-layer {
  pointer-events: none !important;
}

.town-explore-open > .thread-marker,
.town-explore-open > .resident-thread-bubble-proxy,
.town-explore-open > .resident-map-bubble-layer,
.town-explore-open > .town-hall-entrance,
.town-explore-open > .town-arcade-entrance,
.town-explore-open > .town-casino-entrance,
.town-explore-open > .town-hall-mode {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-modal-open > .town-scene-ui {
  z-index: 160;
}

.town-modal-open .town-scene-location,
.town-modal-open .town-scene-arrows,
.town-modal-open .town-scene-shortcuts,
.town-modal-open .town-explore-layer {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-modal-open .town-map-button {
  pointer-events: none !important;
}

.town-modal-open .town-menu-button {
  pointer-events: auto !important;
}

.town-explore-open .town-scene-location,
.town-explore-open .town-scene-admin-edit,
.town-explore-open .town-scene-arrows,
.town-explore-open .town-scene-shortcuts {
  visibility: hidden !important;
  pointer-events: none !important;
}

.town-scene > .resident-overlay,
.town-scene > .card-folder-binder-modal,
.town-scene > .hio-card-collection-modal,
.town-scene > .site-dialog-modal,
.town-scene > .hio-confirm-modal,
.town-scene > .passphrase-modal,
.town-scene > .account-recovery-modal,
.town-scene > .icon-edit-modal,
.town-scene > .special-thread-fortune-modal,
.town-scene > .game-modal {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}

/* The first-district Town Hall login can request an account/game merge
   confirmation while the Resident login overlay is still open. Keep that
   confirmation above the login overlay so the flow cannot appear frozen. */
.town-scene > .hio-confirm-modal {
  z-index: 10020 !important;
}

/* The original fortune card is designed for a full page. Inside the narrow
   cached thread iframe it becomes a compact child card, while the hanging town
   rail remains the Back control. */
html.town-embedded-content .special-thread-fortune-modal {
  box-sizing: border-box !important;
  /* The full-site nested-modal veil is z-index 150.  Keep the fortune card
     above that veil while the host Town rail remains above the iframe. */
  z-index: 151 !important;
  padding: 6cqw !important;
}

html.town-embedded-content .special-thread-fortune-backdrop {
  background: rgba(6, 18, 27, .7) !important;
  -webkit-backdrop-filter: blur(5px) saturate(.76) !important;
  backdrop-filter: blur(5px) saturate(.76) !important;
}

html.town-embedded-content .special-thread-fortune-window {
  box-sizing: border-box !important;
  gap: 2.2cqw !important;
  width: min(76cqw, 278px) !important;
  max-height: min(68dvh, 430px) !important;
  padding: 3.2cqw !important;
  border-width: max(2px, .5cqw) !important;
  border-radius: 5cqw !important;
  box-shadow: 0 2.2cqw 0 rgba(0, 0, 0, .2) !important;
}

html.town-embedded-content .special-thread-fortune-close {
  display: none !important;
}

html.town-embedded-content .special-thread-fortune-head {
  grid-template-columns: minmax(66px, 22cqw) minmax(0, 1fr) !important;
  gap: 2.4cqw !important;
  justify-items: stretch !important;
  text-align: left !important;
}

html.town-embedded-content .special-thread-fortune-avatar-wrap {
  box-sizing: border-box !important;
  width: auto !important;
  padding: 1cqw !important;
  overflow: hidden !important;
  border-width: max(2px, .45cqw) !important;
  border-radius: 3cqw !important;
  background: #e6d9b7 !important;
  box-shadow: 1.2cqw 1.2cqw 0 rgba(0, 0, 0, .15) !important;
}

html.town-embedded-content .special-thread-fortune-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 2cqw !important;
  object-fit: cover !important;
}

html.town-embedded-content .special-thread-fortune-head-copy {
  gap: 1cqw !important;
  justify-items: start !important;
}

html.town-embedded-content .special-thread-fortune-kicker {
  padding: .7cqw 1.4cqw !important;
  border-width: max(1px, .3cqw) !important;
  font-size: clamp(7px, 2cqw, 10px) !important;
}

html.town-embedded-content .special-thread-fortune-head-copy h2 {
  font-size: clamp(14px, 4.2cqw, 18px) !important;
  line-height: 1.12 !important;
}

html.town-embedded-content .special-thread-fortune-head-copy p {
  font-size: clamp(9px, 2.7cqw, 12px) !important;
  line-height: 1.3 !important;
}

html.town-embedded-content .special-thread-fortune-body {
  gap: 1.5cqw !important;
  padding: 2.6cqw !important;
  border-width: max(2px, .45cqw) !important;
  border-radius: 3.5cqw !important;
}

html.town-embedded-content .special-thread-fortune-label {
  font-size: clamp(8px, 2.3cqw, 11px) !important;
}

html.town-embedded-content .special-thread-fortune-rank {
  min-width: 20cqw !important;
  padding: 1.4cqw 3cqw 1.2cqw !important;
  border-width: max(2px, .45cqw) !important;
  font-size: clamp(20px, 6.2cqw, 28px) !important;
}

html.town-embedded-content .special-thread-fortune-message {
  font-size: clamp(10px, 3.1cqw, 13px) !important;
  line-height: 1.5 !important;
}

html.town-embedded-content .special-thread-fortune-foot {
  gap: 1.5cqw !important;
  justify-content: center !important;
}

html.town-embedded-content .special-thread-fortune-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 3em !important;
  font-size: clamp(9px, 2.8cqw, 12px) !important;
}

/* Administrative status is already represented by permissions and styling.
   Repeating ADMIN beside every reply only crowds the compact thread metadata. */
html.town-embedded-content .resident-reply-meta > .tag.light,
html.town-embedded-content .chat-sticker-meta > .tag.light {
  display: none !important;
}

.town-scene > .hio-card-collection-modal.resident-town-binder-modal {
  z-index: 190 !important;
  display: grid !important;
  place-items: center;
  box-sizing: border-box;
  padding: 7% 6%;
  background: rgba(10, 25, 31, .64);
}

.town-scene > .hio-card-collection-modal.resident-town-binder-modal[hidden] {
  display: none !important;
}

.resident-town-binder-modal .hio-card-collection-window {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-sizing: border-box;
  width: min(88%, 720px);
  max-height: 82%;
  padding: 5.5% 5% 6%;
  overflow: hidden auto;
  border: .5cqw solid #75542d;
  border-radius: 2cqw;
  background:
    linear-gradient(rgba(255, 248, 216, .88), rgba(235, 210, 157, .94)),
    #ead29d;
  color: #49341f;
  box-shadow:
    inset 0 0 0 .38cqw rgba(255, 252, 229, .72),
    0 2cqw 4cqw rgba(18, 12, 5, .4);
  transform-origin: 32% 100%;
}

.resident-town-binder-modal.is-town-binder-opening .hio-card-collection-window {
  animation: town-binder-pop 420ms cubic-bezier(.18, .92, .2, 1.18) both;
}

.resident-town-binder-modal .hio-card-collection-close {
  position: absolute;
  top: 2.5%;
  right: 3%;
  z-index: 2;
  width: 3.6cqw;
  min-width: 28px;
  aspect-ratio: 1;
  border: .22cqw solid #795932;
  border-radius: .8cqw;
  background: #f5dfaa;
  color: #4b3420;
  cursor: pointer;
}

.resident-town-binder-modal .hio-card-collection-head {
  padding: 1% 8% 4% 0;
  border-bottom: .18cqw solid rgba(117, 84, 45, .42);
}

.resident-town-binder-modal .hio-card-collection-head p,
.resident-town-binder-modal .hio-card-collection-head h2 {
  margin: 0;
}

.resident-town-binder-modal .hio-card-collection-body {
  min-height: 0;
  padding-top: 4%;
}

@keyframes town-binder-pop {
  0% {
    transform: translate(-28%, 34%) rotate(-5deg) scale(.08);
    opacity: .18;
  }
  72% {
    transform: translate(1%, -1%) rotate(.6deg) scale(1.035);
    opacity: 1;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* Approved chrome for destination pages. No new actions are added here. */

.town-fixed-ui {
  position: relative;
  z-index: 9000;
  pointer-events: none;
}

.town-fixed-top {
  position: fixed;
  top: 0;
  left: 50%;
  width: min(97.768vw, 920px);
  aspect-ratio: 920 / 259;
  transform: translateX(-50%);
  pointer-events: none;
}

.town-fixed-top .town-map-button,
.town-fixed-top .town-menu-button {
  pointer-events: auto;
}

.town-fixed-shortcuts {
  position: fixed;
  bottom: max(4px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(93.518vw, 880px);
  aspect-ratio: 880 / 204;
  transform: translateX(-50%);
  pointer-events: none;
}

.town-fixed-shortcuts .town-shortcut-buttons {
  pointer-events: auto;
}

.town-route-content .content-inner {
  width: min(100%, 820px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(150px, 27.6vw, 275px) clamp(14px, 4vw, 38px) clamp(110px, 23vw, 220px);
  box-sizing: border-box;
  background:
    linear-gradient(rgba(250, 240, 211, .95), rgba(236, 216, 174, .96)),
    var(--town-paper);
}

html.town-route-admin .content-inner {
  padding: clamp(14px, 3vw, 28px) clamp(10px, 3vw, 28px) clamp(24px, 5vw, 48px);
}

.town-route-content .page-title {
  margin: 0 0 18px;
  padding: 16px 20px;
  border: 2px solid var(--town-line);
  border-radius: 5px;
  background: var(--town-paper-light);
  color: var(--town-ink);
  font: 600 clamp(22px, 5vw, 42px)/1.1 var(--town-serif);
  letter-spacing: .04em;
  text-align: center;
  box-shadow: inset 0 0 0 4px rgba(255, 248, 219, .55), 0 8px 16px rgba(66, 43, 20, .16);
}

.town-embedded-content.town-route-settings .content-inner > .page-title {
  display: none !important;
}

.town-route-content .panel,
.town-route-content .my-page-section {
  margin: 0 0 16px;
  border: 1px solid var(--town-line);
  border-radius: 5px;
  background: rgba(255, 244, 213, .84);
  color: var(--town-ink);
  box-shadow: inset 0 0 0 3px rgba(255, 249, 225, .45), 0 7px 16px rgba(66, 43, 20, .13);
}

.town-route-content .panel-title,
.town-route-content .my-page-section-title {
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid rgba(123, 88, 46, .5);
  background: rgba(205, 172, 109, .28);
  color: #4f3a24;
  font: 700 clamp(13px, 3vw, 20px)/1.2 var(--town-serif);
}

.town-route-content .panel-body {
  padding: clamp(12px, 3vw, 22px);
  background: transparent;
  color: var(--town-ink);
}

.town-route-content .pixel-button,
.town-route-content .mini-button,
.town-route-content .resident-button,
.resident-dialog .resident-button {
  border: 1px solid #735028;
  border-radius: 4px;
  background: linear-gradient(#f7e6b9, #d7b574);
  color: #47321f;
  box-shadow: inset 0 0 0 2px rgba(255, 247, 216, .45), 0 3px #704a24;
}

.town-route-content input,
.town-route-content textarea,
.town-route-content select {
  border: 1px solid #8b6a41;
  border-radius: 3px;
  background: rgba(255, 250, 232, .93);
  color: #3d2f21;
}

.town-route-content [hidden] {
  display: none !important;
}

/* Thread interiors are facilities inside the town, not the former themed TOWN. */

html.town-route-thread {
  --resident-conversation-surface: #ead6a8;
  --resident-conversation-card: #fff1ca;
  --resident-conversation-line: #9a7341;
  --resident-conversation-ink: #493521;
  --resident-conversation-muted: #796143;
  --resident-conversation-accent: #8a6032;
  --resident-conversation-shadow: rgba(61, 39, 18, .16);
}

.town-route-thread .town-fixed-shortcuts {
  display: none !important;
}

.town-route-thread .content-inner {
  padding-bottom: 48px !important;
  background: transparent !important;
}

.town-route-thread .content-inner > .panel:first-of-type > .panel-title {
  display: none !important;
}

.town-route-thread .content-inner > .panel:first-of-type {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.town-route-thread .thread-head.resident-thread-head {
  grid-template-columns: clamp(64px, 13vw, 92px) minmax(0, 1fr);
  gap: 12px 16px;
  padding: clamp(14px, 3.6vw, 26px) !important;
  border: 2px solid #80592d;
  border-radius: 5px;
  background:
    linear-gradient(rgba(255, 245, 211, .96), rgba(239, 213, 159, .96)),
    var(--town-paper-light) !important;
  box-shadow:
    inset 0 0 0 4px rgba(255, 250, 228, .52),
    inset 0 0 22px rgba(122, 78, 32, .12),
    0 8px 18px rgba(61, 39, 18, .16);
}

.town-route-thread .thread-head .page-title.resident-thread-title {
  margin: 0 0 8px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #493521;
  font: 600 clamp(13px, 4.25vw, 34px)/1.12 var(--town-serif);
  letter-spacing: .015em;
  text-align: left;
  white-space: nowrap;
  text-overflow: clip;
  box-shadow: none;
}

.town-route-thread .thread-head-avatar-frame.resident-thread-persona-frame {
  width: clamp(64px, 13vw, 92px);
  height: clamp(76px, 15vw, 108px);
  border: 1px solid #8a653a !important;
  border-radius: 4px !important;
  background: #f8e8bd !important;
  box-shadow:
    inset 0 0 0 3px rgba(255, 249, 225, .62),
    0 5px 12px rgba(67, 42, 20, .16) !important;
}

.town-route-thread .thread-author-card.resident-thread-author-plain,
.town-route-thread .thread-head .meta-row {
  color: #5c452d !important;
}

.town-route-thread .thread-author-card.resident-thread-author-plain {
  display: flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: clamp(3px, 1vw, 7px);
  white-space: nowrap;
}

.town-route-thread .thread-author-card.resident-thread-author-plain strong,
.town-route-thread .thread-author-card.resident-thread-author-plain .level-badge {
  flex: 0 1 auto;
  min-width: 0;
  overflow: visible;
  font-size: clamp(10px, 3.2vw, 18px);
  text-overflow: clip;
  white-space: nowrap;
}

.town-route-thread .thread-head-actions {
  padding-top: 3px;
  border-top: 1px solid rgba(128, 89, 45, .34);
}

.town-route-thread .resident-thread-pin {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px 12px 36px;
  border: 1px solid #936a38 !important;
  border-left: 1px solid #936a38 !important;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 244, 207, .98), rgba(241, 216, 164, .98)) !important;
  color: #4c3722 !important;
  box-shadow:
    inset 0 0 0 3px rgba(255, 251, 231, .5),
    0 4px 10px rgba(61, 39, 18, .13);
}

.town-route-thread .resident-thread-pin::before {
  content: "◆";
  position: absolute;
  top: 50%;
  left: 14px;
  color: #8b6334;
  font-size: 11px;
  transform: translateY(-50%);
}

.town-route-thread .resident-thread-pin p {
  color: #4c3722;
  font-family: var(--town-serif);
  font-weight: 600;
}

.town-route-thread .resident-thread-pin-edit {
  border: 1px solid #795228;
  border-radius: 3px;
  background: #f4dfaa;
  color: #4a331f;
  box-shadow: inset 0 0 0 2px rgba(255, 248, 219, .48);
}

.town-route-thread .resident-thread-pin-edit:hover,
.town-route-thread .resident-thread-pin-edit:focus-visible {
  background: #ffeabd;
}

.town-route-thread .panel.resident-conversation-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.town-route-thread .panel.resident-conversation-panel > .panel-title,
.town-route-thread .content-inner > .panel:not(:first-of-type) > .panel-title {
  margin: 0 0 10px;
  padding: 9px 4px 8px;
  border: 0;
  border-bottom: 1px solid rgba(119, 82, 41, .62);
  background: transparent;
  color: #5a4027;
  font: 700 clamp(13px, 3.1vw, 20px)/1.15 var(--town-serif);
  letter-spacing: .13em;
  box-shadow: none;
}

.town-route-thread .panel.resident-conversation-panel > .panel-body {
  padding: 0 !important;
  background: transparent !important;
}

.town-route-thread .message-list.resident-conversation-list {
  gap: clamp(10px, 2.2vw, 16px) !important;
  padding: 0 0 10px;
}

.town-route-thread article.message.resident-reply-layout,
html.town-route-thread body .message-list.resident-conversation-list article.message.resident-reply-layout {
  padding: 14px 16px 13px !important;
  border: 1px solid #9b7545 !important;
  border-radius: 5px !important;
  background:
    linear-gradient(180deg, rgba(255, 247, 221, .98), rgba(247, 229, 189, .98)) !important;
  color: #493521 !important;
  box-shadow:
    inset 0 0 0 3px rgba(255, 252, 235, .55),
    0 5px 12px rgba(61, 39, 18, .12) !important;
}

.town-route-thread article.message.resident-reply-layout::before {
  top: 9px;
  bottom: 9px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: rgba(126, 87, 44, .7);
}

.town-route-thread .resident-reply-identity {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  padding: 0 0 9px 3px;
  border-bottom: 1px solid rgba(139, 100, 54, .28);
}

.town-route-thread .resident-reply-identity .resident-thread-reply-persona {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid #a27b4b !important;
  border-radius: 4px !important;
  background: #f4dfad !important;
  box-shadow: inset 0 0 0 2px rgba(255, 250, 228, .45) !important;
}

.town-route-thread .resident-reply-meta,
.town-route-thread .resident-reply-meta .user-name-text {
  color: #493521 !important;
}

.town-route-thread .resident-reply-meta .user-level-badge {
  border: 1px solid rgba(126, 87, 44, .34);
  background: rgba(224, 195, 137, .4);
  color: #6f5639;
}

.town-route-thread .resident-reply-meta > span:not(.tag) {
  color: #7a6448;
}

.town-route-thread .resident-reply-bubble {
  padding: 11px 4px 38px !important;
  color: #493521 !important;
}

.town-route-thread .resident-reply-layout.has-owner-stamp .resident-reply-bubble,
.town-route-thread .resident-reply-layout.has-admin-stamp .resident-reply-bubble {
  padding-bottom: 56px !important;
}

.town-route-thread .resident-reply-layout.has-message-controls.has-owner-stamp .resident-reply-bubble,
.town-route-thread .resident-reply-layout.has-message-controls.has-admin-stamp .resident-reply-bubble {
  padding-bottom: 102px !important;
}

.town-route-thread .resident-reply-layout .resident-reply-bubble .message-reply-context {
  border-radius: 3px;
  background: rgba(226, 199, 144, .34) !important;
  color: #725a3d !important;
}

.town-route-thread .resident-reply-layout .resident-reply-bubble .message-reply-button {
  color: #765b3b;
}

.town-route-thread .resident-reply-layout .resident-reply-bubble .message-reply-button:hover,
.town-route-thread .resident-reply-layout .resident-reply-bubble .message-reply-button:focus-visible {
  border-color: #9b7545;
  background: #f6e5b9;
  color: #493521;
}

/* Embedded destination documents scroll only inside the stage modal. */

html.town-embedded-content,
html.town-embedded-content body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: transparent !important;
}

html.town-embedded-content body {
  display: block;
}

html.town-embedded-content .site-shell {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: transparent !important;
  box-shadow: none;
}

/*
 * NEWS and SETTING are already framed by the generated town modal board.
 * Remove every piece of legacy page chrome at the iframe boundary so the
 * illustrated gold edge is the only visible outer frame.
 */
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]),
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .site-shell,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .page-grid,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) main.content,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .content-inner {
  border: 0 !important;
  border-image: none !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .site-shell::before,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .site-shell::after,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .page-grid::before,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .page-grid::after,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) main.content::before,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) main.content::after,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .content-inner::before,
html.town-embedded-content body:is([data-page="news"], [data-page="setting"]) .content-inner::after {
  display: none !important;
  content: none !important;
}

html.town-embedded-content.town-route-settings,
html.town-embedded-content.town-route-settings body,
html.town-embedded-content.town-route-settings .site-shell {
  background: transparent !important;
}

html.town-embedded-content.town-route-settings .content-inner {
  padding: 5px 7px 12px !important;
  font-size: 10px;
}

html.town-embedded-content.town-route-settings .my-page-setting-grid,
html.town-embedded-content.town-route-settings .setting-grid {
  gap: 5px !important;
}

html.town-embedded-content.town-route-settings .setting-panel {
  margin: 0 0 2px !important;
}

html.town-embedded-content.town-route-settings .setting-panel > .setting-title,
html.town-embedded-content.town-route-settings .setting-panel > .panel-title {
  padding: 6px 8px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
}

html.town-embedded-content.town-route-settings .setting-panel > .setting-body,
html.town-embedded-content.town-route-settings .setting-panel > .panel-body {
  padding: 7px 8px !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel {
  gap: 6px !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel .resident-state-note {
  margin: 3px 0 !important;
  padding: 6px 8px !important;
  line-height: 1.3 !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel .resident-form {
  gap: 6px !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel .resident-form label {
  gap: 2px !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel .resident-form input {
  min-height: 36px !important;
  padding: 5px 8px !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel .resident-button {
  min-height: 36px !important;
  padding: 6px 9px !important;
}

html.town-embedded-content.town-route-settings .resident-login-panel .resident-form-error {
  min-height: 10px !important;
  font-size: 9px !important;
  line-height: 1.1 !important;
}

html.town-embedded-content.town-route-settings .town-sound-setting-fields {
  gap: 3px !important;
}

html.town-embedded-content.town-route-settings .town-sound-setting-row {
  gap: 4px !important;
}

html.town-embedded-content.town-route-settings .town-sound-setting-row button {
  min-height: 22px !important;
}

html.town-embedded-content.town-route-settings .town-shortcut-setting-panel .panel-body {
  padding: 5px !important;
}

html.town-embedded-content.town-route-settings .town-shortcut-setting-note {
  margin-bottom: 2px !important;
  line-height: 1.2 !important;
}

html.town-embedded-content.town-route-settings .town-shortcut-setting-fields {
  gap: 3px !important;
}

html.town-embedded-content.town-route-settings .town-shortcut-setting-fields label {
  gap: 1px !important;
}

html.town-embedded-content.town-route-settings .town-shortcut-setting-fields select {
  min-height: 24px !important;
  padding-block: 2px !important;
}

html.town-embedded-content body[data-page="cards"],
html.town-embedded-content body[data-page="cards"] .site-shell,
html.town-embedded-content body[data-page="cards"] .page-grid,
html.town-embedded-content body[data-page="cards"] .content,
html.town-embedded-content body[data-page="cards"] .content-inner {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

html.town-embedded-content body[data-page="cards"] .top-title,
html.town-embedded-content body[data-page="cards"] .ticker,
html.town-embedded-content body[data-page="cards"] .nav-bar,
html.town-embedded-content body[data-page="cards"] .sidebar,
html.town-embedded-content body[data-page="cards"] .content-head,
html.town-embedded-content body[data-page="cards"] .card-folder-launch,
html.town-embedded-content body[data-page="cards"] .footer {
  display: none !important;
}

html.town-embedded-content .town-fixed-ui,
html.town-embedded-content .resident-launcher,
html.town-embedded-content .floating-card-folder {
  display: none !important;
}

html.town-embedded-content.town-route-content .content-inner,
html.town-embedded-content.town-route-thread .content-inner {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: clamp(10px, 2.8vw, 24px) clamp(9px, 2.6vw, 22px) clamp(28px, 7vw, 60px) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.town-embedded-content.town-route-content .content-inner > .page-title {
  margin: 0 0 clamp(8px, 2.4vw, 18px);
  padding: clamp(8px, 2.4vw, 16px) 0;
  border: 0;
  border-bottom: 1px solid rgba(123, 88, 46, .38);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html.town-embedded-content.town-route-content .content-inner > .panel,
html.town-embedded-content.town-route-content .content-inner > .my-page-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html.town-embedded-content.town-route-content .content-inner > .panel > .panel-title,
html.town-embedded-content.town-route-content .content-inner > .my-page-section > .my-page-section-title {
  padding-right: 0;
  padding-left: 0;
  border-bottom-color: rgba(123, 88, 46, .38);
  background: transparent;
}

html.town-embedded-content.town-route-content .content-inner > .panel > .panel-body {
  padding-right: 0;
  padding-left: 0;
}

/* A thread keeps only its title card and each individual reply card.
   The route, conversation group and message list must never add a second pedestal. */
html.town-embedded-content.town-route-thread body .site-shell,
html.town-embedded-content.town-route-thread body .page-grid,
html.town-embedded-content.town-route-thread body main.content,
html.town-embedded-content.town-route-thread body .content-inner,
html.town-embedded-content.town-route-thread body .panel.resident-conversation-panel,
html.town-embedded-content.town-route-thread body .panel.resident-conversation-panel > .panel-body,
html.town-embedded-content.town-route-thread body .message-list.resident-conversation-list {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.town-embedded-content.town-route-thread body .panel.resident-conversation-panel > .panel-body {
  padding: 0 !important;
}

/* The original CARD BINDER stays intact, but is fitted inside the town stage and
   uses the town's parchment/brass balance. The hanging top-right sign owns Back. */
html.town-embedded-content body[data-page="cards"] .card-folder-binder-modal {
  box-sizing: border-box !important;
  align-items: center !important;
  padding: 17% 3.5% 8% !important;
  background: transparent !important;
  backdrop-filter: none !important;
  --card-folder-accent: #986f3d;
  --card-folder-accent-text: #fff8df;
  --card-folder-surface: rgba(226, 232, 235, .82);
  --card-folder-text: #26333d;
  --card-folder-action: #8a6f65;
  --card-folder-shell: rgba(67, 70, 82, .9);
  --card-folder-shell-2: rgba(25, 37, 48, .95);
  --card-folder-shell-text: #f8f3e7;
  --card-folder-shell-border: rgba(199, 172, 132, .84);
  --card-folder-page-surface: rgba(244, 242, 233, .88);
  --card-folder-page-surface-2: rgba(210, 214, 214, .82);
  --card-folder-pocket-surface: rgba(255, 255, 252, .7);
  --card-folder-pocket-border: rgba(83, 90, 99, .34);
}

html.town-embedded-content body[data-page="cards"] .card-folder-binder-window,
html.town-embedded-content body[data-page="cards"] .card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-binder-window {
  box-sizing: border-box !important;
  width: 94% !important;
  max-width: 94% !important;
  max-height: 100% !important;
  padding: 3.4% !important;
  border: max(1px, .38cqw) solid rgba(199, 172, 132, .88) !important;
  border-radius: 4.2cqw !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.2), transparent 30%),
    linear-gradient(180deg, rgba(77,78,91,.9), rgba(24,36,48,.95)) !important;
  color: #f8f3e7 !important;
  box-shadow:
    0 3.4cqw 8cqw rgba(8, 16, 18, .42),
    inset 0 0 0 .25cqw rgba(232, 217, 190, .24) !important;
  -webkit-backdrop-filter: blur(10px) saturate(.88) !important;
  backdrop-filter: blur(10px) saturate(.88) !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-binder-close {
  display: none !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-binder-head {
  display: none !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-spread,
html.town-embedded-content body[data-page="cards"] .card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-spread {
  height: min(48dvh, 60cqw) !important;
  border-color: rgba(113, 109, 103, .45) !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,.2), transparent 9%),
    linear-gradient(180deg, rgba(248,247,240,.94), rgba(207,211,211,.9)) !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-binder-head p,
html.town-embedded-content body[data-page="cards"] .card-folder-binder-head h2 {
  color: #fff0c9 !important;
}

/* Favorite selection uses the whole card as the button. A badge over the art
   hides the card that the Resident is trying to identify. */
html.town-embedded-content body[data-page="cards"] .card-folder-grid.is-picker .card-folder-picker-badge {
  display: none !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-picker-message {
  display: grid !important;
  place-items: center !important;
  min-height: clamp(28px, 7cqw, 44px) !important;
  margin: 0 0 2.5% !important;
  padding: 0 4% !important;
  color: #fff0c9 !important;
  font: 800 clamp(10px, 2.8cqw, 15px)/1.25 var(--town-serif) !important;
  letter-spacing: .04em !important;
  text-align: center !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-picker-message[hidden] {
  display: none !important;
}

html.town-embedded-content body[data-page="cards"] .card-folder-grid.is-picker .card-folder-pocket.is-picker-card:not(:disabled) {
  border-color: rgba(126, 91, 47, .72) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .48),
    0 1.6cqw 3.2cqw rgba(37, 31, 25, .18) !important;
}

/* The card detail is a child view of the Binder, not another full-screen town
   modal. It stays below the hanging rail and lets that rail own Back. */
html.town-embedded-content body[data-page="cards"] .status-card-modal {
  box-sizing: border-box !important;
  place-items: center !important;
  padding: 23% 11% 8% !important;
  background: rgba(8, 18, 25, .42) !important;
  -webkit-backdrop-filter: blur(5px) saturate(.86) !important;
  backdrop-filter: blur(5px) saturate(.86) !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__window {
  box-sizing: border-box !important;
  width: min(76%, 292px) !important;
  max-width: 292px !important;
  max-height: 68dvh !important;
  gap: 1.8cqw !important;
  padding: 3cqw !important;
  border-radius: 4cqw !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__close {
  display: none !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__head {
  gap: .8cqw !important;
  padding: 0 !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__head b {
  font-size: clamp(11px, 3.1cqw, 15px) !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__head span {
  font-size: clamp(8px, 2.35cqw, 11px) !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__stage {
  min-height: 0 !important;
  max-height: 44dvh !important;
  padding: 1.8cqw !important;
  overflow: hidden !important;
  border-radius: 3cqw !important;
}

html.town-embedded-content body[data-page="cards"] :is(
  .status-card-preview-image,
  .status-card-preview-canvas
) {
  width: min(100%, 56cqw) !important;
  max-height: min(40dvh, 74cqw) !important;
  border-radius: 2.4cqw !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__note {
  min-height: 0 !important;
  font-size: clamp(7px, 2.1cqw, 10px) !important;
}

html.town-embedded-content body[data-page="cards"] .status-card-modal__download {
  min-height: 8.5cqw !important;
  border-radius: 2.4cqw !important;
  font-size: clamp(9px, 2.5cqw, 12px) !important;
}

/* Existing Resident dialogs retain their mechanics and receive the same surface. */

.resident-overlay:not([hidden]) {
  background: rgba(9, 27, 36, .75);
}

.resident-dialog:not(.resident-dialog--card):not(.resident-dialog--persona) {
  border-color: rgba(56, 68, 84, .78);
  background: #f3f5f8;
  color: var(--town-ink);
}

.resident-dialog-head {
  border-bottom-color: rgba(47, 58, 74, .24);
  background: linear-gradient(180deg, #fff, #e5e8ee);
}

html.nassfurt-town-ui .resident-button,
html.nassfurt-town-ui button.resident-button {
  border-color: rgba(68, 77, 88, .48);
  background: linear-gradient(180deg, #ffffff, #dfe4ec);
  color: #253042;
}

.town-scene > .resident-overlay:not([hidden]) {
  display: grid !important;
  place-items: center;
  padding: 6% !important;
  background: rgba(8, 20, 28, .58);
}

.town-scene > .resident-overlay .resident-dialog:not(.resident-dialog--card):not(.resident-dialog--persona) {
  box-sizing: border-box;
  width: min(78%, 520px);
  max-height: 62%;
  overflow: hidden;
  border: clamp(1px, .38cqw, 3px) solid rgba(43, 56, 74, .78);
  border-radius: clamp(8px, 2cqw, 18px);
  background: #f3f5f8;
  color: var(--town-ink);
  box-shadow:
    0 0 0 clamp(1px, .24cqw, 3px) rgba(255, 255, 255, .95) inset,
    0 4cqw 10cqw rgba(0, 0, 0, .38);
}

.town-scene > .resident-overlay .resident-dialog-head {
  border-bottom-color: rgba(47, 58, 74, .25);
  background: linear-gradient(180deg, #fff, #e3e7ed);
}

.town-scene > .resident-overlay .resident-dialog-body {
  max-height: none;
  overflow: hidden;
}

.town-scene > .resident-overlay--persona {
  padding: 0 !important;
}

.town-scene > .resident-overlay--town-hall .resident-dialog-close {
  display: none !important;
}

.town-scene > .resident-overlay--persona .resident-dialog--persona {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: hidden !important;
}

.town-scene > .resident-overlay--persona .resident-selector {
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: 8% 4% 6%;
}

.town-scene > .resident-overlay--persona .resident-category-tabs {
  width: 92%;
}

.town-scene > .resident-overlay--persona .resident-persona-carousel {
  height: 68%;
}

.town-scene > .resident-overlay--persona .resident-persona-confirm {
  min-width: 54%;
}

/*
 * Common system-dialog shell.
 * Only nodes decorated by decorateSystemModals() receive this surface. Bespoke
 * experiences (Resident Card, persona, binder, arcade, games, etc.) never
 * receive these classes.
 */
.town-system-modal:not([hidden]) {
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  padding: 12px !important;
  background: rgba(8, 20, 28, .58) !important;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.town-system-modal-board {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: min(calc(100cqw - 24px), 440px) !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: calc(100cqw - 24px) !important;
  max-height: calc(100dvh - 24px) !important;
  aspect-ratio: 4 / 3 !important;
  margin: auto !important;
  padding:
    clamp(28px, 7cqw, 40px)
    clamp(30px, 8cqw, 46px)
    clamp(23px, 6cqw, 34px) !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background:
    url("/__resident-lab/assets/town/ui-generated/modal-board-4x3-landscape.png")
    center / 100% 100% no-repeat !important;
  color: #3d2b20 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .34));
  font-family: var(--town-serif) !important;
  text-align: center;
  animation: town-system-modal-in 320ms cubic-bezier(.2, .8, .2, 1.1) both;
}

.town-system-modal--form .town-system-modal-board,
.town-system-modal--long .town-system-modal-board {
  width: min(calc(100cqw - 20px), 480px) !important;
  max-width: calc(100cqw - 20px) !important;
}

.town-system-modal--form .town-system-modal-board {
  aspect-ratio: 6 / 5 !important;
  padding:
    clamp(25px, 6.5cqw, 36px)
    clamp(27px, 7cqw, 42px)
    clamp(22px, 5.5cqw, 32px) !important;
}

/* Registration and legacy-verification forms are short.  Their content must
 * determine the board height; a fixed canvas ratio leaves a conspicuous empty
 * lower half on phone viewports.  Other long/prompt system dialogs retain the
 * established fixed board geometry. */
.town-system-modal--form:has(.resident-form) .town-system-modal-board {
  aspect-ratio: auto !important;
}

.town-system-modal--form:has(.resident-form) .resident-dialog-body {
  flex: 0 1 auto !important;
}

.town-system-modal:has([data-account-login-feature="card-binder"]) .town-system-modal-board {
  aspect-ratio: 1 / 1 !important;
  padding:
    clamp(25px, 6.2cqw, 34px)
    clamp(27px, 7cqw, 42px)
    clamp(22px, 5.5cqw, 31px) !important;
}

.town-system-modal:has([data-account-login-feature="card-binder"]) .resident-dialog-body {
  overflow: hidden !important;
}

.town-system-modal:has(.resident-legacy-requirement) .town-system-modal-board,
.town-system-modal:has(.resident-legacy-transition-notice) .town-system-modal-board {
  aspect-ratio: 1 / 1 !important;
  padding:
    clamp(25px, 6.2cqw, 34px)
    clamp(27px, 7cqw, 42px)
    clamp(22px, 5.5cqw, 31px) !important;
}

.town-system-modal:has(.resident-migration-session-notice) .town-system-modal-board {
  aspect-ratio: 6 / 5 !important;
}

.town-system-modal:has(.resident-legacy-requirement) .resident-dialog-body,
.town-system-modal:has(.resident-legacy-transition-notice) .resident-dialog-body {
  overflow: hidden !important;
}

/* The migration form must remain reachable when iOS text sizing or page zoom
 * makes its copy taller than the illustrated board. Keep touch scrolling but
 * hide the visual scrollbar so the parchment artwork stays clean. */
.town-system-modal:has(.resident-migration-session-notice) .resident-dialog-body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.town-system-modal:has(.resident-migration-session-notice)
  .resident-dialog-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.town-system-modal-board :is(
  .resident-legacy-requirement,
  .resident-legacy-transition-notice
) {
  display: grid !important;
  gap: 6px !important;
  min-height: 0 !important;
}

.town-system-modal-board :is(
  .resident-legacy-requirement,
  .resident-legacy-transition-notice
) .resident-dialog-copy {
  margin: 0 !important;
  font-size: clamp(8px, 2.25cqw, 11px) !important;
  line-height: 1.4 !important;
}

.town-system-modal-board :is(
  .resident-legacy-requirement,
  .resident-legacy-transition-notice
) .resident-state-note,
.town-system-modal-board .resident-migration-session-notice {
  margin: 0 !important;
  padding: 6px 8px !important;
  border-width: 1px !important;
  border-radius: 5px !important;
  font-size: clamp(8px, 2.15cqw, 10px) !important;
  line-height: 1.35 !important;
}

.town-system-modal-board .resident-legacy-requirement .resident-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  margin-top: 2px !important;
}

.town-system-modal-board .resident-legacy-requirement [data-legacy-register-email] {
  grid-column: 1 / -1;
}

.town-system-modal-board :is(
  .resident-dialog-head,
  .site-dialog-head,
  .hio-confirm-modal__head,
  .personal-news-head
) {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 7px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: center !important;
}

.town-system-modal-board :is(
  .resident-dialog-head,
  .site-dialog-head,
  .hio-confirm-modal__head,
  .personal-news-head
) > :is(h1, h2, h3, strong) {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.town-system-modal-board :is(
  .resident-dialog-head h2,
  .site-dialog-head strong,
  .hio-confirm-modal__head h2,
  .passphrase-modal__window h2,
  .account-recovery-window h2,
  .personal-news-head h2
) {
  margin: 0 !important;
  color: #3d2b20 !important;
  font: 700 clamp(16px, 4.5cqw, 22px)/1.2 var(--town-serif) !important;
  letter-spacing: .05em !important;
  text-shadow: 0 1px rgba(255, 255, 255, .55) !important;
}

.town-system-modal-board :is(
  .hio-confirm-modal__head p,
  .account-recovery-kicker,
  .personal-news-head > span
) {
  margin: 0 0 2px !important;
  color: #785a34 !important;
  font: 700 clamp(8px, 2.1cqw, 11px)/1.2 var(--town-serif) !important;
  letter-spacing: .14em !important;
}

.town-system-modal-board :is(
  .resident-dialog-body,
  .site-dialog-message,
  .hio-confirm-modal__message,
  .personal-news-popup-list
) {
  min-height: 0 !important;
  color: #3d2b20 !important;
}

.town-system-modal-board .resident-dialog-body {
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-height: none !important;
  padding: 0 3px 3px !important;
  overflow: auto !important;
  background: transparent !important;
  scrollbar-width: thin;
}

.town-system-modal:not(.town-system-modal--form):not(.town-system-modal--long)
  .town-system-modal-board .resident-dialog-body {
  flex: 0 0 auto !important;
  overflow: visible !important;
}

.town-home > .town-home-counter-popup .counter-popup-close {
  display: none !important;
}

.town-system-modal-board .resident-form {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 5px !important;
}

.town-system-modal-board .resident-form label {
  gap: 2px !important;
  font-size: clamp(9px, 2.4cqw, 12px) !important;
}

.town-system-modal-board .resident-form-error {
  min-height: 1em !important;
  margin: 0 !important;
  font-size: clamp(8px, 2.1cqw, 11px) !important;
}

.town-system-modal-board .resident-thread-edit-form {
  display: grid !important;
  align-content: center !important;
  min-width: 0 !important;
}

.town-system-modal-board .resident-thread-edit-count {
  display: block;
  margin: -3px 1px 0;
  color: #725d49;
  font-size: clamp(8px, 2.1cqw, 10px);
  text-align: right;
}

.town-system-modal-board .resident-thread-edit-address-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.town-system-modal-board .resident-thread-edit-address-fields label,
.town-system-modal-board .resident-thread-edit-address-fields select {
  min-width: 0;
  width: 100%;
}

.town-system-modal-board .resident-thread-edit-service-note {
  margin: 3px 0 !important;
  font-size: clamp(9px, 2.4cqw, 12px) !important;
}

.town-system-modal-board .resident-thread-edit-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  width: 100% !important;
}

.town-system-modal-board .resident-login-choices {
  padding-top: 0 !important;
  border-top: 0 !important;
}

.town-system-modal-board .resident-actions.resident-registration-choice-actions {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
}

.town-system-modal-board .resident-registration-choice-actions .resident-button {
  width: 100% !important;
  min-height: 32px !important;
  padding-inline: 5px !important;
  font-size: clamp(8px, 2.2cqw, 11px) !important;
  white-space: nowrap !important;
}

.town-system-modal:has(.resident-mail-sent) .town-system-modal-board {
  width: min(calc(100dvw - 20px), 480px) !important;
  max-width: calc(100dvw - 20px) !important;
  aspect-ratio: 6 / 5 !important;
  padding:
    clamp(25px, 6.5cqw, 36px)
    clamp(27px, 7cqw, 42px)
    clamp(22px, 5.5cqw, 32px) !important;
}

.town-system-modal-board .resident-mail-sent {
  display: grid !important;
  gap: 5px !important;
}

.town-system-modal-board .resident-mail-sent .resident-dialog-copy {
  margin: 0 !important;
  font-size: clamp(8px, 2.25cqw, 11px) !important;
  line-height: 1.4 !important;
}

.town-system-modal-board .resident-mail-sent .resident-state-note {
  margin: 0 !important;
  padding: 6px 8px !important;
  border-width: 1px !important;
  border-radius: 5px !important;
  font-size: clamp(8px, 2.2cqw, 11px) !important;
  line-height: 1.38 !important;
}

.town-system-modal:has(.resident-mail-sent) .resident-dialog-body {
  overflow: hidden !important;
}

.town-system-modal-board :is(
  .resident-dialog-copy,
  .site-dialog-message,
  .hio-confirm-modal__message,
  .account-recovery-window > p,
  .personal-news-head p
) {
  margin: 0 0 8px !important;
  color: #3d2b20 !important;
  font: 700 clamp(10px, 2.7cqw, 14px)/1.55 var(--town-serif) !important;
}

.town-system-modal-board :is(
  .resident-dialog-close,
  .site-dialog-head [data-site-dialog-cancel],
  .passphrase-modal__close,
  .personal-news-close
) {
  display: none !important;
}

.town-system-modal-board :is(
  .resident-actions,
  .site-dialog-actions,
  .hio-confirm-modal__actions,
  .personal-news-popup-actions
) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 7px 0 0 !important;
}

.town-system-modal-board :is(
  button,
  .resident-button,
  .mini-button,
  .pixel-button,
  .hio-confirm-modal__button
) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 6px 9px !important;
  border: 1px solid rgba(91, 60, 30, .72) !important;
  border-radius: 3px !important;
  background: linear-gradient(#fffaf0, #e8d3a6) !important;
  color: #3d2b20 !important;
  box-shadow: 0 2px 0 rgba(69, 42, 20, .45) !important;
  font: 700 clamp(9px, 2.5cqw, 13px)/1.25 var(--town-serif) !important;
}

.town-system-modal-board :is(
  .resident-actions,
  .site-dialog-actions,
  .hio-confirm-modal__actions
) > :last-child {
  background: linear-gradient(#eed09a, #c99e59) !important;
}

.town-system-modal-board .site-dialog-actions button {
  white-space: nowrap !important;
}

.site-dialog-modal.is-alert .town-system-modal-board .site-dialog-actions {
  grid-template-columns: minmax(0, min(150px, 100%)) !important;
  justify-content: center !important;
}

.site-dialog-modal.is-alert .town-system-modal-board .site-dialog-actions > button {
  width: 100% !important;
}

.town-system-modal:has(.resident-thread-pin-form) .town-system-modal-board {
  width: min(calc(100dvw - 20px), 400px) !important;
  max-width: calc(100dvw - 20px) !important;
  aspect-ratio: 4 / 3 !important;
  padding:
    clamp(26px, 6.8cqw, 34px)
    clamp(27px, 7cqw, 38px)
    clamp(21px, 5.5cqw, 29px) !important;
}

.town-system-modal:has(.resident-thread-pin-form) .resident-dialog-body {
  flex: 0 0 auto !important;
  overflow: hidden !important;
}

.town-system-modal-board .resident-thread-pin-form {
  gap: 4px !important;
}

.town-system-modal-board .resident-thread-pin-form textarea {
  height: 76px !important;
  min-height: 76px !important;
  resize: none !important;
}

.town-system-modal-board .resident-thread-pin-form-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: clamp(8px, 2.1cqw, 10px) !important;
  line-height: 1.25 !important;
}

.town-system-modal-board .resident-thread-pin-form-meta > span {
  min-width: 0 !important;
  text-align: left !important;
  overflow-wrap: anywhere !important;
}

.town-system-modal-board .resident-thread-pin-form-meta > output {
  white-space: nowrap !important;
}

.town-system-modal-board .resident-thread-pin-form .resident-form-error:empty {
  display: none !important;
}

.town-system-modal-board :is(input, textarea, select) {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 32px !important;
  padding: 5px 7px !important;
  border: 1px solid rgba(91, 60, 30, .64) !important;
  border-radius: 3px !important;
  background: rgba(255, 250, 238, .82) !important;
  color: #3d2b20 !important;
  box-shadow: inset 0 1px 3px rgba(74, 45, 19, .14) !important;
}

.town-system-modal-board :is(label, dt, dd) {
  color: #3d2b20 !important;
}

.town-system-modal--personal-news .town-system-modal-board {
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
}

.town-system-modal-board .personal-news-popup-summary {
  display: grid !important;
  flex: 0 0 auto !important;
  place-items: center !important;
  gap: clamp(5px, 1.6cqw, 8px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: clamp(3px, 1.2cqw, 7px) 2px !important;
  overflow: hidden !important;
  color: #3d2b20 !important;
  text-align: center !important;
}

.town-system-modal-board .personal-news-popup-summary strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: #3d2b20 !important;
  font: 700 clamp(12px, 3.5cqw, 17px)/1.35 var(--town-serif) !important;
  overflow-wrap: anywhere !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.town-system-modal-board .personal-news-popup-summary span {
  color: #9b3d2b !important;
  font: 700 clamp(9px, 2.5cqw, 12px)/1.2 var(--town-serif) !important;
}

.town-system-modal-board .personal-news-popup-summary p {
  margin: 0 !important;
  color: #3d2b20 !important;
  font: 700 clamp(10px, 2.8cqw, 13px)/1.35 var(--town-serif) !important;
}

.town-system-modal-board .personal-news-popup-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  flex: 0 0 auto !important;
  margin-top: clamp(4px, 1.4cqw, 7px) !important;
  padding: 0 !important;
  overflow: visible !important;
}

.town-system-modal-board .personal-news-popup-actions > :first-child {
  background: linear-gradient(#eed09a, #c99e59) !important;
}

.town-system-modal-board.account-recovery-window {
  overflow: auto !important;
  scrollbar-width: thin;
}

@keyframes town-system-modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .town-system-modal-board {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .town-route-content .content-inner {
    padding-inline: 12px;
  }
}

@media (max-width: 390px) {
  .town-system-modal-board {
    width: calc(100cqw - 16px) !important;
    max-width: calc(100cqw - 16px) !important;
    padding:
      clamp(25px, 7cqw, 30px)
      clamp(24px, 7cqw, 29px)
      clamp(20px, 5.5cqw, 24px) !important;
  }

  .town-system-modal:has(.resident-thread-pin-form) .town-system-modal-board {
    width: calc(100cqw - 12px) !important;
    max-width: calc(100cqw - 12px) !important;
    padding: 24px 23px 19px !important;
  }

  .town-system-modal-board :is(
    .resident-dialog-head h2,
    .site-dialog-head strong,
    .hio-confirm-modal__head h2
  ) {
    font-size: clamp(15px, 5.2cqw, 19px) !important;
  }

  .town-system-modal-board :is(
    .resident-dialog-copy,
    .site-dialog-message,
    .hio-confirm-modal__message
  ) {
    font-size: clamp(10px, 3.2cqw, 12px) !important;
    line-height: 1.4 !important;
  }

  .town-system-modal-board :is(
    button,
    .resident-button,
    .mini-button,
    .pixel-button,
    .hio-confirm-modal__button
  ) {
    min-height: 32px !important;
    padding: 5px 6px !important;
    font-size: clamp(9px, 3cqw, 11px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .town-notice-window [data-town-notice] {
    animation: none;
    padding-left: 3%;
  }
}

/* 2026-07-26: unified town-stage overlays and persona editing */
.town-scene-ui {
  z-index: 120 !important;
}

.town-modal-layer,
.town-scene > .resident-overlay:not([hidden]) {
  background: rgba(6, 18, 27, .48) !important;
  -webkit-backdrop-filter: blur(3px) saturate(.82);
  backdrop-filter: blur(3px) saturate(.82);
  transition: background-color 220ms ease, backdrop-filter 220ms ease;
}

.town-modal-layer .town-modal-backdrop {
  background: transparent !important;
}

.town-modal-layer .town-modal-window {
  transform: translateY(12%) scale(.985);
  opacity: 0;
  transition: transform 240ms cubic-bezier(.2,.82,.2,1), opacity 190ms ease-out;
}

.town-modal-layer.is-visible .town-modal-window {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.town-modal-layer.is-closing .town-modal-window {
  transform: translateY(12%) scale(.985);
  opacity: 0;
}

.town-explore-layer::before {
  background: rgba(6, 18, 27, .48) !important;
  -webkit-backdrop-filter: blur(3px) saturate(.82);
  backdrop-filter: blur(3px) saturate(.82);
  opacity: 0;
  transition: opacity 220ms ease;
}

.town-explore-layer .town-explore-board-image,
.town-explore-layer .town-explore-board-guard,
.town-explore-layer .town-explore-copy {
  transform: translateY(-13%) scale(.985);
  opacity: 0;
  transition: transform 250ms cubic-bezier(.2,.82,.2,1), opacity 190ms ease-out;
}

.town-explore-visible .town-explore-layer::before,
.town-explore-visible .town-explore-layer .town-explore-board-image,
.town-explore-visible .town-explore-layer .town-explore-board-guard,
.town-explore-visible .town-explore-layer .town-explore-copy {
  opacity: 1;
}

.town-explore-visible .town-explore-layer .town-explore-board-image,
.town-explore-visible .town-explore-layer .town-explore-board-guard,
.town-explore-visible .town-explore-layer .town-explore-copy {
  transform: translateY(0) scale(1);
}

.town-modal-open .town-map-button,
.town-native-modal-open .town-map-button {
  pointer-events: auto !important;
}

.town-scene > .resident-overlay--persona {
  z-index: 95 !important;
  display: grid !important;
  place-items: center !important;
  padding: 17% 6% 8% !important;
  background: rgba(6, 18, 27, .48) !important;
  -webkit-backdrop-filter: blur(3px) saturate(.82);
  backdrop-filter: blur(3px) saturate(.82);
}

.town-scene > .resident-overlay--persona .resident-dialog--persona {
  width: 88% !important;
  height: 68% !important;
  max-width: 580px !important;
  max-height: 760px !important;
  overflow: hidden !important;
  border: clamp(1px,.35cqw,3px) solid rgba(220,187,116,.78) !important;
  border-radius: clamp(10px,2.2cqw,20px) !important;
  background: linear-gradient(180deg, rgba(29,57,91,.98), rgba(13,36,67,.98)) !important;
  box-shadow: 0 3cqw 9cqw rgba(0,0,0,.42) !important;
  animation: resident-town-modal-in 250ms cubic-bezier(.2,.82,.2,1) both;
}

.town-scene > .resident-overlay--persona-closing .resident-dialog--persona,
.town-scene > .resident-overlay--persona .resident-dialog--persona.is-closing {
  animation: resident-town-modal-out 230ms ease-in both;
}

@keyframes resident-town-modal-in {
  from { opacity: 0; transform: translateY(14%) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes resident-town-modal-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(14%) scale(.985); }
}

.town-scene > .resident-overlay--persona .resident-selector {
  display: grid !important;
  grid-template-rows: auto minmax(0,1fr) auto auto !important;
  gap: 2.2% !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 100% !important;
  padding: 5% 4.5% 4.5% !important;
}

.town-scene > .resident-overlay--persona .resident-category-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 1.5% !important;
  width: 100% !important;
}

.town-scene > .resident-overlay--persona .resident-category-tabs button {
  min-width: 0 !important;
  padding: .7em .15em !important;
  overflow: hidden !important;
  font-size: clamp(7px,1.85cqw,13px) !important;
  line-height: 1 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.town-scene > .resident-overlay--persona .resident-persona-carousel {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 15% minmax(0,1fr) 15% !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  touch-action: manipulation !important;
}

.town-scene > .resident-overlay--persona .resident-persona-tap-guide {
  top: 3.5% !important;
  width: 78% !important;
  padding: 2.1cqw 3cqw !important;
  font-size: clamp(11px, 3cqw, 21px) !important;
}

.town-scene > .resident-overlay--persona .resident-persona-track {
  display: grid !important;
  place-items: end center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
}

.town-scene > .resident-overlay--persona .resident-persona-track::before,
.town-scene > .resident-overlay--persona .resident-persona-track::after {
  display: none !important;
}

.town-scene > .resident-overlay--persona .resident-persona-slide {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  overflow: hidden !important;
}

.town-scene > .resident-overlay--persona .resident-persona-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  transform: scale(1.55) !important;
  transform-origin: center bottom !important;
}

.resident-persona-step {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 82%;
  margin: auto;
  border: 1px solid rgba(228,238,255,.72);
  border-radius: 50%;
  background: rgba(16,39,73,.72);
  color: #f4f7ff;
  font: 500 clamp(24px,7cqw,54px)/1 var(--town-serif, serif);
  box-shadow: 0 .7cqw 1.5cqw rgba(0,0,0,.22);
}

.town-scene > .resident-overlay--persona .resident-persona-confirm {
  min-width: 58% !important;
  margin: 0 auto !important;
}

.resident-persona-changed {
  position: absolute;
  inset: 0;
  z-index: 115;
  display: grid;
  grid-template-rows: auto auto;
  place-content: center;
  place-items: center;
  gap: 2.5cqw;
  padding: 8cqw 4cqw;
  background: rgba(6,18,27,.42);
  -webkit-backdrop-filter: blur(3px) saturate(.85);
  backdrop-filter: blur(3px) saturate(.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.resident-persona-changed.is-visible { opacity: 1; }
.resident-persona-changed img {
  width: min(78cqw, 560px);
  height: min(72cqw, 520px);
  max-height: 68%;
  object-fit: contain;
  object-position: center bottom;
  transform: scale(1.55);
  transform-origin: center bottom;
  filter: drop-shadow(0 2cqw 2.6cqw rgba(0,0,0,.38));
}
.resident-persona-changed p {
  margin: 0;
  padding: 1.6cqw 3cqw;
  border-radius: 999px;
  background: rgba(251,244,222,.94);
  color: #4d3924;
  font: 700 clamp(13px,3.2cqw,28px)/1.25 var(--town-serif, serif);
}

.thread-marker.is-first-arrival {
  animation: town-marker-pop 420ms cubic-bezier(.2,1.35,.35,1) both !important;
  transform-origin: 50% 100%;
}
@keyframes town-marker-pop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.25) rotate(-3deg); }
  68% { opacity: 1; transform: translate(-50%,-50%) scale(1.09) rotate(1deg); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); }
}

/* Restore the original thread-creation presentation before entering the new place. */
.town-scene > .thread-marker.spawning {
  z-index: 55 !important;
  transform-origin: 50% 100%;
  animation: town-thread-character-spawn 1.55s steps(6, end) both !important;
  pointer-events: none !important;
}

.town-scene > .thread-marker.spawning::before,
.town-scene > .thread-marker.spawning::after {
  content: "";
  position: absolute;
  top: calc(100% - 3.8cqw);
  left: 50%;
  z-index: 5;
  width: 8.3cqw;
  height: 8.3cqw;
  border: .38cqw solid #000;
  background:
    linear-gradient(90deg, transparent 46%, #fff 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, #fff 46% 54%, transparent 54%);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: town-thread-sparkle-burst 1.55s steps(5, end) both;
  pointer-events: none;
}

.town-scene > .thread-marker.spawning::after {
  width: 4.2cqw;
  height: 4.2cqw;
  animation-delay: .15s;
}

@keyframes town-thread-character-spawn {
  0% { opacity: 0; transform: translate(-50%,-20%) scale(.25); filter: brightness(2.2); }
  18% { opacity: 1; transform: translate(-50%,-72%) scale(1.15); }
  42% { transform: translate(-50%,-46%) scale(.94); }
  62% { transform: translate(-50%,-55%) scale(1.04); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1); filter: none; }
}

@keyframes town-thread-sparkle-burst {
  0% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(.2); }
  18% { opacity: 1; transform: translate(-50%,-50%) rotate(45deg) scale(1); }
  58% { opacity: .85; transform: translate(-50%,-50%) rotate(45deg) scale(1.28); }
  100% { opacity: 0; transform: translate(-50%,-50%) rotate(45deg) scale(1.6); }
}

/* Fine alignment requested in the current review. */
.town-enter { top: 77% !important; }
.town-enter-copy {
  padding-top: 3% !important;
  transform: translateY(.9cqw);
}
.town-home-counter-slot { gap: .7cqw !important; }
.town-home-founded,
html.nassfurt-town-ui .town-home-visitor-count {
  font-size: clamp(13px,2.68cqw,25px) !important;
  line-height: 1.12 !important;
}
.town-scene-location .announcement-copy,
.town-scene-location [data-town-location],
.announcement-copy {
  transform: translateY(.55cqw);
}

html.town-embedded-content .thread-exit-button,
html.town-embedded-content .thread-head .tag,
html.town-embedded-content .resident-thread-head .tag {
  display: none !important;
}

html.town-embedded-content body[data-page="news"] .news-item > strong > a,
html.town-embedded-content body[data-page="news"] .news-item-copy > strong > a {
  text-decoration: none !important;
}

html.town-embedded-content body[data-page="news"] .news-item-main {
  display: block;
  min-width: 0;
}

html.town-embedded-content body[data-page="news"] .news-item-copy {
  min-width: 0;
}

html.town-embedded-content body[data-page="news"] .news-item.has-news-image {
  min-height: 31cqw;
  padding-block: 3.3cqw !important;
}

html.town-embedded-content body[data-page="news"] .news-item.has-news-image .news-item-main {
  display: grid;
  grid-template-columns: minmax(82px, 31%) minmax(0, 1fr);
  align-items: center;
  gap: 3cqw;
  margin-top: 2.2cqw;
}

html.town-embedded-content body[data-page="news"] .news-image-thumbnail {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #806139;
  border-radius: 2cqw;
  background: rgba(58, 40, 21, .12);
  box-shadow: 0 1.3cqw 2.6cqw rgba(56, 39, 20, .18);
  cursor: zoom-in;
}

html.town-embedded-content body[data-page="news"] .news-image-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28cqw;
  object-fit: cover;
}

.town-news-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 7cqw;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.town-news-image-lightbox[hidden] {
  display: none;
}

.town-news-image-lightbox img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 88svh;
  border: 1px solid rgba(255, 245, 211, .82);
  border-radius: 2cqw;
  background: #f5e5bd;
  box-shadow: 0 4cqw 12cqw rgba(0, 0, 0, .45);
}

body[data-page="admin"] .admin-express-image-field {
  gap: 8px;
}

body[data-page="admin"] .admin-express-image-field > input[type="file"] {
  min-height: 44px;
  padding: 8px;
  border: 1px solid #927a5b;
  background: rgba(255, 250, 232, .72);
}

body[data-page="admin"] .admin-express-image-preview {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #927a5b;
  background: rgba(255, 248, 222, .76);
}

body[data-page="admin"] .admin-express-image-preview[hidden] {
  display: none;
}

body[data-page="admin"] .admin-express-image-preview img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  background: rgba(66, 49, 30, .08);
}

body[data-page="admin"] .admin-express-image-preview > div {
  display: grid;
  gap: 10px;
}

body[data-page="admin"] .admin-express-status {
  min-height: 2.7em;
  margin: 0;
  padding: 9px 11px;
  border-left: 4px solid #9a7438;
  background: rgba(247, 232, 191, .58);
  line-height: 1.45;
}

body[data-page="admin"] [data-admin-express-form].is-saving {
  opacity: .72;
}

@media (max-width: 520px) {
  body[data-page="admin"] .admin-express-image-preview {
    grid-template-columns: 1fr;
  }

  body[data-page="admin"] .admin-express-image-preview img {
    max-height: 220px;
  }
}

/* Keep management-only delete controls hidden in embedded TOWN views, but
   leave permission-gated reply deletion available to reply/thread owners. */
.town-scene .admin-delete-x,
.town-scene .map-delete-x,
html.town-embedded-content .admin-delete-x:not(.message-delete-x) {
  display: none !important;
}

/* District changes move the painted district and its placed inhabitants as one layer. */
.town-district-slide-stage {
  position: absolute;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  pointer-events: none;
}

.town-route-map .town-map.town-district-slide-panel {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: translate3d(0, 0, 0);
  transition: transform 260ms cubic-bezier(.35, .78, .25, 1);
  will-change: transform;
}

.town-district-slide-stage[data-direction="next"] > .is-new {
  transform: translate3d(100%, 0, 0);
}

.town-district-slide-stage[data-direction="previous"] > .is-new {
  transform: translate3d(-100%, 0, 0);
}

.town-district-slide-stage[data-direction="next"].is-active > .is-old {
  transform: translate3d(-100%, 0, 0);
}

.town-district-slide-stage[data-direction="previous"].is-active > .is-old {
  transform: translate3d(100%, 0, 0);
}

.town-district-slide-stage.is-active > .is-new {
  transform: translate3d(0, 0, 0);
}

.town-scene.is-district-sliding::before,
.town-scene.is-district-sliding > .thread-marker,
.town-scene.is-district-sliding > [data-town-hall-entrance],
.town-scene.is-district-sliding > [data-town-casino-entrance] {
  visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .town-route-map .town-map.town-district-slide-panel {
    transition-duration: 1ms;
  }
}

/* ALL NEWS / MY NEWS share the same board without introducing another page. */
.town-news-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2cqw;
  margin: 0 0 3.4cqw;
}

.town-news-tabs > button {
  position: relative;
  min-width: 0;
  min-height: 9.5cqw;
  padding: 1.8cqw 2cqw;
  border: 1px solid #8b693e;
  border-radius: 999px;
  background: rgba(247, 235, 202, .7);
  color: #674b2d;
  font: 700 clamp(11px, 3.4cqw, 24px)/1 var(--town-serif);
  letter-spacing: .04em;
  cursor: pointer;
}

.town-news-tabs > button.is-active {
  background: linear-gradient(#dfbf78, #bd8d40);
  color: #382616;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 218, .56);
}

.town-news-badge {
  position: absolute;
  top: -1.8cqw;
  right: -1.2cqw;
  display: grid;
  place-items: center;
  min-width: 5.5cqw;
  height: 5.5cqw;
  padding: 0 1.2cqw;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 999px;
  background: #a83d34;
  color: #fff7df;
  font: 800 clamp(8px, 2.1cqw, 15px)/1 var(--town-sans);
}

.town-personal-news-list {
  display: grid;
  gap: 2.5cqw;
}

.town-personal-news-item {
  display: grid;
  gap: 1cqw;
  width: 100%;
  padding: 3cqw;
  border: 1px solid #7c5a32;
  background: rgba(255, 248, 220, .9);
  color: #493521;
  font-family: var(--town-serif);
  text-align: left;
  cursor: pointer;
}

.town-personal-news-item:disabled {
  cursor: default;
}

.town-personal-news-item strong {
  font-size: clamp(12px, 3.6cqw, 25px);
}

.town-personal-news-item > span:not(.town-personal-news-meta),
.town-personal-news-status {
  font-size: clamp(10px, 2.85cqw, 20px);
  line-height: 1.55;
}

.town-personal-news-meta {
  color: #755a3a;
  font-size: clamp(9px, 2.3cqw, 17px);
}

.town-personal-news-meta b {
  display: inline-block;
  margin-right: 1em;
  padding: .25em .6em;
  background: #2e4660;
  color: #fff8e2;
}

/* Ten-character place names must stay complete at every supported width. */
.town-modal-header > strong {
  overflow: visible;
  font-size: clamp(10px, 2.55cqw, 24px);
  letter-spacing: 0;
  text-overflow: clip;
}

/* 2026-07-26 review: one consistent stage, dimmer and reusable boards. */
.town-home-character-master {
  transform: translate(1.4%, 7%);
}

.town-home-title p {
  display: block;
  width: 100%;
  font-size: clamp(8px, 1.9cqw, 18px);
  line-height: 1;
  white-space: nowrap;
}

.town-hall-dialogue {
  top: 23.2%;
}

.town-hall-menu {
  top: 68.7%;
  left: 11.5%;
  width: 77%;
  height: 28.2%;
  gap: .7cqw;
  padding: 5.4% 7.5% 5%;
  border: 0;
  border-radius: 0;
  background: url("/__resident-lab/assets/town/ui-generated/explore-board-horizontal-4x3.png") center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 .72cqw 1.4cqw rgba(42, 28, 14, .3));
}

.town-hall-menu button {
  font-size: clamp(8px, 1.48cqw, 14px);
  line-height: 1;
}

.town-modal-layer,
.town-scene > .resident-overlay:not([hidden]),
.town-explore-layer::before {
  background: rgba(6, 18, 27, .48) !important;
  -webkit-backdrop-filter: blur(3px) saturate(.82) !important;
  backdrop-filter: blur(3px) saturate(.82) !important;
}

/* Resident system dialogs live inside the town scene, but align to the viewport. */
.town-scene > .resident-overlay.town-system-modal:not([hidden]) {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  padding: 12px !important;
  align-items: center !important;
  justify-items: center !important;
}

.town-scene > .resident-overlay.town-system-modal:not([hidden]) > .town-system-modal-board {
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
}

.town-modal-layer .town-modal-backdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.town-modal-open > .town-scene-ui,
.town-arcade-open > .town-scene-ui,
.town-explore-open > .town-scene-ui {
  z-index: 160 !important;
}

.town-native-modal-open > .town-scene-ui {
  z-index: 10001 !important;
}

.town-native-modal-open .town-scene-location,
.town-native-modal-open .town-scene-admin-edit,
.town-native-modal-open .town-scene-arrows,
.town-native-modal-open .town-scene-shortcuts {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ARCADE is a town-stage modal. The entry direction follows its entrance. */
.town-arcade-layer {
  position: absolute;
  inset: 0;
  z-index: 145;
  background: rgba(6, 18, 27, .48);
  -webkit-backdrop-filter: blur(3px) saturate(.82);
  backdrop-filter: blur(3px) saturate(.82);
  pointer-events: auto;
}

.town-arcade-layer[hidden],
.town-arcade-cabinets[hidden],
.town-arcade-ranking-layer[hidden],
.town-arcade-ranking-frame[hidden] {
  display: none !important;
}

.town-arcade-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.town-arcade-window {
  position: absolute;
  inset: 17% 2.5% 7%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: transform 250ms cubic-bezier(.2,.82,.2,1), opacity 190ms ease-out;
}

.town-arcade-layer[data-town-arcade-origin="top"] .town-arcade-window {
  transform: translateY(-14%) scale(.985);
}

.town-arcade-layer[data-town-arcade-origin="bottom"] .town-arcade-window {
  transform: translateY(14%) scale(.985);
}

.town-arcade-layer.is-visible .town-arcade-window {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.town-arcade-layer.is-closing[data-town-arcade-origin="top"] .town-arcade-window {
  transform: translateY(-14%) scale(.985);
  opacity: 0;
}

.town-arcade-layer.is-closing[data-town-arcade-origin="bottom"] .town-arcade-window {
  transform: translateY(14%) scale(.985);
  opacity: 0;
}

.town-arcade-cabinets {
  position: relative;
  width: 100%;
  max-width: 100%;
  pointer-events: auto;
  filter: drop-shadow(0 1.2cqw 1.8cqw rgba(8, 17, 20, .4));
}

.town-arcade-cabinets > img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.town-arcade-cabinets > button {
  position: absolute;
  top: 1.5%;
  bottom: 1.5%;
  width: 30.5%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.town-arcade-cabinets > button:nth-of-type(1) { left: 1.2%; }
.town-arcade-cabinets > button:nth-of-type(2) { left: 34.7%; }
.town-arcade-cabinets > button:nth-of-type(3) { right: 1.2%; }

.town-arcade-cabinets > button:focus-visible {
  outline: clamp(2px, .45cqw, 4px) solid rgba(255, 235, 163, .96);
  outline-offset: clamp(-7px, -1cqw, -3px);
  border-radius: 8%;
}

.town-arcade-ranking-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  perspective: 1100px;
  pointer-events: auto;
  transition: opacity 170ms ease-out;
}

.town-arcade-ranking-layer::before {
  position: absolute;
  top: 25%;
  left: 50%;
  width: 78%;
  height: 52%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(218, 174, 76, .28), rgba(25, 104, 91, .2) 46%, transparent 72%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(.52);
  filter: blur(1.8cqw);
}

.town-arcade-ranking-layer.is-visible {
  opacity: 1;
}

.town-arcade-ranking-layer.is-visible::before {
  animation: town-arcade-ranking-glow-in 620ms cubic-bezier(.16, .82, .2, 1) both;
}

.town-arcade-ranking-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(5, 18, 43, .32);
  -webkit-backdrop-filter: blur(1.5px) saturate(.88);
  backdrop-filter: blur(1.5px) saturate(.88);
  cursor: pointer;
}

.town-arcade-ranking-layer.is-visible .town-arcade-ranking-backdrop {
  animation: town-arcade-ranking-backdrop-in 360ms ease-out both;
}

.town-arcade-ranking-frame {
  position: absolute;
  top: 14%;
  left: 7%;
  width: 86%;
  height: 82%;
  border: 0;
  background: transparent;
  outline: 0 !important;
  pointer-events: auto;
  filter: drop-shadow(0 1.2cqw 2.2cqw rgba(2, 10, 27, .38));
  transform-origin: 50% 56%;
  will-change: opacity, transform, filter;
}

.town-arcade-ranking-frame:focus,
.town-arcade-ranking-frame:focus-visible {
  outline: 0 !important;
}

.town-arcade-ranking-layer.is-visible .town-arcade-ranking-frame {
  animation: town-arcade-ranking-board-in 560ms cubic-bezier(.16, .88, .22, 1.12) both;
}

@keyframes town-arcade-ranking-board-in {
  0% {
    opacity: 0;
    transform: translateY(10%) scale(.78) rotateX(-10deg);
    filter: blur(1.4cqw) brightness(1.8) drop-shadow(0 0 0 rgba(63, 164, 255, 0));
  }
  58% {
    opacity: 1;
    transform: translateY(-1.8%) scale(1.025) rotateX(1.2deg);
    filter: blur(0) brightness(1.12) drop-shadow(0 1.8cqw 3.4cqw rgba(63, 164, 255, .42));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    filter: blur(0) brightness(1) drop-shadow(0 1.2cqw 2.2cqw rgba(2, 10, 27, .38));
  }
}

@keyframes town-arcade-ranking-glow-in {
  0% { opacity: 0; transform: translateX(-50%) scale(.52); }
  48% { opacity: 1; transform: translateX(-50%) scale(1.12); }
  100% { opacity: .54; transform: translateX(-50%) scale(1); }
}

@keyframes town-arcade-ranking-backdrop-in {
  from {
    background: rgba(5, 18, 43, 0);
    -webkit-backdrop-filter: blur(0) saturate(1);
    backdrop-filter: blur(0) saturate(1);
  }
  to {
    background: rgba(5, 18, 43, .32);
    -webkit-backdrop-filter: blur(1.5px) saturate(.88);
    backdrop-filter: blur(1.5px) saturate(.88);
  }
}

.town-arcade-open > .thread-marker,
.town-arcade-open > .resident-thread-bubble-proxy,
.town-arcade-open > .resident-map-bubble-layer,
.town-arcade-open > .town-hall-entrance,
.town-arcade-open > .town-arcade-entrance,
.town-arcade-open > .town-casino-entrance,
.town-arcade-open > .town-hall-mode {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.town-scene.town-arcade-open > .thread-marker > .thread-bubble,
.town-scene.town-arcade-open > .thread-marker > .resident-map-bubble-source {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.town-scene-ui.is-arcade-open .town-map-button,
.town-scene-ui.is-arcade-open .town-scene-location,
.town-scene-ui.is-arcade-open .town-scene-admin-edit,
.town-scene-ui.is-arcade-open .town-scene-arrows,
.town-scene-ui.is-arcade-open .town-scene-shortcuts {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Only the original ranking board is reused inside the new ARCADE modal. */
html.town-arcade-ranking-embed,
html.town-arcade-ranking-embed body {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

html.town-arcade-ranking-embed .site-shell > .top-title,
html.town-arcade-ranking-embed .site-shell > .ticker,
html.town-arcade-ranking-embed .site-shell > .nav-bar,
html.town-arcade-ranking-embed .page-grid > .sidebar,
html.town-arcade-ranking-embed main.content > .content-head,
html.town-arcade-ranking-embed .content-inner > .page-title,
html.town-arcade-ranking-embed .arcade-scene > picture,
html.town-arcade-ranking-embed .arcade-scene > [data-game-menu-trigger],
html.town-arcade-ranking-embed [data-town-fixed-ui],
html.town-arcade-ranking-embed .game-menu-close {
  display: none !important;
}

html.town-arcade-ranking-embed .site-shell,
html.town-arcade-ranking-embed .page-grid,
html.town-arcade-ranking-embed main.content,
html.town-arcade-ranking-embed .content-inner,
html.town-arcade-ranking-embed .content-inner > .panel,
html.town-arcade-ranking-embed .panel-body,
html.town-arcade-ranking-embed .arcade-scene {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.town-arcade-ranking-embed .game-menu-panel.resident-game-modal,
html.town-arcade-ranking-embed .arcade-scene.is-menu-open .game-menu-panel.resident-game-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

html.town-arcade-ranking-embed .town-ranking-stage {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: clamp(2px, .7cqh, 7px);
  width: min(98cqw, 420px, 70cqh);
  max-width: 100%;
  min-width: 0;
  animation: town-ranking-board-arrive 420ms cubic-bezier(.18, .78, .16, 1) both;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(3px, .8cqw, 7px);
  box-sizing: border-box;
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  min-height: 0;
  max-height: none;
  padding: 10.5% 13.7% 10.6% !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #f3dfaa;
  box-shadow: none !important;
  isolation: isolate;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-window::before,
html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-window::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-window::before {
  inset: 10.6% 13.7%;
  z-index: 0;
  border-radius: clamp(24px, 7cqw, 34px);
  background:
    radial-gradient(circle at 50% 0, rgba(43, 104, 91, .34), transparent 35%),
    linear-gradient(105deg, rgba(19, 62, 55, .18), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 4px),
    #060b0a;
  box-shadow:
    inset 0 0 0 1px rgba(211, 165, 67, .22),
    inset 0 0 clamp(18px, 6cqw, 30px) rgba(0, 0, 0, .72);
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-window::after {
  inset: 0;
  z-index: 10;
  box-sizing: border-box;
  background:
    url("/__resident-lab/assets/town/arcade-ranking/ranking-frame-foreground.png?v=2")
    center / 100% 100% no-repeat;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-window > * {
  position: relative;
  z-index: 1;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-menu-topline {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

html.town-arcade-ranking-embed .town-ranking-game-banner {
  display: block;
  box-sizing: border-box;
  width: calc(100% + clamp(16px, 5cqw, 24px));
  height: auto;
  max-height: none;
  margin-inline: calc(clamp(8px, 2.5cqw, 12px) * -1);
  aspect-ratio: auto;
  object-fit: contain;
  border: 1px solid rgba(207, 160, 64, .68);
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(8, 20, 17, .92),
    0 3px 8px rgba(0, 0, 0, .58);
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-menu-title-block {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: 78%;
  margin: clamp(-14px, -3cqw, -10px) 0 0;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-actions .game-play-button,
html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-actions .game-play-button:hover,
html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-actions .game-play-button:active {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-height: 0;
  aspect-ratio: 1247 / 433;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  outline-offset: 2px;
  background:
    url("/__resident-lab/assets/town/arcade-ranking/play-button.png")
    center / contain no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0;
  text-shadow: none;
  box-shadow: none !important;
  transform: none;
  transition: filter 140ms ease, transform 140ms ease;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-actions .game-play-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .town-ranking-stage > .game-menu-actions .game-play-button:active {
  filter: brightness(.92);
  transform: translateY(1px);
}

html.town-arcade-ranking-embed .resident-overlay {
  z-index: 10080 !important;
}

html.town-arcade-ranking-embed .game-menu-kicker {
  display: none;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-rank-preview {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: clamp(3px, .85cqw, 6px);
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  background: transparent !important;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-rank-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2px, .7cqw, 5px) !important;
  margin: 0;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-rank-tabs .rank-tab {
  min-width: 0;
  min-height: clamp(20px, 5.5cqw, 25px);
  padding: 2px 2px !important;
  border: 1px solid #b88938 !important;
  border-radius: 3px !important;
  background: linear-gradient(180deg, #153c38, #081d1b) !important;
  color: #eed9a3 !important;
  font-size: clamp(6.5px, 2cqw, 9px) !important;
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(6, 12, 10, .75);
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-rank-tabs .rank-tab.is-active {
  border-color: #f0c769;
  background: linear-gradient(180deg, #d4a94d, #8d6223) !important;
  color: #071514 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 144, .48),
    0 0 7px rgba(223, 171, 67, .38);
}

html.town-arcade-ranking-embed .game-rank-tournament-meta,
html.town-arcade-ranking-embed .town-game-rank-period-meta {
  position: relative;
  overflow: hidden;
  justify-self: center;
  grid-template-columns: clamp(20px, 5.4cqw, 25px) minmax(0, 1fr) clamp(20px, 5.4cqw, 25px);
  gap: 3px;
  width: calc(100% - 8px);
  min-height: clamp(24px, 6.5cqw, 30px);
  padding: 1px 3px;
  border: 1px solid #9d7735 !important;
  border-radius: 3px;
  background: linear-gradient(180deg, #173936, #071817) !important;
  color: #efdda9;
  box-shadow: inset 0 0 0 1px rgba(4, 9, 8, .72);
}

html.town-arcade-ranking-embed .town-game-rank-period-meta::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .72) 48%, transparent 66%);
  transform: translateX(-130%);
  animation: town-ranking-period-glint 700ms 180ms ease-out both;
}

html.town-arcade-ranking-embed .town-game-rank-period-meta .game-rank-page-button {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 19px;
  border: 1px solid #b88938;
  border-radius: 2px;
  background: #0b2926;
  color: #e9cf8c;
  font-size: clamp(14px, 3.7cqw, 19px);
}

html.town-arcade-ranking-embed .town-game-rank-period-meta .game-rank-page-button:disabled {
  opacity: .25;
}

html.town-arcade-ranking-embed .game-rank-tournament-title {
  color: #f1dda7;
  font-size: clamp(8px, 2.35cqw, 11px);
  font-weight: 900;
}

html.town-arcade-ranking-embed .game-rank-tournament-subtitle {
  color: #bda976;
  font-size: clamp(6px, 1.8cqw, 8px);
  font-weight: 800;
}

html.town-arcade-ranking-embed .game-rank-note {
  color: #bda976;
  font-size: clamp(6px, 1.7cqw, 8px);
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal .game-rank-list.resident-ranking-board {
  --town-ranking-row-gap: clamp(2px, .65cqw, 4px);
  --town-ranking-row-height: clamp(46px, 14.2cqw, 60px);
  box-sizing: border-box;
  display: grid;
  align-content: start;
  gap: var(--town-ranking-row-gap) !important;
  width: 100%;
  height: min(
    100%,
    calc(
      var(--town-ranking-row-height) + var(--town-ranking-row-height)
      + var(--town-ranking-row-height) + var(--town-ranking-row-height)
      + var(--town-ranking-row-gap) + var(--town-ranking-row-gap)
      + var(--town-ranking-row-gap)
      + clamp(7px, 1.8cqw, 9px)
    )
  );
  max-height: 100% !important;
  min-height: 0;
  padding: 1px 2px clamp(4px, 1.2cqw, 6px) !important;
  padding-right: 2px !important;
  padding-left: 2px !important;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-padding-block: 1px clamp(4px, 1.2cqw, 6px);
  overscroll-behavior: contain;
  border: 0;
  background: transparent;
}

html.town-arcade-ranking-embed body[data-page="games"] .game-menu-panel.resident-game-modal
  .game-rank-preview:has(> .town-game-rank-period-meta[hidden])
  > .game-rank-list.resident-ranking-board {
  height: calc(100% - 2px);
}

html.town-arcade-ranking-embed .game-rank-list li.resident-ranking-entry,
html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank.resident-ranking-entry {
  grid-template-columns: clamp(17px, 4.8cqw, 22px) clamp(42px, 13cqw, 55px) minmax(0, 1fr) auto !important;
  grid-template-rows: minmax(clamp(42px, 13cqw, 55px), auto) auto;
  gap: 0 clamp(3px, 1cqw, 6px) !important;
  min-height: var(--town-ranking-row-height) !important;
  padding: 2px 5px 2px 2px !important;
  border: 1px solid #8c6b31 !important;
  border-radius: 4px;
  background:
    linear-gradient(105deg, rgba(38, 91, 81, .36), transparent 60%),
    #111817 !important;
  color: #f0dfb2;
  box-shadow: 1px 1px 0 #030806;
}

html.town-arcade-ranking-embed .game-rank-list li.resident-ranking-place-1 {
  border-color: #dbb85d !important;
  background:
    linear-gradient(105deg, rgba(170, 123, 40, .34), rgba(17, 24, 23, .96) 62%),
    #111817 !important;
  box-shadow:
    0 0 7px rgba(215, 165, 63, .25),
    1px 1px 0 #030806;
}

html.town-arcade-ranking-embed .game-rank-list li.resident-ranking-place-2 {
  background: linear-gradient(105deg, rgba(96, 122, 118, .34), #111817 62%) !important;
}

html.town-arcade-ranking-embed .game-rank-list li.resident-ranking-place-3 {
  background: linear-gradient(105deg, rgba(124, 77, 38, .34), #111817 62%) !important;
}

html.town-arcade-ranking-embed .resident-ranking-number {
  color: #dcb65e !important;
  font-size: clamp(13px, 4cqw, 18px);
}

html.town-arcade-ranking-embed .resident-ranking-number::after {
  margin-top: -8px;
  color: #9f8c62;
  font-size: clamp(4px, 1.15cqw, 5.5px);
}

html.town-arcade-ranking-embed .resident-ranking-persona {
  width: clamp(42px, 13cqw, 55px);
  height: clamp(42px, 13cqw, 55px);
}

html.town-arcade-ranking-embed .town-ranking-stage:is(
  [data-town-ranking-game="run-saeki"],
  [data-town-ranking-game="tare-sauce"]
) .game-rank-list.resident-ranking-board {
  --town-ranking-row-height: clamp(44px, 14.2cqw, 60px);
}

html.town-arcade-ranking-embed .town-ranking-stage:is(
  [data-town-ranking-game="run-saeki"],
  [data-town-ranking-game="tare-sauce"]
) .game-rank-list li.resident-ranking-entry {
  grid-template-columns: clamp(17px, 4.8cqw, 22px) clamp(40px, 13cqw, 55px) minmax(0, 1fr) auto !important;
  grid-template-rows: minmax(clamp(40px, 13cqw, 55px), auto) auto;
}

html.town-arcade-ranking-embed .town-ranking-stage:is(
  [data-town-ranking-game="run-saeki"],
  [data-town-ranking-game="tare-sauce"]
) .resident-ranking-persona {
  width: clamp(40px, 13cqw, 55px);
  height: clamp(40px, 13cqw, 55px);
}

html.town-arcade-ranking-embed .resident-ranking-persona img {
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .55));
}

html.town-arcade-ranking-embed .resident-ranking-identity {
  gap: 2px;
}

html.town-arcade-ranking-embed .resident-ranking-identity strong {
  color: #fff0c7 !important;
  font-size: clamp(9px, 2.8cqw, 12px) !important;
}

html.town-arcade-ranking-embed .resident-ranking-identity small {
  padding: 1px 4px;
  border: 1px solid #8d7039;
  border-radius: 999px;
  background: #143632 !important;
  color: #dec78e !important;
  font-size: clamp(5.5px, 1.6cqw, 7px);
}

html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank .resident-ranking-identity small {
  font-size: clamp(5.5px, 1.6cqw, 7px) !important;
  line-height: 1.15;
}

html.town-arcade-ranking-embed .resident-ranking-score {
  color: #f0ca70 !important;
  font-size: clamp(8px, 2.45cqw, 11px);
}

html.town-arcade-ranking-embed .resident-ranking-details {
  margin-top: 2px;
}

html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank.resident-ranking-entry {
  grid-template-rows: minmax(0, 1fr) auto !important;
}

html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank .resident-ranking-number,
html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank .resident-ranking-persona {
  grid-row: 1 / span 2 !important;
}

html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank .resident-ranking-identity,
html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank .resident-ranking-score {
  grid-row: 1 !important;
}

html.town-arcade-ranking-embed .game-rank-list li.is-card-kuji-rank .resident-ranking-details {
  grid-row: 2 !important;
  grid-column: 3 / -1 !important;
  align-self: end;
  margin-top: 0;
}

html.town-arcade-ranking-embed .resident-ranking-details .card-kuji-rank-thumb-grid {
  grid-template-columns: repeat(10, minmax(6px, 1fr)) !important;
  gap: 1px !important;
}

html.town-arcade-ranking-embed .town-ranking-loading {
  min-height: 48px;
  place-content: center;
  color: transparent;
  font-size: 0;
  font-weight: 900;
  letter-spacing: .16em;
}

html.town-arcade-ranking-embed .game-rank-list li.town-ranking-empty {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row;
  min-height: 86px;
  place-content: center stretch;
  justify-items: center;
  gap: 5px;
  border-style: dashed !important;
  color: #bda976;
  text-align: center;
}

html.town-arcade-ranking-embed .town-ranking-empty-title {
  font-size: clamp(14px, 4cqw, 21px);
  font-weight: 1000;
  letter-spacing: .14em;
}

html.town-arcade-ranking-embed .town-ranking-empty > span:last-child {
  font-size: clamp(8px, 2.2cqw, 11px);
  font-weight: 800;
}

@keyframes town-ranking-period-glint {
  to {
    transform: translateX(130%);
  }
}

@keyframes town-ranking-board-arrive {
  from {
    opacity: 0;
    transform: translateY(4%) scale(.9);
    filter: brightness(.65);
  }

  68% {
    opacity: 1;
    transform: translateY(-.8%) scale(1.012);
    filter: brightness(1.08);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .town-arcade-ranking-layer.is-visible::before,
  .town-arcade-ranking-layer.is-visible .town-arcade-ranking-backdrop,
  .town-arcade-ranking-layer.is-visible .town-arcade-ranking-frame,
  html.town-arcade-ranking-embed .town-ranking-stage,
  html.town-arcade-ranking-embed .town-game-rank-period-meta::after {
    animation-duration: 1ms;
  }
}

html.town-embedded-content .site-dialog-modal.is-alert {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  background: rgba(6, 18, 27, .62) !important;
  -webkit-backdrop-filter: blur(4px) saturate(.82) !important;
  backdrop-filter: blur(4px) saturate(.82) !important;
  isolation: isolate;
}

html.town-embedded-content .site-dialog-modal.is-alert .town-system-modal-board {
  z-index: 1 !important;
  opacity: 1 !important;
  filter: none !important;
}

.town-local-place {
  position: absolute;
  top: 5.4%;
  right: 7.2%;
  bottom: 5.6%;
  left: 7.2%;
  z-index: 2;
  box-sizing: border-box;
  overflow: hidden;
  padding: 4.5% 4.8%;
  color: #45362b;
  font-family: var(--town-serif);
}

.town-local-place[hidden] {
  display: none !important;
}

.town-local-place-head {
  padding: 0 0 4%;
  border-bottom: 1px solid rgba(112, 79, 43, .35);
}

.town-local-place-head h1 {
  overflow: hidden;
  margin: 0 0 2.5%;
  font: 700 clamp(17px, 5.2cqw, 38px)/1.05 var(--town-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.town-local-place-head p,
.town-local-place-head small {
  display: inline;
  margin: 0;
  font-size: clamp(10px, 2.3cqw, 17px);
}

.town-local-place-head small {
  margin-left: .65em;
}

.town-local-place-messages {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 78%;
  padding-top: 4%;
}

.town-local-place-messages h2 {
  margin: 0 0 3%;
  font: 700 clamp(11px, 2.7cqw, 20px)/1 var(--town-serif);
  letter-spacing: .12em;
}

.town-local-place-list {
  overflow: auto;
  scrollbar-width: none;
}

.town-local-place-list::-webkit-scrollbar {
  display: none;
}

.town-local-place-list article,
.town-local-place-empty {
  margin: 0 0 3%;
  padding: 3.4%;
  border: 1px solid rgba(112, 79, 43, .38);
  border-radius: .45em;
  background: rgba(255, 250, 232, .48);
}

.town-local-place-list header {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  font-size: clamp(9px, 2cqw, 15px);
}

.town-local-place-list article p,
.town-local-place-empty {
  font-size: clamp(10px, 2.25cqw, 17px);
  line-height: 1.55;
  white-space: pre-wrap;
}

.town-local-place-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5%;
  padding-top: 3%;
}

.town-local-place-form label {
  display: grid;
  gap: 2%;
}

.town-local-place-form label > span {
  font-size: clamp(9px, 2cqw, 15px);
  letter-spacing: .1em;
}

.town-local-place-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 4.5em;
  resize: none;
  border: 1px solid rgba(112, 79, 43, .48);
  background: rgba(255, 252, 239, .66);
  color: inherit;
  font: clamp(10px, 2.2cqw, 16px)/1.45 var(--town-serif);
}

.town-local-place-form button {
  align-self: end;
  min-height: 2.8em;
  padding: 0 1em;
  border: 1px solid rgba(112, 79, 43, .65);
  border-radius: .35em;
  background: linear-gradient(#f5e6bd, #d8bd7d);
  color: inherit;
  font: 700 clamp(10px, 2.2cqw, 16px)/1 var(--town-serif);
}

html.town-embedded-content .site-dialog-modal.is-alert .site-dialog-head .admin-delete-x {
  display: none !important;
}

html.town-embedded-content .card-folder-binder-modal > .resident-town-binder-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

html.town-embedded-content .card-folder-binder-modal > .card-folder-binder-window {
  position: relative;
  z-index: 1;
}

html.town-embedded-content .bug-report-resolution-card {
  margin: 1.2cqw 0 3cqw;
  padding: 3.2cqw 3.5cqw 3cqw;
  border: 1px solid rgba(122, 84, 42, .64);
  border-left: .9cqw solid #9b6d37;
  border-radius: 1.2cqw;
  background: linear-gradient(180deg, rgba(255, 247, 218, .98), rgba(238, 215, 170, .98));
  box-shadow: 0 .6cqw 1.2cqw rgba(58, 38, 18, .18);
}

html.town-embedded-content .bug-report-resolution-card::before {
  display: none !important;
}

html.town-embedded-content .bug-report-resolution-head {
  margin-bottom: 1.3cqw;
  padding-bottom: 1.1cqw;
  border-bottom: 1px solid rgba(122, 84, 42, .32);
}

html.town-embedded-content .resident-reply-layout .resident-reply-bubble .message-body {
  font-size: 12px !important;
  line-height: 1.55 !important;
}

html.town-embedded-content .resident-reply-layout.has-bug-report .resident-reply-bubble {
  padding-bottom: 62px !important;
}

html.town-embedded-content .resident-reply-layout.has-bug-report .message-bug-report-status-stamp {
  right: 4px !important;
  bottom: 4px !important;
  min-width: 78px !important;
  min-height: 34px !important;
  padding: 4px 9px !important;
  font-size: 11px !important;
}
