@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/onest-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --wall: #8fa8b8;
  --wall-deep: #6f8a9c;
  --tile: #d4e0e8;
  --tile-line: rgba(255, 255, 255, 0.35);
  --mist: #eef4f8;
  --ink: #14212b;
  --muted: #4d6475;
  --accent: #7ee8d8;
  --accent-live: #9ef7c8;
  --accent-wip: #ffd76a;
  --accent-idea: #b8d9ff;
  --glass: rgba(238, 244, 248, 0.82);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Author display rules otherwise beat the UA [hidden] stylesheet. */
[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--wall);
  overflow-x: clip;
}

.bathroom {
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.bathroom[data-view="public"],
.bathroom[data-view="bathroom"],
.bathroom[data-view="visit"] {
  display: block;
  height: 100svh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.bathroom[data-view="ideas"],
.bathroom[data-view="shop"],
.bathroom[data-view="account"] {
  grid-template-rows: auto 1fr;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: auto;
}

.tile-wall {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(111, 138, 156, 0.35) 0%, rgba(79, 104, 120, 0.55) 100%),
    repeating-linear-gradient(
      90deg,
      var(--tile-line) 0,
      var(--tile-line) 1px,
      transparent 1px,
      transparent 56px
    ),
    repeating-linear-gradient(
      0deg,
      var(--tile-line) 0,
      var(--tile-line) 1px,
      transparent 1px,
      transparent 56px
    );
  background-color: var(--wall);
}

.steam {
  position: fixed;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  animation: float-steam 14s ease-in-out infinite;
}

.steam-a {
  width: 220px;
  height: 220px;
  background: #e8f6ff;
  top: 12%;
  left: 8%;
}

.steam-b {
  width: 280px;
  height: 280px;
  background: #dff4ef;
  top: 55%;
  right: 6%;
  animation-delay: -4s;
}

.steam-c {
  width: 180px;
  height: 180px;
  background: #f0f8ff;
  bottom: 8%;
  left: 42%;
  animation-delay: -8s;
}

@keyframes float-steam {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -18px, 0) scale(1.08); }
}

.chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding:
    max(0.65rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    0.65rem
    max(0.75rem, env(safe-area-inset-left, 0px));
  position: relative;
  z-index: 30;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.bathroom[data-view="bathroom"] .chrome,
.bathroom[data-view="visit"] .chrome,
.bathroom[data-view="public"] .chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(20, 33, 43, 0.5), transparent);
}

.chrome-left,
.chrome-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.chrome-left {
  flex: 1 1 auto;
}

.chrome-right {
  flex: 0 1 auto;
  max-width: 52%;
  justify-content: flex-end;
}

.chrome-center {
  display: none;
  gap: 0.85rem;
  align-items: center;
}

@media (min-width: 720px) {
  .chrome-center:not([hidden]) {
    display: flex;
  }
}

.brand-hit {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

.brand-hit .eyebrow {
  color: rgba(238, 244, 248, 0.7);
  margin-bottom: 0.15rem;
}

.brand-hit .site-title {
  color: var(--mist);
  font-size: clamp(0.95rem, 2.3vw, 1.45rem);
  line-height: 1.15;
  max-width: min(58vw, 18.5rem);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.quick-link {
  color: rgba(238, 244, 248, 0.78);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-link.is-active,
.quick-link:hover {
  color: var(--accent);
}

.burger {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(12, 22, 30, 0.35);
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--mist);
  border-radius: 2px;
}

.topbar {
  display: none;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(20, 33, 43, 0.65);
  margin-bottom: 0.35rem;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--mist);
  text-shadow: 0 2px 18px rgba(8, 16, 24, 0.25);
}

.topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.lang-switch {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(12, 22, 30, 0.28);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: rgba(238, 244, 248, 0.75);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.is-active {
  background: var(--mist);
  color: var(--ink);
}

.mail-link {
  color: rgba(238, 244, 248, 0.88);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.mail-link:hover {
  border-bottom-color: rgba(238, 244, 248, 0.55);
}

.tagline {
  padding: 0 clamp(0.85rem, 3vw, 2.5rem) 0.75rem;
  max-width: 42rem;
  color: rgba(238, 244, 248, 0.82);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.5;
  position: relative;
  z-index: 5;
}

.bathroom[data-view="public"] .tagline {
  position: absolute;
  top: 4.35rem;
  left: 0;
  right: auto;
  margin: 0;
  padding: 0 max(0.85rem, env(safe-area-inset-right, 0px)) 0 max(0.85rem, env(safe-area-inset-left, 0px));
  z-index: 6;
  /* Keep clear of the login cluster on the right. */
  max-width: min(34rem, calc(100vw - 15rem));
  pointer-events: none;
  font-size: clamp(0.8rem, 2.1vw, 1rem);
  text-shadow: 0 2px 14px rgba(8, 16, 24, 0.45);
}

.stage {
  position: relative;
  min-height: clamp(380px, 62vh, 720px);
  margin: 0 clamp(0.5rem, 2vw, 1.5rem);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 24px 60px rgba(10, 20, 30, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, rgba(143, 168, 184, 0.35), rgba(79, 104, 120, 0.5));
}

.room-loader,
.webgl-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--mist);
  background: rgba(20, 33, 43, 0.28);
}

.room-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 3px solid rgba(238, 244, 248, 0.35);
  border-top-color: var(--accent);
  animation: room-spin 0.8s linear infinite;
}

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

.webgl-fallback {
  z-index: 6;
  align-items: stretch;
  justify-content: flex-start;
  overflow: auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 6.5rem);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8.5rem);
  background: #14212b;
  color: #eef4f8;
}

.webgl-fallback[hidden],
.room-loader[hidden] {
  display: none;
}

.webgl-ideas {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  text-align: left;
}

.webgl-ideas .idea-item {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #243848;
}

.webgl-ideas .idea-item strong {
  color: #f4f8fb;
}

.webgl-ideas .idea-item p {
  color: #d5e4ee;
  margin: 0.35rem 0 0;
}

.bathroom[data-view="bathroom"] .stage,
.bathroom[data-view="visit"] .stage,
.bathroom[data-view="public"] .stage {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: visible;
}

.canvas-host {
  position: absolute;
  inset: 0;
}

.canvas-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.marker:hover,
.marker:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
  outline: none;
}

.marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-idea);
  box-shadow:
    0 0 0 6px rgba(184, 217, 255, 0.22),
    0 0 22px rgba(184, 217, 255, 0.65);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.marker-dot[data-status="live"] {
  background: var(--accent-live);
  box-shadow:
    0 0 0 6px rgba(158, 247, 200, 0.22),
    0 0 22px rgba(158, 247, 200, 0.65);
}

.marker-dot[data-status="wip"] {
  background: var(--accent-wip);
  box-shadow:
    0 0 0 6px rgba(255, 215, 106, 0.22),
    0 0 22px rgba(255, 215, 106, 0.65);
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.marker-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist);
  text-shadow: 0 2px 10px rgba(8, 16, 24, 0.45);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.marker:hover .marker-label,
.marker:focus-visible .marker-label {
  opacity: 1;
  transform: translateY(0);
}

/* Dense public restroom: smaller hit targets, labels only on hover still. */
#markers[data-density="busy"] .marker-dot {
  width: 11px;
  height: 11px;
  box-shadow:
    0 0 0 4px rgba(184, 217, 255, 0.16),
    0 0 14px rgba(184, 217, 255, 0.45);
}

#markers[data-density="packed"] .marker-dot {
  width: 8px;
  height: 8px;
  box-shadow:
    0 0 0 3px rgba(184, 217, 255, 0.12),
    0 0 10px rgba(184, 217, 255, 0.35);
  animation: none;
}

#markers[data-density="packed"] .marker-label {
  font-size: 12px;
}

.project-card {
  position: absolute;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  width: min(320px, calc(100% - 1.5rem));
  max-width: calc(100% - 1.5rem);
  padding: 1rem 1rem 1.1rem;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 16px 40px rgba(10, 20, 30, 0.22);
  z-index: 5;
  animation: card-in 0.28s ease;
}

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

.card-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.card-status {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.card-status[hidden],
.card-stack[hidden],
.card-github[hidden] {
  display: none !important;
}

.card-status[data-status="live"] { color: #1f8f62; }
.card-status[data-status="wip"] { color: #b8860b; }
.card-status[data-status="idea"] { color: #4a7fb8; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.card-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.card-stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.card-stack li {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  background: rgba(20, 33, 43, 0.07);
  color: var(--ink);
}

.card-github {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.card-github:hover {
  color: #0d5f52;
  border-bottom-color: #0d5f52;
}

.footer {
  padding: 1rem clamp(1rem, 3vw, 2.5rem) 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  color: rgba(238, 244, 248, 0.78);
  font-size: 0.86rem;
}

.bathroom[data-view="public"] .footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  margin: 0;
  padding:
    1.4rem
    max(0.85rem, env(safe-area-inset-right, 0px))
    max(0.65rem, env(safe-area-inset-bottom, 0px))
    max(0.85rem, env(safe-area-inset-left, 0px));
  background: linear-gradient(0deg, rgba(20, 33, 43, 0.42), transparent);
  /* Text is decorative; re-enable hits only on legal links below. */
  pointer-events: none;
  font-size: 0.78rem;
}

.bathroom[data-view="public"] .footer-legal,
.bathroom[data-view="public"] .footer-legal-link {
  pointer-events: auto;
  position: relative;
  z-index: 26;
}

.bathroom[data-view="public"] .footer-legal-link {
  color: rgba(238, 244, 248, 0.92);
  font-size: 0.8rem;
  padding: 0.15rem 0.1rem;
}

.footer-hint {
  opacity: 0.7;
  font-size: 0.8rem;
}

.bathroom[data-view="bathroom"] {
  grid-template-columns: 1fr;
}

.bathroom[data-view="bathroom"] .stage {
  grid-column: 1;
}

.bathroom[data-view="bathroom"] .bathroom-panel {
  display: none;
}

.bathroom[data-view="public"] .tile-wall {
  background-color: #6f8798;
}

.bathroom[data-view="bathroom"] .tile-wall {
  background-color: #8fa8b8;
}

.view-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(12, 22, 30, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.view-btn {
  border: 0;
  background: transparent;
  color: rgba(238, 244, 248, 0.75);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.view-btn.is-active {
  background: var(--mist);
  color: var(--ink);
}

.auth-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}

/* Compact guest chrome so login doesn't crush the brand / tagline. */
.bathroom[data-view="public"][data-auth="out"] .auth-block,
.bathroom[data-view="bathroom"][data-auth="out"] .auth-block,
.bathroom[data-view="visit"][data-auth="out"] .auth-block {
  gap: 0.28rem;
}

.bathroom[data-view="public"][data-auth="out"] .login-label,
.bathroom[data-view="bathroom"][data-auth="out"] .login-label,
.bathroom[data-view="visit"][data-auth="out"] .login-label {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.bathroom[data-view="public"][data-auth="out"] .auth-legal,
.bathroom[data-view="bathroom"][data-auth="out"] .auth-legal,
.bathroom[data-view="visit"][data-auth="out"] .auth-legal {
  /* Legal lives in the footer on immersive views — keep the header clean. */
  display: none;
}

.bathroom[data-view="public"][data-auth="out"] .btn-auth,
.bathroom[data-view="bathroom"][data-auth="out"] .btn-auth,
.bathroom[data-view="visit"][data-auth="out"] .btn-auth {
  min-width: 0;
  min-height: 2.05rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.74rem;
}

.bathroom[data-view="public"][data-auth="out"] .chrome-right {
  max-width: min(42%, 16rem);
}

.bathroom[data-view="public"] .project-card {
  bottom: max(4.75rem, calc(env(safe-area-inset-bottom, 0px) + 3.75rem));
  z-index: 12;
}

.login-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238, 244, 248, 0.75);
}

.auth-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.btn-auth,
.btn-toilet,
.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-toilet {
  background: var(--accent);
  color: var(--ink);
}

.btn-toilet:hover {
  transform: translateY(-1px);
  background: #9ef7e8;
}

.btn-auth {
  background: rgba(12, 22, 30, 0.35);
  color: var(--mist);
  border: 1px solid rgba(255, 255, 255, 0.22);
  min-width: 5.5rem;
}

.btn-auth:hover {
  transform: translateY(-1px);
  background: rgba(12, 22, 30, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-github:hover {
  border-color: rgba(158, 247, 200, 0.55);
}

.btn-google:hover {
  border-color: rgba(255, 215, 106, 0.55);
}

.btn-logout {
  background: rgba(12, 22, 30, 0.35);
  color: var(--mist);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--mist);
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 100%;
  min-width: 0;
}

.user-chip span,
.user-chip-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7.5rem;
}

.user-chip img {
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.card-author {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.marker-dot[data-private="true"] {
  background: #ff9fd6;
  box-shadow:
    0 0 0 6px rgba(255, 159, 214, 0.22),
    0 0 22px rgba(255, 159, 214, 0.65);
}

.bathroom-panel {
  padding: 1rem 1rem 2rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  overflow-y: auto;
  max-height: calc(100svh - 8rem);
}

.panel-head h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.panel-head p {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.idea-form {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.idea-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.idea-form input,
.idea-form textarea,
.idea-form select {
  font: inherit;
  border: 1px solid rgba(20, 33, 43, 0.15);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}

.optional-fields-hint {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
}

.optional-fields {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px dashed rgba(20, 33, 43, 0.12);
}

.optional-panel {
  display: grid;
  gap: 0.3rem;
  margin: -0.15rem 0 0.15rem 1.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.optional-panel[hidden] {
  display: none !important;
}

.related-field {
  display: grid;
  gap: 0.35rem;
}

.related-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.related-hint,
.related-empty,
.idea-related-line {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.related-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.related-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 33, 43, 0.1);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.related-chip input {
  margin: 0;
}

.idea-links {
  margin: 0.45rem 0 0.55rem;
}

.idea-links summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.idea-links .related-picker {
  margin-top: 0.45rem;
}

.btn-links {
  margin-top: 0.45rem;
  border: 1px solid rgba(20, 33, 43, 0.15);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-save {
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  background: var(--ink);
  color: var(--mist);
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.25rem;
}

.my-ideas h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

#ideas-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.idea-item {
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(20, 33, 43, 0.08);
}

.idea-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.idea-item p {
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
  line-height: 1.4;
}

.badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}

.badge.is-public {
  background: rgba(158, 247, 200, 0.35);
  color: #1a6b48;
}

.badge.is-private {
  background: rgba(255, 159, 214, 0.35);
  color: #8b3068;
}

.idea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.idea-actions button {
  border: 0;
  background: rgba(20, 33, 43, 0.08);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}

.idea-actions button:hover {
  background: rgba(20, 33, 43, 0.14);
}

#ideas-list .empty {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }

  .project-card {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }

  .marker-label {
    opacity: 1;
    transform: none;
    font-size: 12px;
  }

  .bathroom[data-view="bathroom"] {
    grid-template-columns: 1fr;
  }

  .bathroom[data-view="bathroom"] .bathroom-panel {
    grid-column: 1;
    grid-row: auto;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    max-height: none;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .view-switch {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .steam,
  .marker-dot,
  .project-card {
    animation: none !important;
  }
}

.wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(12, 22, 30, 0.35);
  border: 1px solid rgba(255, 215, 106, 0.35);
  color: #ffe9a8;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.wallet-badge:hover {
  border-color: rgba(255, 215, 106, 0.65);
  background: rgba(12, 22, 30, 0.5);
}

.wallet-badge:active {
  transform: scale(0.97);
}

.wallet-emoji {
  font-size: 1rem;
}

.wallet-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
}

.panel-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.panel-tab {
  border: 0;
  background: rgba(20, 33, 43, 0.08);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}

.panel-tab.is-active {
  background: var(--ink);
  color: var(--mist);
}

.panel-section {
  animation: card-in 0.2s ease;
}

.panel-note,
.stripe-stub-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.coin-packages {
  margin-bottom: 1rem;
}

.membership-row {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

@media (min-width: 720px) {
  .membership-row {
    grid-template-columns: 1fr 1fr;
  }
}

.flush-club-card {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(26, 107, 72, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(126, 232, 216, 0.18), rgba(255, 255, 255, 0.7));
  display: grid;
  gap: 0.45rem;
}

.flush-club-card.is-throne {
  border-color: rgba(166, 124, 42, 0.4);
  background: linear-gradient(135deg, rgba(232, 196, 120, 0.22), rgba(255, 255, 255, 0.72));
}

.flush-club-card.is-member {
  border-color: rgba(58, 168, 150, 0.5);
  background: linear-gradient(135deg, rgba(58, 168, 150, 0.16), rgba(255, 255, 255, 0.75));
}

.flush-club-card.is-throne.is-member {
  border-color: rgba(166, 124, 42, 0.55);
  background: linear-gradient(135deg, rgba(196, 150, 60, 0.2), rgba(255, 255, 255, 0.78));
}

.flush-club-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.flush-club-head strong {
  font-size: 1.05rem;
}

.flush-club-head em {
  font-style: normal;
  font-weight: 700;
  color: #1a6b48;
  font-size: 0.9rem;
}

.flush-club-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: #3aa896;
  color: #f4fffc;
}

.flush-club-card.is-throne .flush-club-badge {
  background: #a67c2a;
}

.flush-club-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.flush-club-perks {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink);
}

.flush-club-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-flush-join,
.btn-flush-manage {
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  justify-self: start;
}

.btn-flush-join {
  background: #1a6b48;
  color: #f4fffc;
  display: inline-grid;
  gap: 0.1rem;
  text-align: left;
}

.btn-flush-join.is-yearly {
  background: #145a3d;
}

.btn-flush-join small {
  font-size: 0.66rem;
  font-weight: 600;
  opacity: 0.9;
}

.btn-flush-join:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-flush-manage {
  background: rgba(20, 33, 43, 0.08);
  color: var(--ink);
}

.flush-chip {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
  background: #3aa896;
  color: #f4fffc;
  vertical-align: middle;
}

.flush-chip.is-throne {
  background: #a67c2a;
}

.account-membership {
  margin: 0.75rem 0 0.25rem;
  padding: 0.75rem 0.8rem;
  border-top: 1px solid rgba(20, 33, 43, 0.1);
  display: grid;
  gap: 0.45rem;
}

.account-membership-line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.membership-upsell-card {
  max-width: 26rem;
  display: grid;
  gap: 0.55rem;
}

.membership-upsell-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.membership-upsell-card > p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.membership-upsell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.limit-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #8a4b12;
  line-height: 1.35;
}

.limit-hint button {
  border: 0;
  background: none;
  padding: 0;
  color: #1a6b48;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.package-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pack-first-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -0.15rem 0 0.55rem;
}

.coin-pack {
  position: relative;
  flex: 1 1 110px;
  border: 1px solid rgba(20, 33, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  padding: 0.55rem 0.5rem 0.5rem;
  cursor: pointer;
  display: grid;
  gap: 0.12rem;
  text-align: left;
}

.coin-pack.is-best {
  border-color: rgba(58, 168, 150, 0.55);
  box-shadow: inset 0 0 0 1px rgba(126, 232, 216, 0.35);
  background: rgba(126, 232, 216, 0.12);
}

.pack-badge {
  position: absolute;
  top: -0.45rem;
  right: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: #3aa896;
  color: #f4fffc;
}

.coin-pack strong {
  font-size: 0.95rem;
}

.coin-pack span {
  font-size: 0.72rem;
  color: var(--muted);
}

.coin-pack em {
  font-size: 0.7rem;
  font-style: normal;
  color: #1a6b48;
  font-weight: 700;
}

.coin-pack small {
  font-size: 0.66rem;
  color: var(--muted);
}

.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.cat-btn {
  border: 0;
  background: rgba(20, 33, 43, 0.07);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.cat-btn.is-active {
  background: #c8a951;
  color: var(--ink);
}

.shop-list,
.inventory-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.shop-item,
.inventory-item {
  padding: 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(20, 33, 43, 0.08);
}

.shop-item-head {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.shop-item-head p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.shop-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.shop-swatch {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 43, 0.18);
}

.shop-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.shop-price {
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-buy,
.btn-place {
  border: 0;
  background: var(--ink);
  color: var(--mist);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-panel {
  border-top: 1px dashed rgba(20, 33, 43, 0.2);
  margin-top: 1rem;
  padding-top: 1rem;
}

.edit-toolbar {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  max-width: calc(100% - 1.5rem);
}

.camera-toolbar {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 13;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  max-width: min(22rem, calc(100% - 1.5rem));
}

.canvas-host.is-camera-move {
  cursor: grab;
}

.canvas-host.is-camera-move.is-dragging,
.canvas-host.is-camera-move:active {
  cursor: grabbing;
}

.edit-tools {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.edit-toggle,
.edit-rotate {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(12, 22, 30, 0.55);
  color: var(--mist);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.edit-toggle:hover,
.edit-rotate:hover {
  border-color: rgba(126, 232, 216, 0.55);
}

.edit-toggle.is-active {
  background: var(--accent);
  color: var(--ink);
  border-color: transparent;
}

.edit-rotate.is-lock {
  border-color: rgba(255, 215, 106, 0.55);
  background: rgba(255, 215, 106, 0.22);
  color: #ffe9a8;
}

.canvas-host.is-toilet-move {
  cursor: grab;
}

.canvas-host.is-toilet-move.is-dragging {
  cursor: grabbing;
}

.edit-hint {
  font-size: 0.72rem;
  color: rgba(238, 244, 248, 0.8);
  background: rgba(12, 22, 30, 0.4);
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
}

.camera-coach {
  position: absolute;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px) + 0.75rem);
  transform: translateX(-50%);
  z-index: 26;
  width: min(22rem, calc(100% - 1.5rem));
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  background: rgba(20, 33, 43, 0.92);
  border: 1px solid rgba(238, 244, 248, 0.18);
  box-shadow: 0 18px 48px rgba(8, 16, 24, 0.35);
  color: var(--mist);
  text-align: center;
  animation: camera-coach-in 0.45s ease both;
}

.camera-coach[hidden] {
  display: none;
}

.camera-coach-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238, 244, 248, 0.62);
  font-weight: 700;
}

.camera-coach-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.camera-coach-body {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(238, 244, 248, 0.78);
}

.camera-coach .btn-save {
  width: 100%;
  margin-top: 0;
}

@keyframes camera-coach-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.public-nudge {
  bottom: 5.5rem;
}

.canvas-host.is-edit-mode {
  cursor: grab;
}

.canvas-host.is-dragging {
  cursor: grabbing;
}

.canvas-host.is-edit-mode canvas {
  touch-action: none;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(20, 33, 43, 0.92);
  color: var(--mist);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Immersive chrome extras */
.user-chip-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(12, 22, 30, 0.35);
  color: var(--mist);
  cursor: pointer;
  font: inherit;
}

.user-chip-btn:hover {
  border-color: var(--accent);
}

.bathroom[data-view="bathroom"] .edit-toolbar,
.bathroom[data-view="public"] .edit-toolbar {
  top: 4.6rem;
  left: 0.75rem;
}

.bathroom[data-view="bathroom"] .camera-toolbar,
.bathroom[data-view="public"] .camera-toolbar,
.bathroom[data-view="visit"] .camera-toolbar {
  top: 4.6rem;
  right: 0.75rem;
}

/* Visit: keep camera clear of the guest banner on the left. */
.bathroom[data-view="visit"] .camera-toolbar {
  top: auto;
  bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.85rem));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  left: auto;
  max-width: min(92vw, 18rem);
}

/* Keep sticker controls below the camera row on the public restroom. */
.bathroom[data-view="public"] .sticker-toolbar {
  top: 7.55rem;
  right: 0.75rem;
}

.bathroom[data-view="bathroom"] .footer,
.bathroom[data-view="visit"] .footer,
.bathroom[data-view="ideas"] .footer,
.bathroom[data-view="shop"] .footer,
.bathroom[data-view="account"] .footer {
  display: none;
}

.wallet-badge {
  background: rgba(12, 22, 30, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--mist);
}

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 24, 0.45);
  z-index: 40;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, calc(100% - 2.5rem));
  background: rgba(238, 244, 248, 0.96);
  backdrop-filter: blur(16px);
  z-index: 45;
  padding: 1.25rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  box-shadow: 12px 0 40px rgba(10, 20, 30, 0.25);
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.nav-drawer-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
}

.nav-drawer-link.is-active,
.nav-drawer-link:hover {
  background: rgba(126, 232, 216, 0.22);
}

.nav-drawer-lang {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.2rem;
  border-radius: 14px;
  background: rgba(20, 33, 43, 0.08);
  width: fit-content;
  max-width: 100%;
}

.nav-drawer-lang .lang-btn {
  min-width: 2.4rem;
}

.nav-drawer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(20, 33, 43, 0.1);
}

.nav-legal-link,
.footer-legal-link,
.auth-legal-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  opacity: 0.78;
}

.nav-legal-link:hover,
.footer-legal-link:hover,
.auth-legal-link:hover {
  opacity: 1;
}

a.nav-legal-link,
a.footer-legal-link {
  color: inherit;
}

.nav-logout {
  margin-top: auto;
}

body.menu-open {
  overflow: hidden;
}

.app-page {
  position: relative;
  z-index: 8;
  padding: 4.75rem clamp(1rem, 3vw, 2rem) 2rem;
  overflow-y: auto;
}

.page-shell {
  max-width: 720px;
  margin: 0 auto;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 18px 50px rgba(10, 20, 30, 0.18);
}

.page-shell-narrow {
  max-width: 480px;
}

.page-shell-narrow:has(.friends-panel) {
  max-width: 560px;
}

.friends-panel {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px dashed rgba(20, 33, 43, 0.18);
}

.friends-head {
  margin-bottom: 0.85rem;
}

.friends-head h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
}

.friends-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.friends-form {
  margin-bottom: 1rem;
}

.friends-block {
  margin-top: 0.95rem;
}

.friends-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.friends-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(20, 33, 43, 0.1);
}

.friends-row-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.friends-row-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friends-row-user strong {
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friends-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex-shrink: 0;
}

.friends-row-actions button {
  border: 1px solid rgba(20, 33, 43, 0.16);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.32rem 0.5rem;
  border-radius: 7px;
  cursor: pointer;
}

.friends-row-actions button.is-primary {
  background: var(--ink);
  color: var(--mist);
  border-color: transparent;
}

.friends-row-actions button.is-danger {
  color: #7a2424;
  border-color: rgba(180, 60, 60, 0.3);
}

.friends-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  padding: 0.2rem 0;
}

.visit-banner {
  position: absolute;
  top: max(4.55rem, calc(env(safe-area-inset-top, 0px) + 3.55rem));
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  z-index: 28;
  max-width: min(280px, calc(100% - 1.5rem));
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(12, 22, 30, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--mist);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(10, 20, 30, 0.28);
  pointer-events: auto;
}

.visit-banner-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.visit-banner-body {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0.85;
}

.visit-banner .btn-save {
  width: 100%;
  font-size: 0.78rem;
  padding: 0.45rem 0.6rem;
}

.bathroom[data-view="visit"] .edit-toolbar,
.bathroom[data-view="visit"] .sticker-toolbar,
.bathroom[data-view="visit"] .board-open,
.bathroom[data-view="visit"] .mod-plaque,
.bathroom[data-view="visit"] #morning-banner {
  display: none !important;
}

.page-shell-leader {
  max-width: 640px;
}

.leader-me {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(126, 232, 216, 0.22);
  border: 1px solid rgba(20, 33, 43, 0.1);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.leader-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.leader-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(20, 33, 43, 0.1);
}

.leader-row.is-me {
  background: rgba(255, 215, 106, 0.22);
  border-color: rgba(180, 140, 40, 0.28);
}

.leader-rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

.leader-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.leader-user img,
.leader-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.leader-avatar-fallback {
  display: grid;
  place-items: center;
  background: rgba(20, 33, 43, 0.12);
  font-size: 1rem;
}

.leader-user strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.leader-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--ink);
  white-space: nowrap;
}

.leader-empty {
  color: var(--muted);
  font-style: italic;
  padding: 0.5rem 0.2rem;
}

.bathroom[data-view="fame"] {
  grid-template-rows: auto 1fr;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: auto;
}

.fame-weeks {
  display: grid;
  gap: 1.25rem;
}

.fame-week h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.55rem;
}

.fame-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.fame-card {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(20, 33, 43, 0.1);
}

.fame-rank {
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  padding-top: 0.15rem;
}

.fame-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.fame-body p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.fame-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(20, 33, 43, 0.7);
}

.fame-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.fame-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(20, 33, 43, 0.08);
}

.fame-empty {
  color: var(--muted);
  font-style: italic;
}

.bathroom[data-view="leaderboard"] {
  grid-template-rows: auto 1fr;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: auto;
}

.page-shell-admin {
  max-width: 920px;
}

.admin-section {
  margin-top: 1rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.admin-stat {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(20, 33, 43, 0.12);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-stat span {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.admin-stat strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-list,
.admin-idea-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.admin-list li,
.admin-idea-row {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(20, 33, 43, 0.1);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 0.86rem;
}

.admin-idea-row {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-start;
}

.admin-idea-row p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.admin-author {
  font-size: 0.75rem !important;
}

.admin-badge {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(20, 33, 43, 0.12);
  color: var(--ink);
  vertical-align: middle;
}

.admin-badge.is-public {
  background: rgba(126, 232, 216, 0.35);
}

.admin-badge.is-locked,
.badge.is-locked {
  background: rgba(180, 90, 40, 0.28);
  color: #6a3210;
}

.admin-badge.is-banned {
  background: rgba(180, 40, 40, 0.3);
  color: #6a1818;
}

.admin-warnings-toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.admin-flagged-toggle {
  margin: 0;
}

.admin-row-actions button[data-act="warn-minus"],
.admin-row-actions button[data-act="warn-plus"] {
  min-width: 2rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.admin-locked-note {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.idea-locked-line {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #8a3a18;
}

.mod-plaque {
  position: absolute;
  left: 0.85rem;
  bottom: 1rem;
  z-index: 7;
  max-width: min(240px, calc(100% - 1.7rem));
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 244, 220, 0.92);
  border: 1px solid rgba(160, 100, 40, 0.35);
  box-shadow: 0 10px 28px rgba(20, 33, 43, 0.18);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.mod-plaque.is-banned {
  background: rgba(255, 228, 228, 0.94);
  border-color: rgba(160, 50, 50, 0.4);
}

.mod-plaque-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: #5c3210;
  margin: 0 0 0.25rem;
}

.mod-plaque.is-banned .mod-plaque-title {
  color: #6a1818;
}

.mod-plaque-body {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(20, 33, 43, 0.75);
}

#app-root[data-view="bathroom"] .mod-plaque {
  bottom: 1.1rem;
}

@media (max-width: 720px) {
  .mod-plaque {
    left: 0.65rem;
    bottom: 0.75rem;
    max-width: min(200px, calc(100% - 1.3rem));
  }
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.admin-row-actions button,
.btn-ghost {
  border: 1px solid rgba(20, 33, 43, 0.18);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 7px;
  cursor: pointer;
}

.admin-row-actions button.is-danger {
  border-color: rgba(180, 60, 60, 0.35);
  color: #7a2424;
  background: rgba(255, 220, 220, 0.55);
}

.admin-grant-box,
.admin-search {
  margin-top: 1.1rem;
}

.admin-ops-status {
  margin: 0.85rem 0 1rem;
}

.admin-ops-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.admin-ops-grid article {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(20, 33, 43, 0.08);
}

.admin-ops-grid h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.admin-ops-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-ops-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.admin-ops-pill.is-on {
  background: rgba(40, 140, 90, 0.16);
  color: #1a6b48;
}

.admin-ops-pill.is-off {
  background: rgba(120, 40, 40, 0.12);
  color: #7a2424;
}

.admin-ops-help {
  margin: 0 0 1rem;
}

.admin-ops-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.4;
}

.admin-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.admin-ops-log {
  margin: 0;
  max-height: 22rem;
  overflow: auto;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(20, 33, 43, 0.92);
  color: #eef4f8;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-recent-block {
  margin-top: 1rem;
}

.admin-recent-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
  margin-bottom: 0.55rem;
}

.admin-recent-toolbar h3 {
  margin: 0;
  flex: 1 1 10rem;
  min-width: 0;
}

.admin-recent-filter {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.74rem;
  color: var(--muted);
  min-width: 9.5rem;
}

.admin-recent-filter select {
  border: 1px solid rgba(20, 33, 43, 0.18);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  max-width: 14rem;
}

.admin-list-scroll {
  max-height: min(22rem, 48vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  border: 1px solid rgba(20, 33, 43, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.45rem;
}

.admin-list-scroll li {
  background: rgba(255, 255, 255, 0.28);
}

.admin-tx-group {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(236, 244, 240, 0.95) !important;
  border-color: rgba(20, 33, 43, 0.14);
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
}

.admin-tx-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.admin-tx-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.admin-search input {
  border: 1px solid rgba(20, 33, 43, 0.18);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.55);
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.admin-empty {
  color: var(--muted);
  font-style: italic;
}

.rules-link-row {
  margin: -0.15rem 0 0.65rem;
}

.rules-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  opacity: 0.8;
}

.rules-link:hover {
  opacity: 1;
}

.rules-card {
  max-width: 420px;
}

.rules-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--ink);
  line-height: 1.4;
  font-size: 0.9rem;
}

.page-back {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.page-back:hover {
  color: var(--ink);
}

.page-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  margin-bottom: 0.35rem;
}

.page-head p {
  color: var(--muted);
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

.account-card {
  display: grid;
  gap: 1rem;
}

.account-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(20, 33, 43, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.account-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}

.account-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.account-danger {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(20, 33, 43, 0.18);
  display: grid;
  gap: 0.55rem;
}

.account-danger h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0;
}

.account-danger p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.btn-danger {
  justify-self: start;
  border: 1px solid rgba(180, 40, 40, 0.35);
  background: rgba(180, 40, 40, 0.12);
  color: #6a2218;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn-danger:hover {
  background: rgba(180, 40, 40, 0.2);
}

.legal-card {
  max-width: min(520px, 100%);
  max-height: min(78dvh, 640px);
  overflow: auto;
}

.legal-updated {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.legal-body {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.legal-body p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin: 0.35rem 0 0.15rem;
}

.auth-legal {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(238, 244, 248, 0.78);
  max-width: 16rem;
  text-align: right;
}

.auth-legal .auth-legal-link {
  color: rgba(238, 244, 248, 0.95);
  font-size: inherit;
}

#account-logout {
  justify-self: start;
}

.bathroom[data-view="ideas"] .chrome,
.bathroom[data-view="shop"] .chrome,
.bathroom[data-view="account"] .chrome,
.bathroom[data-view="admin"] .chrome {
  background: transparent;
}

.bathroom[data-view="ideas"] .brand-hit .site-title,
.bathroom[data-view="shop"] .brand-hit .site-title,
.bathroom[data-view="account"] .brand-hit .site-title {
  color: var(--ink);
}

.bathroom[data-view="ideas"] .brand-hit .eyebrow,
.bathroom[data-view="shop"] .brand-hit .eyebrow,
.bathroom[data-view="account"] .brand-hit .eyebrow {
  color: var(--muted);
}

.bathroom[data-view="ideas"] .burger,
.bathroom[data-view="shop"] .burger,
.bathroom[data-view="account"] .burger {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 33, 43, 0.12);
}

.bathroom[data-view="ideas"] .burger span,
.bathroom[data-view="shop"] .burger span,
.bathroom[data-view="account"] .burger span {
  background: var(--ink);
}

.bathroom[data-view="ideas"] .user-chip-btn,
.bathroom[data-view="shop"] .user-chip-btn,
.bathroom[data-view="account"] .user-chip-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 33, 43, 0.12);
}

.bathroom[data-view="ideas"] .wallet-badge,
.bathroom[data-view="shop"] .wallet-badge,
.bathroom[data-view="account"] .wallet-badge {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 33, 43, 0.12);
}

@media (max-width: 720px) {
  .bathroom[data-view="bathroom"] .bathroom-panel {
    display: none;
  }
}

.marker.is-secret .marker-dot,
.marker-dot[data-secret="true"] {
  background: #ffb7e2;
  opacity: 0.55;
  box-shadow: 0 0 18px rgba(255, 183, 226, 0.55);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0.35rem;
}

.btn-card {
  border: 1px solid rgba(20, 33, 43, 0.12);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.ritual-banner {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: 5.5rem;
  z-index: 28;
  width: min(280px, calc(100% - 1.5rem));
  max-width: calc(100% - 1.5rem);
  background: rgba(238, 244, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: 0 14px 40px rgba(10, 20, 30, 0.22);
}

.ritual-banner-title {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.ritual-banner-body {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.ritual-banner-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a6b48;
  margin-bottom: 0.7rem;
  line-height: 1.35;
}

.ritual-banner-risk {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a85b18;
  margin: -0.25rem 0 0.7rem;
  line-height: 1.35;
}

.ritual-banner-risk[hidden] {
  display: none !important;
}

.away-banner {
  bottom: 5.5rem;
  z-index: 29;
}

.away-list {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.away-list li {
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.35;
}

.away-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.away-actions .btn-ghost,
.away-actions .btn-save {
  flex: 1;
  min-width: 0;
}

.onboard {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(20, 33, 43, 0.45);
  padding: 1rem;
}

.onboard-card {
  width: min(440px, 100%);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.55), transparent 42%),
    rgba(238, 244, 248, 0.96);
  border-radius: 18px;
  padding: 1.25rem 1.3rem 1.15rem;
  box-shadow: 0 24px 60px rgba(10, 20, 30, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.onboard-step {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.onboard-dots {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.onboard-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: rgba(77, 100, 117, 0.28);
}

.onboard-dot.is-active {
  background: #3aa896;
  box-shadow: 0 0 0 3px rgba(126, 232, 216, 0.35);
}

.onboard-card h2 {
  font-family: var(--font-display);
  margin-bottom: 0.45rem;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
}

.onboard-card > p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.7rem;
}

.onboard-bullets {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
}

.onboard-bullets[hidden] {
  display: none !important;
}

.onboard-bullets li {
  position: relative;
  padding: 0.45rem 0.65rem 0.45rem 1.55rem;
  border-radius: 10px;
  background: rgba(126, 232, 216, 0.12);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
}

.onboard-bullets li::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 0.75rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #3aa896;
}

.onboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.onboard-actions .btn-save {
  min-width: 9rem;
}

.onboard-skip {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.45rem 0.2rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.onboard-skip:hover {
  color: var(--ink);
}

.help-tour {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(12, 22, 30, 0.35);
  color: var(--mist);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.help-tour:hover {
  background: rgba(12, 22, 30, 0.55);
  border-color: rgba(126, 232, 216, 0.55);
}

.bathroom[data-view="ideas"] .help-tour,
.bathroom[data-view="shop"] .help-tour,
.bathroom[data-view="account"] .help-tour {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 33, 43, 0.12);
  color: var(--ink);
}

.has-tip {
  position: relative;
}

.has-tip:hover,
.has-tip:focus-visible {
  z-index: 90;
}

.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 95;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(220px, calc(100vw - 1.5rem));
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: rgba(20, 33, 43, 0.94);
  color: #eef4f8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 24px rgba(10, 20, 30, 0.28);
  white-space: normal;
}

.has-tip[data-tip-side="bottom"]::after {
  bottom: auto;
  top: calc(100% + 0.45rem);
  transform: translateX(-50%) translateY(-4px);
}

.has-tip[data-tip-side="left"]::after {
  left: auto;
  right: calc(100% + 0.45rem);
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) translateX(4px);
}

.has-tip[data-tip-side="right"]::after {
  left: calc(100% + 0.45rem);
  right: auto;
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
}

.has-tip[data-tip-side="top"]::after {
  bottom: calc(100% + 0.45rem);
  top: auto;
  transform: translateX(-50%) translateY(4px);
}

.has-tip[data-tip-align="start"]::after {
  left: 0;
  right: auto;
  transform: translateX(0) translateY(4px);
}

.has-tip[data-tip-side="bottom"][data-tip-align="start"]::after {
  transform: translateX(0) translateY(-4px);
}

.has-tip[data-tip-side="top"][data-tip-align="start"]::after {
  transform: translateX(0) translateY(4px);
}

.has-tip[data-tip-align="end"]::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}

.has-tip[data-tip-side="bottom"][data-tip-align="end"]::after {
  transform: translateX(0) translateY(-4px);
}

.has-tip[data-tip-side="top"][data-tip-align="end"]::after {
  transform: translateX(0) translateY(4px);
}

.has-tip[data-tip-side="left"][data-tip-align="start"]::after,
.has-tip[data-tip-side="left"][data-tip-align="end"]::after,
.has-tip[data-tip-side="right"][data-tip-align="start"]::after,
.has-tip[data-tip-side="right"][data-tip-align="end"]::after {
  /* Side tips keep vertical centering; align only affects horizontal sides. */
  top: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .has-tip:hover::after,
  .has-tip:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .has-tip[data-tip-side="bottom"]:hover::after,
  .has-tip[data-tip-side="bottom"]:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }

  .has-tip[data-tip-side="top"]:hover::after,
  .has-tip[data-tip-side="top"]:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }

  .has-tip[data-tip-side="left"]:hover::after,
  .has-tip[data-tip-side="left"]:focus-visible::after {
    transform: translateY(-50%) translateX(0);
  }

  .has-tip[data-tip-side="right"]:hover::after,
  .has-tip[data-tip-side="right"]:focus-visible::after {
    transform: translateY(-50%) translateX(0);
  }

  .has-tip[data-tip-align="start"]:hover::after,
  .has-tip[data-tip-align="start"]:focus-visible::after,
  .has-tip[data-tip-side="bottom"][data-tip-align="start"]:hover::after,
  .has-tip[data-tip-side="bottom"][data-tip-align="start"]:focus-visible::after,
  .has-tip[data-tip-side="top"][data-tip-align="start"]:hover::after,
  .has-tip[data-tip-side="top"][data-tip-align="start"]:focus-visible::after {
    transform: translateX(0) translateY(0);
  }

  .has-tip[data-tip-align="end"]:hover::after,
  .has-tip[data-tip-align="end"]:focus-visible::after,
  .has-tip[data-tip-side="bottom"][data-tip-align="end"]:hover::after,
  .has-tip[data-tip-side="bottom"][data-tip-align="end"]:focus-visible::after,
  .has-tip[data-tip-side="top"][data-tip-align="end"]:hover::after,
  .has-tip[data-tip-side="top"][data-tip-align="end"]:focus-visible::after {
    transform: translateX(0) translateY(0);
  }

  .has-tip[data-tip-side="left"][data-tip-align="start"]:hover::after,
  .has-tip[data-tip-side="left"][data-tip-align="start"]:focus-visible::after,
  .has-tip[data-tip-side="left"][data-tip-align="end"]:hover::after,
  .has-tip[data-tip-side="left"][data-tip-align="end"]:focus-visible::after,
  .has-tip[data-tip-side="right"][data-tip-align="start"]:hover::after,
  .has-tip[data-tip-side="right"][data-tip-align="start"]:focus-visible::after,
  .has-tip[data-tip-side="right"][data-tip-align="end"]:hover::after,
  .has-tip[data-tip-side="right"][data-tip-align="end"]:focus-visible::after {
    transform: translateY(-50%) translateX(0);
  }
}

.guestbook {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding:
    max(4.8rem, calc(env(safe-area-inset-top, 0px) + 4.2rem))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.85rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  background: rgba(12, 20, 28, 0.22);
  backdrop-filter: blur(1.5px);
  animation: guestbook-scrim-in 0.35s ease both;
}

@keyframes guestbook-scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.guestbook-board {
  width: min(460px, 100%);
  max-height: min(74vh, 680px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.85rem;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255, 248, 230, 0.22), transparent 45%),
    radial-gradient(ellipse at 80% 85%, rgba(90, 55, 30, 0.18), transparent 50%),
    repeating-linear-gradient(
      118deg,
      rgba(90, 55, 30, 0.05) 0 1px,
      transparent 1px 3px
    ),
    repeating-linear-gradient(
      28deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 4px
    ),
    linear-gradient(180deg, #d2b07c 0%, #c49a62 55%, #b88955 100%);
  border: 12px solid #4a3224;
  border-radius: 6px;
  box-shadow:
    0 28px 70px rgba(8, 14, 22, 0.42),
    inset 0 0 0 2px rgba(255, 236, 200, 0.28),
    inset 0 0 40px rgba(80, 45, 20, 0.18);
  padding: 1rem 1rem 1.05rem;
  color: #2a1b12;
  overflow: hidden;
  animation: guestbook-board-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes guestbook-board-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.guestbook-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.guestbook-head-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}

.guestbook-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(42, 27, 18, 0.58);
  margin-bottom: 0.2rem;
}

.guestbook-board h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.guestbook-back,
.guestbook-clear {
  border: 1px solid rgba(42, 27, 18, 0.2);
  background: rgba(255, 248, 230, 0.82);
  color: #2a1b12;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.guestbook-back:hover,
.guestbook-clear:hover {
  background: #fff8e6;
}

.guestbook-clear {
  border-color: rgba(140, 40, 40, 0.28);
  color: #7a2424;
  background: rgba(255, 232, 228, 0.85);
}

.guestbook-clear:hover {
  background: rgba(255, 220, 214, 0.95);
}

.guestbook-notes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.65rem;
  overflow: auto;
  min-height: 0;
  padding: 0.35rem 0.2rem 0.55rem;
  align-content: start;
}

.guestbook-notes .guestbook-note {
  position: relative;
  font-size: 0.84rem;
  line-height: 1.35;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 30%),
    var(--note-color, #fff4d8);
  border: 1px solid rgba(42, 27, 18, 0.1);
  border-radius: 2px;
  padding: 0.85rem 0.7rem 0.7rem;
  box-shadow:
    0 8px 18px rgba(40, 22, 10, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.45);
  transform: rotate(var(--note-tilt, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guestbook-notes .guestbook-note:nth-child(4n + 1) { --note-color: #fff1c9; --note-tilt: -1.6deg; }
.guestbook-notes .guestbook-note:nth-child(4n + 2) { --note-color: #eaf4ff; --note-tilt: 1.4deg; }
.guestbook-notes .guestbook-note:nth-child(4n + 3) { --note-color: #ffe4ec; --note-tilt: 2deg; }
.guestbook-notes .guestbook-note:nth-child(4n + 4) { --note-color: #e8f6ea; --note-tilt: -1.1deg; }

.guestbook-notes .guestbook-note:hover {
  transform: rotate(0deg) translateY(-2px) scale(1.02);
  box-shadow:
    0 12px 24px rgba(40, 22, 10, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.guestbook-notes .guestbook-note::before {
  content: "";
  position: absolute;
  top: 0.28rem;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: -0.28rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ff8a8a, #b83a3a 55%, #6a1c1c);
  box-shadow: 0 1px 2px rgba(40, 20, 10, 0.35);
}

.guestbook-notes .guestbook-note strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(42, 27, 18, 0.55);
  margin: 0.15rem 0 0.35rem;
  font-weight: 700;
}

.guestbook-notes .guestbook-note .guestbook-note-body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  color: #2a1b12;
  word-break: break-word;
}

.guestbook-note-delete {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(42, 27, 18, 0.12);
  color: #7a2424;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.guestbook-note:hover .guestbook-note-delete,
.guestbook-note:focus-within .guestbook-note-delete {
  opacity: 1;
}

.guestbook-notes .empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.4rem 0.75rem;
  background: rgba(255, 248, 230, 0.55);
  border: 1px dashed rgba(42, 27, 18, 0.22);
  border-radius: 4px;
  transform: none;
  box-shadow: none;
  font-style: italic;
  color: rgba(42, 27, 18, 0.65);
}

.guestbook-notes .empty::before {
  display: none;
}

.guestbook-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.guestbook-form input {
  font: inherit;
  border: 1px solid rgba(42, 27, 18, 0.18);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  min-width: 0;
  background: rgba(255, 248, 230, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.guestbook-form button {
  border: 0;
  border-radius: 8px;
  background: #2a1b12;
  color: #fff8e6;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.board-open {
  position: absolute;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  z-index: 12;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(12, 22, 30, 0.55);
  color: var(--mist);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
}

.bathroom[data-view="public"] .board-open {
  bottom: max(3.2rem, calc(env(safe-area-inset-bottom, 0px) + 2.6rem));
}

.board-open:hover {
  border-color: rgba(126, 232, 216, 0.55);
}

.canvas-host.is-board-focus {
  cursor: default;
}

.canvas-host.is-sticker-focus {
  cursor: default;
}

.sticker-focus {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 42;
  display: flex;
  justify-content: center;
  padding: 0 1rem 1.25rem;
  pointer-events: none;
  animation: sticker-focus-in 0.35s ease both;
}

@keyframes sticker-focus-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sticker-focus-card {
  pointer-events: auto;
  width: min(420px, 100%);
  background: rgba(238, 244, 248, 0.94);
  border: 1px solid rgba(20, 33, 43, 0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem 0.9rem;
  box-shadow: 0 16px 40px rgba(10, 20, 30, 0.28);
  display: grid;
  gap: 0.45rem;
  backdrop-filter: blur(10px);
}

.sticker-focus-body {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
  line-height: 1.25;
  color: #14212b;
  word-break: break-word;
}

.sticker-focus-author {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(20, 33, 43, 0.58);
  text-align: right;
}

.sticker-focus-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.sticker-focus-back,
.sticker-focus-delete {
  font: inherit;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(20, 33, 43, 0.16);
  background: rgba(255, 255, 255, 0.7);
  color: #14212b;
  cursor: pointer;
}

.sticker-focus-back:hover,
.sticker-focus-delete:hover {
  border-color: rgba(126, 232, 216, 0.55);
}

.sticker-focus-delete {
  margin-right: auto;
  border-color: rgba(180, 60, 60, 0.28);
  color: #8a2a2a;
  background: rgba(255, 230, 230, 0.75);
}

.sticker-focus-delete:hover {
  border-color: rgba(180, 60, 60, 0.5);
}

.fork-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.25rem 0;
}

@media (max-width: 720px) {
  .bathroom[data-view="public"] .tagline {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    top: 4.1rem;
    max-width: min(22rem, calc(100vw - 11.5rem));
  }

  .bathroom[data-view="public"][data-auth="out"] .tagline {
    /* Guest auth takes the right side — tagline fights it on phones. */
    display: none;
  }

  .bathroom[data-view="public"][data-auth="out"] .login-label {
    display: none;
  }

  .bathroom[data-view="public"] .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }

  .bathroom[data-view="public"] .footer > p:first-child {
    order: 2;
    font-size: 12px;
    opacity: 0.75;
  }

  .bathroom[data-view="public"] .footer-legal {
    order: 1;
    justify-content: center;
    margin: 0;
  }

  .bathroom[data-view="public"] .footer .footer-hint {
    order: 3;
  }

  .ritual-banner {
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
  }

  .guestbook-board {
    max-height: min(78dvh, 620px);
    border-width: 8px;
  }

  .guestbook-notes {
    grid-template-columns: 1fr;
  }

  .guestbook-notes .guestbook-note {
    --note-tilt: 0deg;
  }

  .user-chip span,
  .user-chip-btn span {
    max-width: 5.5rem;
  }

  .chrome-right {
    max-width: 48%;
  }

  .sticker-toolbar {
    top: 4.35rem;
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    max-width: min(46vw, 11rem);
  }

  .bathroom[data-view="public"] .camera-toolbar {
    top: 4.35rem;
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    max-width: min(92vw, 18rem);
    gap: 0.35rem;
  }

  .bathroom[data-view="public"] .camera-toolbar .edit-toggle,
  .bathroom[data-view="public"] .camera-toolbar .edit-rotate {
    font-size: 0.72rem;
    padding: 0.4rem 0.6rem;
  }

  .bathroom[data-view="public"] .sticker-toolbar {
    top: 7.15rem;
    right: max(0.55rem, env(safe-area-inset-right, 0px));
  }

  .bathroom[data-view="bathroom"] .camera-toolbar,
  .bathroom[data-view="visit"] .camera-toolbar {
    top: 4.35rem;
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    max-width: min(92vw, 18rem);
  }

  .bathroom[data-view="visit"] .camera-toolbar {
    top: auto;
    bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
  }

  .visit-banner {
    left: max(0.55rem, env(safe-area-inset-left, 0px));
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    max-width: none;
    top: max(4.35rem, calc(env(safe-area-inset-top, 0px) + 3.35rem));
  }

  .sticker-cleaning {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .edit-toolbar {
    max-width: calc(100% - 1.1rem);
  }

  .bathroom[data-view="public"] .footer-hint {
    display: none;
  }
}

@media (max-width: 420px) {
  .bathroom[data-view="public"] .tagline {
    display: none;
  }

  .user-chip span,
  .user-chip-btn span {
    display: none;
  }

  .burger {
    width: 40px;
    height: 40px;
  }

  .board-open {
    font-size: 12px;
    min-height: 44px;
    padding: 0.45rem 0.65rem;
  }
}

.sticker-toolbar {
  position: absolute;
  top: 4.6rem;
  right: 0.75rem;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.sticker-cleaning {
  font-size: 0.72rem;
  color: rgba(238, 244, 248, 0.85);
  background: rgba(12, 22, 30, 0.4);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.canvas-host.is-sticker-mode {
  cursor: crosshair;
}

.sticker-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  background: rgba(20, 33, 43, 0.45);
  padding: 1rem;
}

.sticker-modal-card {
  width: min(380px, 100%);
  background: rgba(238, 244, 248, 0.96);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
  box-shadow: 0 20px 50px rgba(10, 20, 30, 0.28);
}

.sticker-modal-card h3 {
  font-family: var(--font-display);
}

.sticker-modal-card input[type="text"],
.sticker-modal-card input:not([type="hidden"]) {
  font: inherit;
  border: 1px solid rgba(20, 33, 43, 0.15);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

.sticker-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.sticker-modal-actions button[type="button"] {
  border: 1px solid rgba(20, 33, 43, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

/* Primary actions keep ink fill — don't inherit the pale cancel style above. */
.sticker-modal-actions .btn-save {
  border: 0;
  background: var(--ink);
  color: var(--mist);
  font-weight: 700;
}

.sticker-toolbar .edit-toggle.is-active {
  border-color: rgba(255, 120, 80, 0.55);
  background: rgba(255, 120, 80, 0.2);
  color: #ffe8df;
}

/* Final mobile cascade — wins over earlier base rules */
@media (max-width: 720px) {
  .sticker-toolbar {
    top: 4.35rem;
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    max-width: min(46vw, 11rem);
  }

  .bathroom[data-view="public"] .sticker-toolbar {
    top: 7.15rem;
  }

  .bathroom[data-view="public"] .camera-toolbar {
    top: 4.35rem;
    right: max(0.55rem, env(safe-area-inset-right, 0px));
    max-width: min(92vw, 18rem);
  }

  /* Guest login stack (GitHub/Google) sits in chrome — keep camera clear of it. */
  .bathroom[data-view="public"][data-auth="out"] .auth-providers {
    flex-direction: column;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 0.28rem;
  }

  .bathroom[data-view="public"][data-auth="out"] .btn-auth {
    min-width: 44px;
    min-height: 44px;
    padding: 0.32rem 0.62rem;
    font-size: 12px;
  }

  .bathroom[data-view="public"][data-auth="out"] .camera-toolbar {
    top: 7.85rem;
    gap: 0.3rem;
    flex-direction: column;
    align-items: flex-end;
    flex-wrap: nowrap;
    max-width: min(46vw, 11rem);
  }

  .bathroom[data-view="public"][data-auth="out"] .sticker-toolbar {
    top: 10.65rem;
  }

  .project-card {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
  }

  .nav-drawer {
    width: min(300px, calc(100% - 2.5rem));
  }
}

@media (max-width: 420px) {
  .sticker-toolbar {
    max-width: 42vw;
  }

  .bathroom[data-view="public"] .sticker-toolbar {
    top: 7rem;
    max-width: min(48vw, 10.5rem);
  }

  .bathroom[data-view="public"][data-auth="out"] .camera-toolbar {
    top: 7.65rem;
  }

  .bathroom[data-view="public"][data-auth="out"] .sticker-toolbar {
    top: 10.4rem;
    max-width: min(48vw, 10.5rem);
  }

  .bathroom[data-view="public"] .camera-toolbar .edit-toggle,
  .bathroom[data-view="public"] .camera-toolbar .edit-rotate {
    font-size: 12px;
    min-height: 44px;
    padding: 0.38rem 0.55rem;
  }
}


.bathroom[data-view="visit"] {
  --steam-opacity: 0.55;
}

@media (pointer: coarse) {
  .btn-auth,
  .edit-toggle,
  .edit-rotate,
  .lang-btn,
  .help-tour,
  #menu-toggle,
  .burger,
  .board-open,
  .nav-legal-link,
  .footer-legal-link {
    min-height: 44px;
    min-width: 44px;
  }

  .marker-label {
    font-size: 12px;
  }

  input,
  textarea,
  select,
  .idea-form input,
  .idea-form textarea,
  .idea-form select,
  .guestbook-form input,
  .sticker-modal-card input,
  .sticker-modal-card textarea,
  .admin-recent-filter select {
    font-size: 16px;
  }
}
.bathroom[data-view="visit"] .stage {
  inset: 0;
}
.bathroom[data-view="visit"] .tile-wall {
  opacity: 0.35;
}
.bathroom[data-view="visit"] .edit-toolbar,
.bathroom[data-view="visit"] .footer {
  display: none;
}


.card-product-badge {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f6f7e;
}

.card-fork-meta,
.idea-social-line {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.card-fork-meta[hidden] {
  display: none !important;
}

.btn-like.is-liked {
  color: #c23b6c;
  border-color: rgba(194, 59, 108, 0.35);
}

.badge.is-product {
  background: rgba(47, 111, 126, 0.12);
  color: #2f6f7e;
}

.product-idea-hint {
  margin-top: -0.2rem;
}
