/* HITOMEMO REQUIRED: before editing this file, read root HITOMEMO.md. Public mirror: /HITOMEMO.md. */
:root {
  --black: #050505;
  --ink: #111;
  --paper: #fff;
  --soft: #f4f4f4;
  --gray: #b9b9b9;
  --yellow: #ffe24a;
  --green: #d9ffe2;
  --danger: #ffeded;
}

html[data-theme] body .message.admin,
body .message.admin,
html[data-theme] body .message-list.is-chat-list .message.admin,
body .message-list.is-chat-list .message.admin {
  background: linear-gradient(180deg, #fff9d8, #fff1ab);
  color: #14100a;
  border-color: #a67400;
  box-shadow: 4px 4px 0 rgba(166, 116, 0, .28);
}

html[data-theme] body .message-list.is-chat-list .message.admin .chat-message-bubble,
body .message-list.is-chat-list .message.admin .chat-message-bubble,
html[data-theme] body .message-list.is-chat-list .message.admin .chat-sticker-unit,
body .message-list.is-chat-list .message.admin .chat-sticker-unit {
  background: rgba(255, 255, 255, .52);
  color: #14100a;
  border-color: rgba(166, 116, 0, .42);
}

html[data-theme] .game-menu-actions .mini-button.game-play-button,
.game-menu-actions .mini-button.game-play-button,
.game-menu-panel.is-card-kuji .mini-button.game-play-button {
  min-width: 118px;
  min-height: 46px;
  padding: 10px 24px;
  border: 3px solid #210000;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5656 0%, #d91717 52%, #8f0707 100%);
  color: #fff9e8;
  box-shadow:
    0 7px 0 #4a0000,
    0 14px 24px rgba(128, 0, 0, .34),
    inset 0 2px 0 rgba(255, 255, 255, .45);
  font-size: clamp(17px, 2.3vw, 24px);
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .42);
}

html[data-theme] .game-menu-actions .mini-button.game-play-button:hover,
.game-menu-actions .mini-button.game-play-button:hover {
  transform: translateY(1px);
  box-shadow:
    0 6px 0 #4a0000,
    0 12px 20px rgba(128, 0, 0, .32),
    inset 0 2px 0 rgba(255, 255, 255, .5);
}

@media (max-width: 640px) {
  html[data-theme] .game-menu-actions .mini-button.game-play-button,
  .game-menu-actions .mini-button.game-play-button {
    min-width: 92px;
    min-height: 34px;
    padding: 7px 16px;
    font-size: 15px;
  }
}

.local-point-header {
  position: relative;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  margin: -2px 0 14px;
  padding: 7px 10px;
  background: #fff;
  color: rgba(0, 0, 0, .72);
  border: 4px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 2px #000 inset;
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.local-point-header:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.local-point-header__label {
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

.local-point-header__score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  margin-left: 0;
}

.local-point-header__value {
  font-size: 12px;
  font-family: inherit;
  font-weight: inherit;
  font-variant-numeric: tabular-nums;
}

.local-point-header.is-loading .local-point-header__value,
.local-point-header.is-error .local-point-header__value {
  opacity: .65;
}

html[data-theme="retro"] .local-point-header {
  background: #fff8d6;
  color: #21386f;
  border-color: #274f9e;
  border-style: ridge;
  outline-color: #fff;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .28);
}

html[data-theme="modern"] .local-point-header {
  background: rgba(255, 255, 255, .92);
  color: #475467;
  border-color: rgba(20, 24, 32, .12);
  border-style: solid;
  border-radius: 8px;
  outline-color: transparent;
  box-shadow: 0 14px 34px rgba(20, 24, 32, .1);
  backdrop-filter: blur(12px);
}

html[data-theme="elegant"] .local-point-header {
  background: rgba(255, 250, 244, .94);
  color: #5a2848;
  border-color: rgba(83, 56, 73, .18);
  border-style: solid;
  border-radius: 8px;
  outline-color: transparent;
  box-shadow: 0 16px 36px rgba(35, 22, 41, .12);
}

html[data-theme="cute"] .local-point-header {
  background: #fff7fc;
  color: #7b7198;
  border: 2px dashed #ffb7d5;
  border-radius: 8px;
  outline-color: transparent;
  box-shadow: 0 8px 0 rgba(255, 159, 200, .34);
}

html[data-theme="taxi"] .local-point-header {
  background: #0f1219;
  color: #fffdf2;
  border: 0;
  border-radius: 8px;
  outline-color: transparent;
  box-shadow: 0 8px 0 rgba(17, 21, 28, .18);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

html[data-theme="mono"] .local-point-header {
  color: rgba(17, 17, 17, .72);
}

@media (max-width: 640px) {
  .local-point-header {
    gap: 14px;
    width: 100%;
    min-height: 28px;
    margin: -1px 0 10px;
    padding: 6px 8px;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: #111;
  color: var(--black);
  font-family: "Courier New", Courier, "Osaka-Mono", "MS Gothic", monospace;
  font-weight: 700;
  line-height: 1.25;
  image-rendering: pixelated;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

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

button {
  cursor: pointer;
}

.site-shell {
  width: min(1360px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 26px 44px;
  background:
    linear-gradient(90deg, #000 0 18px, transparent 18px calc(100% - 18px), #000 calc(100% - 18px)),
    repeating-conic-gradient(#111 0% 25%, #f4f4f4 0% 50%) 0 0 / 48px 48px;
  border-left: 3px solid #dcdcdc;
  border-right: 3px solid #dcdcdc;
  box-shadow: 0 0 0 3px #000 inset;
}

.top-title {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 24px;
  background: var(--black);
  color: #fff;
  border: 4px solid #000;
  text-align: center;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: .04em;
  line-height: 1;
}

.top-title span {
  white-space: nowrap;
}

.admin-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
  padding: 9px 12px;
  background: var(--yellow);
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-size: clamp(16px, 2.4vw, 24px);
  line-height: 1;
}

.my-page-admin-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin: 0 0 18px;
  padding: 8px 14px;
  background: var(--yellow);
  color: #000;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.my-page-admin-entry[hidden] {
  display: none;
}

.admin-mode-bar a {
  padding: 7px 10px;
  background: #fff;
  border: 3px solid #000;
  text-decoration: none;
  box-shadow: 3px 3px 0 #000;
  white-space: nowrap;
}

.theme-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: -2px 0 14px;
  padding: 7px 10px;
  background: #fff;
  border: 4px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 2px #000 inset;
  font-size: 13px;
  line-height: 1;
}

.theme-switcher span {
  margin-right: 2px;
}

.theme-switcher button {
  min-height: 28px;
  padding: 4px 8px;
  background: #fff;
  color: #000;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
}

.theme-switcher button.active {
  background: var(--yellow);
}

.ticker {
  --site-ticker-font-size: 18px;
  --site-ticker-line-height: 1;
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  padding: 8px 0;
  background: #fff;
  color: #000;
  border: 4px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 2px #000 inset;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-width: max-content;
  padding-left: 0;
  will-change: transform;
  animation: ticker-scroll var(--ticker-duration, 18s) linear infinite;
  font-size: var(--site-ticker-font-size);
  line-height: var(--site-ticker-line-height);
}

.ticker-segment {
  flex: 0 0 auto;
  padding-right: 42px;
}

.ticker-link {
  display: inline-block;
  margin-right: 42px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
}

.ticker-link:hover {
  text-decoration: underline;
}

.ticker-group {
  display: inline-block;
  margin-right: 42px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
}

.ticker-group-label {
  display: inline-block;
  margin-right: 10px;
  font-size: inherit;
  line-height: inherit;
  font-weight: 900;
}

.ticker-entry-link {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
}

.ticker-entry-link:hover {
  text-decoration: underline;
}

.ticker-separator {
  display: inline-block;
  margin: 0 10px;
  font-size: inherit;
  line-height: inherit;
}

.ticker-link.celebration {
  color: var(--yellow);
  text-shadow:
    2px 0 0 #000,
    -2px 0 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    0 0 10px var(--yellow);
}

.ticker-entry-link.celebration {
  color: inherit;
  text-shadow: inherit;
}

.ticker-link.presence {
  padding: 0 8px;
  background: #000;
  color: #fff;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(var(--ticker-loop-distance, 720px) * -1)); }
}

.nav-bar {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 24px;
  padding: 8px 10px;
  background: #fff;
  border: 4px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 2px #000 inset;
  font-size: 17px;
}

.nav-bar button {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  background: transparent;
  color: inherit;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(255, 211, 48, .35);
  user-select: none;
}

.page-grid {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 20px;
}

.sidebar {
  min-height: 840px;
  padding: 0 8px 18px;
  background: #fff;
  border: 4px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 2px #000 inset;
}

.side-head {
  height: 32px;
  margin: 0 -8px 10px;
  background: #000;
  border-bottom: 4px solid #000;
}

.side-link {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 18px 0 26px;
  background: transparent;
  color: inherit;
  border: 0;
  text-align: center;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(255, 211, 48, .35);
  user-select: none;
}

.side-link[data-nav-pressed="true"],
.nav-bar button[data-nav-pressed="true"] {
  transform: translate(1px, 1px);
  filter: brightness(.82);
}

.side-link[data-nav-loading="true"],
.nav-bar button[data-nav-loading="true"] {
  animation: nav-loading-pulse .6s ease-in-out infinite alternate;
}

@keyframes nav-loading-pulse {
  from { opacity: 1; }
  to { opacity: .45; }
}

.side-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 8px;
  background: #fff;
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
  font-size: 29px;
  line-height: 1;
}

.nav-svg {
  display: block;
  width: 48px;
  height: 48px;
  fill: #fff;
  stroke: #000;
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: miter;
  shape-rendering: crispEdges;
}

.nav-svg circle {
  fill: #000;
  stroke: #000;
}

.content {
  min-width: 0;
  background: #fff;
  border: 4px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 2px #000 inset;
}

.content-head {
  height: 30px;
  background: #000;
  border-bottom: 4px solid #000;
}

.content-inner {
  padding: 20px 28px 30px;
}

.page-title {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 4px solid #000;
  font-size: clamp(28px, 5vw, 48px);
  line-height: .95;
  letter-spacing: 0;
}

.panel {
  margin: 0 0 22px;
  background: #fff;
  border: 4px solid #000;
}

.panel-title {
  padding: 8px 12px;
  background: #000;
  color: #fff;
  font-size: 20px;
  letter-spacing: .03em;
}

.panel-body {
  padding: 16px;
}

.panel-body.tight {
  padding: 10px;
}

.setting-grid {
  display: grid;
  gap: 14px;
}

.setting-panel {
  background: #fff;
  border: 4px solid #000;
}

.setting-panel-wide {
  grid-column: 1 / -1;
}

.setting-title {
  padding: 8px 12px;
  background: #000;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

.setting-body {
  padding: 14px;
}

.setting-body .theme-switcher {
  position: static;
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.setting-body .theme-switcher span {
  display: none;
}

.setting-body .theme-switcher button {
  min-height: 34px;
  padding: 5px 10px;
}

.setting-id,
.setting-balance {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-height: 30px;
  color: rgba(17, 17, 17, .82);
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.setting-balance strong {
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  font-variant-numeric: tabular-nums;
}

.setting-balance b {
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
}

.setting-note {
  margin: 0 0 12px;
  padding: 10px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.7;
}

.point-passphrase-form {
  display: grid;
  gap: 10px;
}

.point-passphrase-login-area[hidden],
.point-passphrase-logged-in[hidden] {
  display: none !important;
}

.point-passphrase-logged-in {
  display: grid;
  max-width: 520px;
  gap: 8px;
  padding: 14px;
  border: 3px solid #000;
  background: rgba(255, 255, 255, .92);
  color: #000;
  box-shadow: 3px 3px 0 #000;
}

.point-passphrase-logged-in > strong {
  font-size: 18px;
  line-height: 1.35;
}

.point-passphrase-logged-in > p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.point-passphrase-account-name {
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.point-passphrase-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.point-passphrase-status-link,
.point-passphrase-rename,
.point-passphrase-logout {
  justify-self: start;
  min-height: 38px;
  padding: 8px 14px;
  border: 3px solid #000;
  background: #000;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.pwa-notification-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  margin-left: 4px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #e60012;
  color: #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.side-link .pwa-notification-badge {
  position: absolute;
  top: -12px;
  right: 18%;
  margin-left: 0;
}

.pwa-notification-badge[hidden] {
  display: none;
}

.point-passphrase-rename {
  background: #274f9e;
  color: #fff;
  cursor: pointer;
}

.point-passphrase-logout {
  background: #c91828;
  color: #fff;
  cursor: pointer;
}

.point-passphrase-logout:disabled {
  opacity: .7;
  cursor: wait;
}

.point-passphrase-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.point-passphrase-form input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 3px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  letter-spacing: 0;
}

.point-passphrase-form input:disabled,
.point-passphrase-form button:disabled {
  opacity: .68;
  cursor: wait;
}

.point-passphrase-form button {
  min-height: 42px;
  border: 3px solid #000;
  background: #000;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.point-name-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
}

.point-name-suggestions[hidden] {
  display: none !important;
}

.point-passphrase-form .point-name-suggestions button {
  min-height: 30px;
  padding: 5px 8px;
  border-width: 2px;
  background: #fff;
  color: #000;
  font-size: 12px;
  line-height: 1;
}

.point-passphrase-message {
  min-height: 1.6em;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.point-passphrase-message.is-ok {
  color: #146c2e;
}

html[data-theme="retro"] .setting-note {
  background: #fff9db;
  color: #21386f;
}

html[data-theme="taxi"] .point-passphrase-form button {
  background: #f7bf28;
  color: #101010;
}

html[data-theme="taxi"] .point-passphrase-status-link {
  background: #f7bf28;
  color: #101010;
}

html[data-theme="mono"] .setting-note {
  background: #f1f1ee;
}

.setting-copy {
  margin-top: 10px;
  padding: 7px 12px;
  border: 3px solid #000;
  background: #fff;
  color: #000;
  box-shadow: 3px 3px 0 #000;
  font-size: 13px;
  line-height: 1;
}

.point-passphrase-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(0, 0, 0, .72);
}

.point-passphrase-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.point-passphrase-card {
  align-content: start;
  padding: 12px;
  border: 3px solid #000;
  background: rgba(255, 255, 255, .86);
}

.point-passphrase-card > strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.point-passphrase-card > p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.point-passphrase-login {
  max-width: 430px;
}

.point-passphrase-create-link {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  text-decoration: underline;
  cursor: pointer;
}

.point-passphrase-create-form small {
  display: block;
  margin-top: -3px;
  color: rgba(0, 0, 0, .62);
  font-size: 11px;
  line-height: 1.5;
}

.passphrase-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .48);
}

.passphrase-modal[hidden] {
  display: none;
}

.passphrase-modal__window {
  position: relative;
  width: min(520px, 100%);
  padding: 18px;
  border: 4px solid #000;
  background: #fff;
  color: #000;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .38);
}

.passphrase-modal__window h2 {
  margin: 0 34px 12px 0;
  padding-bottom: 8px;
  border-bottom: 3px solid #000;
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1;
}

.passphrase-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 3px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

html[data-theme="retro"] .passphrase-modal__window {
  border-color: #274f9e;
  background: #fffdf0;
  color: #21386f;
}

html[data-theme="retro"] .passphrase-modal__window h2,
html[data-theme="retro"] .passphrase-modal__close {
  border-color: #274f9e;
}

html[data-theme="taxi"] .passphrase-modal__window {
  background: #fff;
  border-color: #101010;
}

html[data-theme="taxi"] .passphrase-modal__close {
  background: #f7bf28;
}

html[data-theme="mono"] .passphrase-modal__window {
  background: #f3f3ef;
}

.hio-confirm-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(10, 9, 8, 0.58);
}

.hio-confirm-modal[hidden] {
  display: none;
}

.hio-confirm-modal__window {
  display: grid;
  gap: 14px;
  width: min(100%, 500px);
  padding: 18px;
  border: 4px solid var(--my-page-accent, #000);
  background: var(--my-page-surface, #fff);
  color: var(--my-page-text, #000);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.34);
}

.hio-confirm-modal__head {
  display: grid;
  gap: 7px;
  padding-bottom: 11px;
  border-bottom: 3px solid currentColor;
}

.hio-confirm-modal__head p {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0.68;
}

.hio-confirm-modal__head h2 {
  margin: 0;
  font-size: clamp(20px, 5vw, 30px);
  line-height: 1.12;
}

.hio-confirm-modal__message {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  white-space: pre-line;
}

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

.hio-confirm-modal__button {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 3px solid var(--my-page-accent, #000);
  background: var(--my-page-surface, #fff);
  color: var(--my-page-text, #000);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.22);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.hio-confirm-modal__button:focus-visible {
  outline: 3px solid var(--my-page-action, #c91828);
  outline-offset: 2px;
}

.hio-confirm-modal__button.is-confirm {
  background: var(--my-page-accent, #000);
  color: var(--my-page-accent-text, #fff);
}

.hio-confirm-modal.is-danger .hio-confirm-modal__button.is-confirm {
  border-color: var(--my-page-action, #c91828);
  background: var(--my-page-action, #c91828);
  color: #fff;
}

.hio-confirm-modal.is-card-folder {
  background: rgba(10, 9, 8, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__window {
  gap: 15px;
  width: min(100%, 440px);
  padding: 22px;
  border: 1px solid rgba(218, 198, 174, 0.34);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(55, 51, 48, 0.98), rgba(24, 24, 24, 0.99));
  color: #f3f0eb;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 245, 228, 0.18);
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__head {
  gap: 8px;
  padding: 0 2px 14px;
  border-bottom: 1px solid rgba(218, 198, 174, 0.24);
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__head p {
  color: #c9ad8b;
  opacity: 1;
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__head h2 {
  color: #fffaf1;
  font-size: clamp(21px, 5vw, 27px);
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__message {
  padding: 14px 16px;
  border: 1px solid rgba(255, 248, 237, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(239, 234, 226, 0.94), rgba(202, 196, 187, 0.92));
  color: #332c27;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__actions {
  gap: 8px;
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 250, 241, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 7px 16px rgba(0, 0, 0, 0.2);
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__button.is-confirm {
  border-color: rgba(232, 208, 178, 0.44);
  background: linear-gradient(180deg, #b99a74, #8f6e4e);
  color: #fffaf1;
}

.hio-confirm-modal.is-card-folder .hio-confirm-modal__button:hover,
.hio-confirm-modal.is-card-folder .hio-confirm-modal__button:focus-visible {
  border-color: rgba(255, 248, 237, 0.6);
  color: #fff;
  transform: translateY(-1px);
}

.setting-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.setting-status-link {
  min-height: 42px;
  padding: 8px 14px;
  border: 3px solid #000;
  background: #fff;
  color: #000;
  box-shadow: 3px 3px 0 #000;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status-dashboard {
  display: grid;
  gap: 18px;
}

.status-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-hero > div {
  min-height: 82px;
  padding: 12px;
  border: 4px solid #000;
  background: #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .18);
}

.status-hero span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1;
  color: rgba(0, 0, 0, .58);
}

.status-hero strong {
  display: block;
  font-size: clamp(16px, 3.2vw, 24px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.status-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 10px;
  min-width: 0;
  align-items: start;
}

.status-card-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  position: relative;
  min-height: 82px;
  padding: 8px;
  border: 3px solid #000;
  background: #fff;
}

.status-card-item img {
  width: 54px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid #000;
  background: #eee;
}

.status-card-item b,
.status-card-item span,
.status-card-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-card-item b {
  font-size: 13px;
  line-height: 1.1;
}

.status-card-item span {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
}

.status-card-item small {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.25;
  color: rgba(0, 0, 0, .6);
}

.status-card-item a {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
}

.status-record-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-record-list li,
.status-bbs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: baseline;
  padding: 8px 10px;
  border: 2px solid #000;
  background: rgba(255, 255, 255, .84);
  color: inherit;
  text-decoration: none;
}

.status-record-list b,
.status-bbs-row b {
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status-record-list span,
.status-record-list em,
.status-record-list small,
.status-bbs-row span {
  font-size: 11px;
  line-height: 1.35;
  font-style: normal;
  color: rgba(0, 0, 0, .66);
}

.status-subtitle {
  margin: 14px 0 7px;
  padding-bottom: 4px;
  border-bottom: 2px solid #000;
  font-size: 13px;
  font-weight: 900;
}

.status-subtitle:first-child {
  margin-top: 0;
}

.status-empty {
  margin: 0;
  padding: 10px;
  border: 2px dashed rgba(0, 0, 0, .36);
  color: rgba(0, 0, 0, .58);
  font-size: 12px;
  line-height: 1.6;
}

html[data-theme="retro"] .point-passphrase-card,
html[data-theme="retro"] .status-hero > div,
html[data-theme="retro"] .status-card-item,
html[data-theme="retro"] .status-record-list li,
html[data-theme="retro"] .status-bbs-row {
  border-color: #274f9e;
  background: #fffdf0;
  color: #21386f;
}

html[data-theme="taxi"] .setting-status-link,
html[data-theme="taxi"] .status-card-item a {
  background: #f7bf28;
  color: #101010;
}

html[data-theme="mono"] .point-passphrase-card,
html[data-theme="mono"] .status-hero > div,
html[data-theme="mono"] .status-card-item,
html[data-theme="mono"] .status-record-list li,
html[data-theme="mono"] .status-bbs-row {
  background: #f3f3ef;
}

@media (max-width: 640px) {
  .point-passphrase-layout,
  .status-hero {
    grid-template-columns: 1fr;
  }

  .point-passphrase-login {
    max-width: none;
  }

  .passphrase-modal {
    padding: 12px;
  }

  .passphrase-modal__window {
    padding: 14px;
    border-width: 3px;
  }

  .hio-confirm-modal__window {
    padding: 14px;
    border-width: 3px;
  }

  .hio-confirm-modal__actions {
    grid-template-columns: 1fr;
  }

  .setting-actions {
    justify-content: stretch;
  }

  .setting-status-link {
    width: 100%;
  }

  .status-dashboard {
    gap: 12px;
  }

  .status-hero {
    gap: 7px;
  }

  .status-hero > div {
    min-height: 58px;
    padding: 9px 10px;
    border-width: 3px;
  }

  .status-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .status-card-item {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 72px;
    padding: 6px;
    border-width: 2px;
  }

  .status-card-item img {
    width: 42px;
  }

  .status-card-item span {
    font-size: 10px;
  }

  .status-card-item small,
  .status-card-item a {
    font-size: 9px;
  }

  .status-record-list li,
  .status-bbs-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 7px 8px;
  }
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: center;
}

.hero-copy {
  font-size: 20px;
}

.hero-copy p {
  margin: 0 0 12px;
}

.hero-image {
  border: 4px double #000;
  padding: 6px;
  background: repeating-linear-gradient(90deg, #000 0 4px, #fff 4px 8px);
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid #fff;
  filter: grayscale(1) contrast(2.05);
}

.iframe-board {
  margin: 0 auto 26px;
  background: #fff;
  border: 4px solid #000;
  outline: 3px solid #fff;
}

.iframe-title {
  padding: 9px 8px;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 26px;
  letter-spacing: .04em;
}

.iframe-body {
  min-height: 250px;
  padding: 16px 18px;
}

.portrait-card {
  position: relative;
  margin: 0 auto 26px;
  padding: 10px;
  background: #fff;
  border: 4px solid #000;
}

.portrait-card::before,
.portrait-card::after,
.portrait-bottom {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 4px solid #000;
}

.portrait-card::before { left: -8px; top: -8px; }
.portrait-card::after { right: -8px; top: -8px; }
.portrait-bottom { left: -8px; bottom: -8px; }
.portrait-bottom.r { left: auto; right: -8px; }

.portrait-frame {
  padding: 6px;
  background: repeating-linear-gradient(90deg, #000 0 4px, #fff 4px 8px);
  border: 4px double #000;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  border: 4px solid #fff;
  filter: grayscale(1) contrast(2.15);
}

.homepage-random-image {
  position: relative;
  display: block;
  width: 100%;
  background: #000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}

.homepage-random-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.homepage-random-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #000;
  border: 0;
  filter: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.mac9-permission {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .22);
}

.mac9-permission[hidden] {
  display: none;
}

.mac9-window {
  width: min(420px, calc(100vw - 28px));
  background: #dedede;
  color: #000;
  border: 2px solid #000;
  box-shadow:
    1px 1px 0 #fff inset,
    -1px -1px 0 #777 inset,
    6px 6px 0 rgba(0, 0, 0, .35);
  font-family: "Chicago", "Geneva", "Courier New", monospace;
}

.mac9-approved-window {
  width: min(360px, calc(100vw - 36px));
}

.mac9-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 3px 6px;
  background:
    repeating-linear-gradient(0deg, #fff 0 1px, #777 1px 2px);
  border-bottom: 2px solid #000;
  font-size: 12px;
  line-height: 1;
}

.mac9-titlebar span:first-child {
  padding: 1px 5px;
  background: #dedede;
}

.mac9-titlebox {
  appearance: none;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  padding: 0;
  background: #dedede;
  border: 2px solid #000;
  box-shadow: 1px 1px 0 #fff inset;
  cursor: pointer;
  touch-action: manipulation;
}

.mac9-body {
  display: grid;
  gap: 16px;
  padding: 22px 18px 18px;
  text-align: center;
}

.mac9-message,
.mac9-approved {
  margin: 0;
  font-size: clamp(20px, 6vw, 30px);
  line-height: 1.25;
}

.mac9-approved {
  padding: 10px 4px;
  font-size: clamp(24px, 7vw, 38px);
}

.mac9-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mac9-actions button {
  min-height: 38px;
  padding: 6px 8px;
  background: #f5f5f5;
  color: #000;
  border: 2px solid #000;
  box-shadow:
    1px 1px 0 #fff inset,
    -1px -1px 0 #777 inset;
}

.mac9-actions .mac9-allow {
  min-height: 48px;
  background: #fff;
  border-width: 3px;
  font-size: clamp(22px, 7vw, 36px);
}

@media (max-width: 640px) {
  .mac9-permission {
    padding: 24px 34px;
  }

  .mac9-window {
    width: min(330px, calc(100vw - 68px));
    box-shadow:
      1px 1px 0 #fff inset,
      -1px -1px 0 #777 inset,
      4px 4px 0 rgba(0, 0, 0, .35);
  }

  .mac9-approved-window {
    width: min(300px, calc(100vw - 76px));
  }

  .mac9-titlebar {
    min-height: 21px;
    padding: 2px 5px;
    font-size: 10px;
  }

  .mac9-titlebox {
    width: 13px;
    height: 13px;
  }

  .mac9-body {
    gap: 12px;
    padding: 18px 14px 15px;
  }

  .mac9-message {
    font-size: clamp(18px, 5.4vw, 24px);
  }

  .mac9-approved {
    padding: 8px 3px;
    font-size: clamp(20px, 6vw, 28px);
  }

  .mac9-actions {
    gap: 8px;
  }

  .mac9-actions button {
    min-height: 34px;
    padding: 5px 6px;
    font-size: 13px;
  }

  .mac9-actions .mac9-allow {
    min-height: 42px;
    font-size: clamp(20px, 6.2vw, 28px);
  }
}

.sns-panel {
  margin: 0 0 26px;
  padding: 18px 0 20px;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
}

.sns-title {
  margin-bottom: 14px;
  text-align: center;
  font-size: 28px;
}

.sns-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sns-links a {
  display: block;
  padding: 11px 6px;
  background: #000;
  color: #fff;
  border: 3px solid #000;
  outline: 2px solid #fff;
  text-align: center;
  text-decoration: none;
  font-size: 17px;
}

.sns-links a:hover {
  background: var(--yellow);
  color: #000;
}

.counter {
  width: min(510px, 100%);
  margin: 0 auto 24px;
  padding: 10px 12px 9px;
  background: #040404;
  color: var(--yellow);
  border: 5px solid #000;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 3px #000 inset;
  text-align: center;
  font-size: 34px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.counter.is-celebrating {
  position: relative;
  animation: counter-celebrate 1.1s steps(4, end) 2;
}

.counter.is-celebrating::after {
  content: "ACCESS UP!";
  position: absolute;
  right: -10px;
  top: -22px;
  padding: 3px 7px;
  background: var(--yellow);
  color: #000;
  border: 2px solid #000;
  font-size: 12px;
  letter-spacing: 0;
  transform: rotate(4deg);
}

@keyframes counter-celebrate {
  25% { transform: translateY(-2px); filter: brightness(1.4); }
  50% { transform: translateY(0); filter: brightness(1); }
  75% { transform: translateY(-2px); filter: brightness(1.6); }
}

.counter-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .18);
  pointer-events: auto;
  animation: counter-popup-in 220ms steps(3, end);
}

.counter-popup-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  padding: 24px 22px 22px;
  background: #fff;
  border: 6px solid #000;
  outline: 4px solid #fff;
  box-shadow: 8px 8px 0 #000;
  text-align: center;
}

.counter-popup-kicker {
  justify-self: center;
  padding: 4px 8px;
  background: #000;
  color: var(--yellow);
  font-size: 14px;
  line-height: 1;
}

.counter-popup-card strong {
  font-size: clamp(22px, 6vw, 38px);
  line-height: 1.18;
}

.counter-popup-label {
  justify-self: center;
  padding: 7px 12px;
  background: var(--yellow);
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  font-size: clamp(20px, 5.5vw, 34px);
  line-height: 1;
  animation: counter-label-pop 840ms steps(2, end) infinite;
}

.counter-popup-close {
  position: absolute;
  right: -14px;
  top: -14px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--danger);
  color: #fff;
  border: 4px solid #000;
  box-shadow: 3px 3px 0 #000;
  font-size: 22px;
  line-height: 1;
}

.counter-bursts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.counter-burst {
  position: absolute;
  left: calc(50% + var(--x) * 52px);
  top: calc(50% + var(--y) * 48px);
  width: 12px;
  height: 12px;
  background: var(--yellow);
  border: 2px solid #000;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 23deg));
  animation: counter-burst 980ms steps(5, end) infinite;
  animation-delay: calc(var(--i) * -55ms);
}

.counter-popup.is-firework .counter-burst:nth-child(3n) {
  background: #fff;
}

.counter-popup.is-firework .counter-burst:nth-child(3n + 1) {
  background: #ff5c9a;
}

.counter-popup.is-special .counter-burst:nth-child(2n) {
  background: #fff;
}

@keyframes counter-popup-in {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes counter-label-pop {
  50% { transform: scale(1.04) rotate(-1deg); }
}

@keyframes counter-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.3) rotate(calc(var(--i) * 23deg));
  }
  25%, 75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x) * 18px), calc(-50% + var(--y) * 18px)) scale(1.2) rotate(calc(var(--i) * 23deg + 90deg));
  }
}

.preview-notice {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 9998;
  display: grid;
  gap: 5px;
  width: min(360px, calc(100vw - 28px));
  padding: 13px 42px 13px 13px;
  background: #fff;
  color: #000;
  border: 4px solid #000;
  border-radius: 14px;
  box-shadow: 6px 6px 0 #000;
  animation: preview-notice-in 240ms cubic-bezier(.2, 1.5, .4, 1);
}

.preview-notice::before {
  content: "!";
  position: absolute;
  left: -10px;
  top: -12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--yellow);
  border: 3px solid #000;
  border-radius: 50%;
  font-weight: 900;
}

.preview-notice.is-game::before,
.preview-notice.is-celebration::before {
  content: "R";
}

.preview-notice.is-celebration {
  background:
    repeating-linear-gradient(90deg, rgba(255, 232, 107, .45) 0 8px, transparent 8px 16px),
    #fff;
}

.preview-notice-kicker {
  width: max-content;
  max-width: 100%;
  padding: 2px 6px;
  background: #000;
  color: var(--yellow);
  font-size: 10px;
  line-height: 1;
}

.preview-notice strong {
  font-size: 18px;
  line-height: 1.25;
}

.preview-notice span:last-child {
  font-size: 13px;
  line-height: 1.45;
}

.preview-notice-close {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--danger);
  color: #fff;
  border: 3px solid #000;
  box-shadow: 2px 2px 0 #000;
  font-size: 18px;
}

.ticker-track.is-previewing {
  outline: 3px solid var(--yellow);
  outline-offset: -3px;
}

@keyframes preview-notice-in {
  from { opacity: 0; transform: translateY(16px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-preview-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  min-height: 160px;
  padding: 14px;
  background: #fff;
  border: 4px solid #000;
  text-decoration: none;
}

.mini-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

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

.news-item {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #fff;
  border: 3px solid #000;
}

.has-admin-delete {
  padding-right: 38px;
}

.admin-delete-x {
  position: absolute;
  right: 7px;
  top: 7px;
  z-index: 20;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: #fff8d8;
  color: #141414;
  border: 2px solid #141414;
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .26);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.admin-delete-x:hover {
  background: #141414;
  color: #fff;
}

.admin-inline-delete-x {
  position: static;
  flex: 0 0 auto;
}

.news-item.pinned {
  background: var(--yellow);
}

.news-item.express-news {
  background: var(--yellow);
}

.news-item.express-news.has-admin-delete {
  padding-right: 38px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 6px;
  background: #000;
  color: #fff;
  border: 2px solid #000;
  font-size: 12px;
}

.tag.light {
  background: #fff;
  color: #000;
}

.tag.live {
  color: #000;
  background: var(--yellow);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: .2; }
}

.bbs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bbs-toolbar-bottom {
  margin: 14px 0 0;
}

.district-tabs,
.slot-tabs,
.icon-picker,
.character-picker,
.sticker-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pixel-button,
.district-tabs button,
.slot-tabs button,
.icon-picker button,
.character-option,
.sticker-option {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 11px;
  background: #fff;
  color: #000;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-drag: none;
  user-select: none;
}

.pixel-button:hover,
.district-tabs button:hover,
.slot-tabs button:hover,
.icon-picker button:hover,
.character-option:hover,
.sticker-option:hover,
.pixel-button.active,
.district-tabs button.active,
.slot-tabs button.active,
.icon-picker button.active,
.character-option.active,
.sticker-option.active {
  background: var(--yellow);
}

.district-tabs button {
  min-width: 86px;
  min-height: 48px;
  font-size: 20px;
}

.bbs-new-thread-button {
  min-height: 48px;
  font-size: 18px;
}

.bbs-thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.bbs-thread-actions .pixel-button {
  width: 176px;
  max-width: 100%;
  min-height: 48px;
  font-size: 18px;
}

.bbs-admin-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.edit-help {
  padding: 6px 8px;
  background: #fff;
  border: 3px solid #000;
  font-size: 13px;
}

.new-thread-panel.is-collapsed {
  display: none;
}

.address-status {
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
}

.pixel-button.danger {
  background: var(--danger);
}

.bbs-map {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1619 / 971;
  container-type: inline-size;
  --map-marker-width: 19cqw;
  --map-bubble-gap: .74cqw;
  --map-bubble-min-height: 7.8cqw;
  --map-bubble-padding-y: 1.8cqw;
  --map-bubble-padding-x: 1.42cqw;
  --map-bubble-border: .36cqw;
  --map-bubble-radius: 2.18cqw;
  --map-bubble-shadow: .72cqw;
  --map-title-size: 2.22cqw;
  --map-avatar-width: 6.2cqw;
  --map-avatar-shadow: .44cqw;
  --map-tail-size: 2.36cqw;
  --map-activity-size: 1.52cqw;
  --map-activity-border: .28cqw;
  background: #ddd;
  border: 4px solid #000;
}

.bbs-map.is-editing {
  outline: 5px solid var(--yellow);
  outline-offset: -9px;
}

.bbs-map > img,
.bbs-map > picture.responsive-scene-image,
.bbs-map > picture.responsive-scene-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thread-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: var(--map-marker-width);
  transform: translate(-50%, -100%);
  padding: 0;
  background: transparent;
  border: 0;
  color: #000;
  text-align: center;
  text-decoration: none;
}

.casino-map-entry {
  --casino-entry-rgb: 255, 229, 124;
  position: absolute;
  left: 49.6%;
  top: 6.2%;
  z-index: 3;
  width: 27.6%;
  height: 35.8%;
  border-radius: 18% 14% 20% 18%;
  color: rgb(var(--casino-entry-rgb));
  text-decoration: none;
  transform: skewX(-6deg);
}

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

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

.casino-map-entry::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: casinoEntryGlow 2.8s ease-in-out infinite;
}

.casino-map-entry-ring {
  position: absolute;
  left: 48%;
  top: 53%;
  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: casinoEntryPulse 1.9s ease-in-out infinite;
}

.casino-map-entry:hover,
.casino-map-entry:focus-visible {
  outline: 0;
  background: transparent;
}

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

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

.map-delete-x {
  left: calc(var(--x) + 5.7cqw);
  top: calc(var(--y) - 12.4cqw);
  right: auto;
  width: 3.4cqw;
  height: 3.4cqw;
  min-width: 24px;
  min-height: 24px;
  border-width: .3cqw;
  font-size: max(12px, 1.8cqw);
  transform: translate(-50%, -50%);
}

.thread-marker.is-bubble-pulse {
  z-index: 50;
}

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

.thread-marker.is-bubble-pulse .thread-title,
.thread-marker.is-bubble-pulse .activity-mark {
  animation: bubble-text-pop 520ms cubic-bezier(.16, 1.22, .32, 1) both;
}

.thread-marker.spawning {
  animation: character-spawn 1.55s steps(6, end) both;
}

.thread-marker.spawning::before,
.thread-marker.spawning::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 3.8cqw);
  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: sparkle-burst 1.55s steps(5, end) both;
  pointer-events: none;
}

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

@keyframes character-spawn {
  0% { opacity: 0; transform: translate(-50%, -84%) scale(.25); filter: brightness(2.2); }
  18% { opacity: 1; transform: translate(-50%, -124%) scale(1.15); }
  42% { transform: translate(-50%, -100%) scale(.94); }
  62% { transform: translate(-50%, -106%) scale(1.04); }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1); filter: none; }
}

@keyframes 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); }
}

@keyframes bubble-soft-pop {
  0% { transform: scale(1); }
  36% { transform: scale(1.52); }
  68% { transform: scale(1.42); }
  100% { transform: scale(1); }
}

@keyframes bubble-text-pop {
  0% { transform: translateY(0) scale(1); }
  36% { transform: translateY(-.12cqw) scale(1.08); }
  68% { transform: translateY(-.06cqw) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

.thread-marker.empty {
  transform: translate(-50%, -50%);
}

.thread-marker.edit-marker {
  cursor: grab;
  touch-action: none;
  z-index: 6;
}

.thread-marker.edit-marker.is-dragging {
  cursor: grabbing;
  z-index: 20;
  filter: drop-shadow(0 0 8px var(--yellow));
}

.edit-bubble {
  background: var(--yellow);
}

.thread-bubble {
  position: relative;
  display: grid;
  box-sizing: border-box;
  gap: .2cqw;
  min-height: var(--map-bubble-min-height);
  margin-bottom: var(--map-bubble-gap);
  padding: var(--map-bubble-padding-y) var(--map-bubble-padding-x) calc(var(--map-bubble-padding-y) * .78);
  background: #fff;
  border: var(--map-bubble-border) solid #000;
  border-radius: var(--map-bubble-radius);
  box-shadow: var(--map-bubble-shadow) var(--map-bubble-shadow) 0 #000;
  font-size: var(--map-title-size);
  line-height: 1.1;
}

.thread-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--map-tail-size) * -.72);
  width: var(--map-tail-size);
  height: var(--map-tail-size);
  background: #fff;
  border-right: var(--map-bubble-border) solid #000;
  border-bottom: var(--map-bubble-border) solid #000;
  transform: translateX(-50%) rotate(45deg);
}

.thread-title {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  min-height: 2.2em;
  font-size: var(--map-title-size);
  line-height: 1.1;
}

.thread-title-line {
  display: block;
  white-space: nowrap;
}

.activity-mark {
  position: absolute;
  right: -1.18cqw;
  top: -1.32cqw;
  z-index: 2;
  min-width: 4.85cqw;
  padding: .34cqw .7cqw;
  background: var(--yellow);
  color: #000;
  border: var(--map-activity-border) solid #000;
  font-size: var(--map-activity-size);
  line-height: 1;
  text-align: center;
}

.activity-mark.now {
  animation: bob 900ms steps(2, end) infinite;
}

.activity-mark.hot {
  background: #fff;
}

.activity-mark.radio {
  right: -3.1cqw;
  min-width: 8.8cqw;
  background: #000;
  color: var(--yellow);
  letter-spacing: .02em;
  animation: radio-now-playing-float 1.6s ease-in-out infinite;
}

.activity-mark.lock {
  background: #000;
  color: #fff;
}

@keyframes bob {
  50% { transform: translateY(-4px); }
}

@keyframes radio-now-playing-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-.72cqw) rotate(1deg); }
}

.thread-avatar {
  display: block;
  width: var(--map-avatar-width);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(var(--map-avatar-shadow) var(--map-avatar-shadow) 0 #000);
}

.special-thread-map-avatar {
  width: calc(var(--map-avatar-width) * 1.34);
  max-width: 9.8cqw;
  transform: translateY(-.18cqw);
}

.is-special-thread-marker .thread-bubble {
  background: linear-gradient(180deg, #fffef5 0%, #ffe59e 52%, #ffb0d6 100%);
}

.thread-owner-name {
  position: absolute;
  left: 50%;
  top: calc(100% + .35cqw);
  z-index: 3;
  max-width: 16cqw;
  padding: .28cqw .56cqw;
  background: rgba(255, 255, 255, .94);
  color: #000;
  border: .26cqw solid #000;
  box-shadow: .38cqw .38cqw 0 #000;
  font-size: 1.35cqw;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  pointer-events: none;
}

.user-name-with-level {
  display: inline-flex;
  align-items: center;
  gap: .38em;
  max-width: 100%;
  min-width: 0;
  vertical-align: baseline;
}

.user-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-level-badge {
  flex: 0 0 auto;
  padding: .08em .34em .04em;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, .82);
  color: inherit;
  font-size: .72em;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.thread-owner-name .user-name-with-level {
  width: 100%;
  justify-content: center;
}

.meta-row .user-level-badge {
  font-size: .68em;
}

.empty-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 32px;
  padding: 4px;
  background: #fff;
  border: 3px dashed #000;
  box-shadow: 4px 4px 0 #000;
  font-size: 12px;
}

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

.character-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.character-option {
  min-height: 126px;
  padding: 7px;
}

.character-option img {
  display: block;
  width: min(72px, 100%);
  height: auto;
  filter: drop-shadow(3px 3px 0 #000);
}

.character-option span {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.icon-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .68);
}

.site-dialog-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .68);
}

.site-dialog-window {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  max-height: min(640px, 88vh);
  overflow: auto;
  padding: 16px;
  background: #fff;
  color: #000;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
}

.site-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.site-dialog-head strong {
  font-size: 20px;
  line-height: 1.05;
}

.site-dialog-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.site-dialog-input {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  background: #fff;
  color: #000;
  border: 3px solid #000;
}

.site-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.site-dialog-actions .mini-button,
.site-dialog-actions .pixel-button {
  min-width: 96px;
}

.site-dialog-modal.is-confirm .site-dialog-actions,
.site-dialog-modal.is-prompt .site-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.site-dialog-modal.is-confirm .site-dialog-actions .mini-button,
.site-dialog-modal.is-confirm .site-dialog-actions .pixel-button,
.site-dialog-modal.is-prompt .site-dialog-actions .mini-button,
.site-dialog-modal.is-prompt .site-dialog-actions .pixel-button {
  width: 100%;
  min-width: 0;
}

.icon-edit-window {
  width: min(620px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  background: #fff;
  border: 5px solid #000;
  box-shadow: 10px 10px 0 #000;
  padding: 14px;
}

.icon-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.icon-edit-picker {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.owner-transfer-window {
  width: min(680px, 100%);
}

.owner-transfer-note {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
}

.owner-transfer-list {
  display: grid;
  gap: 10px;
}

.owner-transfer-option {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 3px solid #000;
  background: #fff;
  color: #000;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.owner-transfer-option:hover,
.owner-transfer-option:focus-visible {
  background: #fffd73;
  outline: 3px solid #000;
  outline-offset: 2px;
}

.owner-transfer-option span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.owner-transfer-option em {
  font-style: normal;
  font-size: 12px;
}

.owner-transfer-option small {
  font-size: 13px;
  line-height: 1.5;
}

.sticker-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sticker-picker.is-collapsed {
  display: none;
}

.sticker-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.selected-sticker {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.protected-sticker-image {
  --sticker-ratio: 37 / 32;
  display: block;
  flex: 0 0 auto;
  aspect-ratio: var(--sticker-ratio);
  background-image: var(--sticker-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.selected-sticker .protected-sticker-image {
  width: 70px;
}

.sticker-option {
  min-height: 78px;
  padding: 6px;
}

.sticker-option .protected-sticker-image {
  width: 100%;
  max-width: 92px;
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

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

.field label {
  font-size: 14px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  background: #fff;
  border: 3px solid #000;
  border-radius: 0;
}

.field input,
.field select {
  height: 40px;
}

.field textarea {
  min-height: 94px;
  resize: vertical;
}

.char-count {
  text-align: right;
  color: #444;
  font-size: 12px;
}

.rules {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
}

.thread-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(180px, auto);
  gap: 16px;
  align-items: center;
}

.thread-head-avatar-frame {
  display: block;
  overflow: hidden;
  width: 92px;
  height: 92px;
  background: #fff;
  border: 4px solid #000;
  box-shadow: 5px 5px 0 #000;
}

.thread-head-avatar-frame.is-special-thread-face-frame {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .95) 0 16%, transparent 17%),
    linear-gradient(180deg, #fff8cb 0%, #ffd0ea 54%, #c6f4ff 100%);
}

button.thread-head-avatar-frame {
  padding: 0;
  cursor: pointer;
}

.editable {
  cursor: pointer;
}

.page-title.editable:hover,
.thread-author-card strong.editable:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.thread-head-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: none;
  transform-origin: 50% 50%;
  filter: none;
}

.thread-head-avatar.is-special-thread-face {
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .2) 34%, transparent 62%),
    linear-gradient(180deg, rgba(255, 245, 193, .95) 0%, rgba(255, 223, 244, .85) 56%, rgba(206, 245, 255, .88) 100%);
}

.pure-cafe-radio-panel {
  position: relative;
  overflow: hidden;
}

.pure-cafe-radio-panel.is-on-air {
  box-shadow: 0 0 0 4px rgba(247, 191, 40, .25) inset;
}

.pure-cafe-radio-body {
  display: grid;
  gap: 14px;
}

.pure-cafe-radio-now {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.pure-cafe-radio-record-wrap {
  display: grid;
  place-items: center;
  width: 88px;
  height: 76px;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  flex: 0 0 88px;
}

.pure-cafe-radio-record {
  display: block;
  width: 76px;
  height: 76px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  max-width: none;
  max-height: none;
}

.pure-cafe-radio-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pure-cafe-radio-kicker {
  width: max-content;
  max-width: 100%;
  padding: 2px 7px;
  background: #000;
  color: var(--yellow);
  font-size: 12px;
  line-height: 1;
}

.pure-cafe-radio-track-title {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(22px, 4.5vw, 34px);
  line-height: 1.05;
  white-space: nowrap;
}

.pure-cafe-fit-text {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.pure-cafe-fit-text > span {
  display: inline-block;
  max-width: none;
  overflow: hidden;
  font-size: calc(1em * var(--fit-font-scale, 1));
  line-height: 1;
  white-space: nowrap;
}

.pure-cafe-fit-text.is-compressed > span {
  letter-spacing: -.015em;
}

.pure-cafe-radio-artist {
  display: block;
  overflow: hidden;
  color: #333;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pure-cafe-eq {
  display: inline-flex;
  align-items: end;
  gap: 4px;
  height: 46px;
  padding: 9px 7px 5px;
  background: #000;
  border: 3px solid #000;
  transform: translateY(3px);
}

.pure-cafe-eq span {
  width: 7px;
  height: 10px;
  background: var(--yellow);
  transform-origin: 50% 100%;
  opacity: .42;
}

.pure-cafe-eq.is-playing span {
  animation: pure-cafe-eq-rise 900ms ease-in-out infinite;
  animation-delay: calc(var(--i) * -95ms);
  opacity: 1;
}

.pure-cafe-eq.is-muted span {
  background: #777;
  opacity: .7;
}

.pure-cafe-radio-listener {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #333;
  font-size: 13px;
}

.pure-cafe-sound-button.is-on {
  background: var(--yellow);
}

.pure-cafe-radio-owner {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff8d8;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
}

.pure-cafe-radio-owner-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #000;
  font-size: 13px;
}

.pure-cafe-stop-button,
.pure-cafe-track-button {
  appearance: none;
  border: 3px solid #000;
  color: #000;
  font: inherit;
  cursor: pointer;
}

.pure-cafe-stop-button {
  min-width: 96px;
  padding: 7px 12px;
  background: #000;
  color: #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .3);
}

.pure-cafe-radio-track-groups {
  display: grid;
  gap: 12px;
}

.pure-cafe-radio-track-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.pure-cafe-radio-track-group h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.pure-cafe-radio-track-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pure-cafe-track-button {
  justify-content: flex-start;
  overflow: hidden;
  min-width: 0;
  padding: 8px 10px;
  background: #fff;
  box-shadow: 3px 3px 0 #000;
  text-align: left;
  white-space: nowrap;
}

.pure-cafe-track-button:hover,
.pure-cafe-track-button.is-current {
  background: var(--yellow);
}

@keyframes pure-cafe-eq-rise {
  0%, 100% { height: 9px; }
  35% { height: 27px; }
  65% { height: 17px; }
}

@media (max-width: 640px) {
  .pure-cafe-radio-now {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .pure-cafe-radio-record-wrap {
    width: 88px;
    height: 76px;
  }

  .pure-cafe-radio-record {
    width: 76px;
    height: 76px;
  }

  .pure-cafe-eq {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .pure-cafe-eq span {
    width: clamp(4px, 1.15vw, 6px);
  }

  .pure-cafe-radio-track-list {
    grid-template-columns: 1fr;
  }
}

@keyframes special-thread-fortune-pop {
  0% {
    opacity: 0;
    transform: translateY(36px) scale(.76) rotate(-5deg);
  }
  55% {
    opacity: 1;
    transform: translateY(-8px) scale(1.03) rotate(1.5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes special-thread-fortune-out {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(18px) scale(.92);
  }
}

@keyframes special-thread-fortune-sparkle {
  0%, 100% {
    transform: translateY(0) scale(.8) rotate(0deg);
    opacity: .3;
  }
  50% {
    transform: translateY(-10px) scale(1.12) rotate(12deg);
    opacity: 1;
  }
}

@keyframes special-thread-fortune-rank {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.special-thread-fortune-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

.special-thread-fortune-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 246, 198, .42), transparent 42%),
    rgba(36, 10, 42, .58);
  backdrop-filter: blur(4px);
}

.special-thread-fortune-window {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(540px, 100%);
  padding: 24px 22px 20px;
  color: #2d1729;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, .95) 0 17%, transparent 18%),
    linear-gradient(180deg, #fffdf3 0%, #ffe5f2 46%, #d8f7ff 100%);
  border: 4px solid #000;
  border-radius: 28px;
  box-shadow: 0 18px 0 rgba(0, 0, 0, .24);
  animation: special-thread-fortune-pop 320ms cubic-bezier(.22, 1.35, .43, 1) both;
  overflow: hidden;
}

.special-thread-fortune-modal.is-closing .special-thread-fortune-window {
  animation: special-thread-fortune-out 220ms ease both;
}

.special-thread-fortune-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 3px solid #000;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.special-thread-fortune-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.special-thread-fortune-sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff6a0;
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
  opacity: .65;
  animation: special-thread-fortune-sparkle 1800ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 120ms);
}

.special-thread-fortune-sparkle.sparkle-1 { top: 16px; left: 48px; }
.special-thread-fortune-sparkle.sparkle-2 { top: 34px; right: 72px; }
.special-thread-fortune-sparkle.sparkle-3 { top: 128px; right: 30px; }
.special-thread-fortune-sparkle.sparkle-4 { bottom: 84px; left: 22px; }
.special-thread-fortune-sparkle.sparkle-5 { bottom: 28px; right: 32px; }

.special-thread-fortune-head {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.special-thread-fortune-avatar-wrap {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 8px;
  background:
    radial-gradient(circle at top, #fff 0 24%, #ffe494 25%, #ffcaec 62%, #c8f6ff 100%);
  border: 3px solid #000;
  border-radius: 26px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .18);
}

.special-thread-fortune-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.special-thread-fortune-head-copy {
  display: grid;
  gap: 6px;
}

.special-thread-fortune-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border: 2px solid #000;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.special-thread-fortune-head-copy h2 {
  margin: 0;
  font-size: clamp(24px, 4.2vw, 34px);
  line-height: 1.06;
}

.special-thread-fortune-head-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.special-thread-fortune-body {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, .72);
  border: 3px solid #000;
  border-radius: 22px;
}

.special-thread-fortune-label {
  font-size: 13px;
  font-weight: 700;
}

.special-thread-fortune-rank {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 10px 18px 8px;
  border: 3px solid #000;
  border-radius: 999px;
  background: #fff;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1;
  letter-spacing: .08em;
  animation: special-thread-fortune-rank 1800ms ease-in-out infinite;
}

.special-thread-fortune-rank.is-s {
  background: linear-gradient(180deg, #fff6a8 0%, #ffd579 100%);
}

.special-thread-fortune-rank.is-ss {
  background: linear-gradient(180deg, #ffd9f0 0%, #ff9cca 100%);
}

.special-thread-fortune-rank.is-sss {
  color: #fff;
  background: linear-gradient(180deg, #7b4dff 0%, #ff4fa9 100%);
}

.special-thread-fortune-message {
  margin: 0;
  font-size: 18px;
  line-height: 1.75;
}

.special-thread-fortune-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.special-thread-fortune-note {
  font-size: 12px;
  font-weight: 700;
}

.special-thread-fortune-button {
  min-width: 180px;
}

@media (max-width: 640px) {
  .special-thread-map-avatar {
    max-width: 18vw;
  }

  .special-thread-fortune-modal {
    padding: 14px;
  }

  .special-thread-fortune-window {
    gap: 16px;
    padding: 18px 16px 16px;
    border-radius: 24px;
  }

  .special-thread-fortune-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .special-thread-fortune-avatar-wrap {
    width: min(168px, 46vw);
  }

  .special-thread-fortune-head-copy {
    justify-items: center;
  }

  .special-thread-fortune-body {
    padding: 16px 14px;
  }

  .special-thread-fortune-message {
    font-size: 16px;
  }

  .special-thread-fortune-foot {
    justify-content: center;
  }

  .special-thread-fortune-button {
    width: 100%;
    min-width: 0;
  }
}

.thread-head-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.thread-exit-button {
  justify-self: end;
  min-width: 180px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 2.4vw, 28px);
  text-align: center;
}

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

.thread-message-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.thread-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: min(100%, 224px);
  border: 3px solid #000;
  background: #fff;
  color: #000;
}

.thread-view-option {
  appearance: none;
  border: 0;
  background: var(--yellow);
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.thread-view-option:focus-visible {
  outline: 2px solid #1687ff;
  outline-offset: -4px;
}

.thread-view-option + .thread-view-option {
  border-left: 3px solid #000;
}

.thread-view-option.is-active {
  background: transparent;
  color: #000;
}

.message-list.is-chat-list {
  align-items: start;
  gap: 9px;
  max-height: min(68vh, 760px);
  min-height: min(54vh, 520px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  contain: layout paint;
  padding: 14px;
  border: 3px solid #000;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .52)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .035) 0 1px, transparent 1px 22px);
  scroll-behavior: auto;
}

.message-list.is-chat-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.thread-chat-more {
  appearance: none;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 16px;
  border: 2px solid #000;
  border-radius: 999px;
  background: var(--yellow);
  color: #000;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .24);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.thread-chat-more:hover {
  background: #000;
  color: #fff;
}

.message-list.is-chat-list .message {
  width: fit-content;
  max-width: min(82%, 680px);
  content-visibility: auto;
  contain-intrinsic-size: 76px;
  padding: 10px 12px;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .22);
}

.message-list.is-chat-list .message-body {
  overflow-wrap: anywhere;
}

.message-list.is-chat-list .message.is-own-message {
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  background: #fff3aa;
}

.message-list.is-chat-list .message.admin {
  justify-self: end;
}

.message-list.is-chat-list .message .meta-row {
  gap: 5px 7px;
  font-size: 11px;
}

.message-list.is-chat-list .message-body {
  line-height: 1.68;
}

.message-list.is-chat-list .sticker-image {
  width: 104px;
  max-width: min(52vw, 42%);
  margin-top: 2px;
}

.message-list.is-chat-list .message.is-own-message .sticker-image {
  justify-self: end;
}

.message-list.is-chat-list .message.has-admin-stamp {
  padding-bottom: 10px;
}

.message-list.is-chat-list .message-like-stamp {
  position: static;
  justify-self: end;
  align-self: end;
  height: 42px;
  max-width: min(48%, 118px);
  margin-top: -2px;
  transform: rotate(-6deg);
}

.message-list.is-chat-list .message.is-chat-sticker-message {
  gap: 5px;
  contain-intrinsic-size: 150px;
  padding: 14px 16px 2px 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.message-list.is-chat-list .message.is-chat-sticker-message.has-admin-delete {
  padding-right: 32px !important;
}

.message-list.is-chat-list .message.is-chat-sticker-message .message-delete-x,
.message-list.is-chat-list .message.is-chat-sticker-message .admin-like-button {
  right: 0;
  top: 0;
  bottom: auto;
  transform: none;
}

.message-list.is-chat-list .chat-message-bubble {
  display: grid;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 3px solid #000;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .22);
}

.message-list.is-chat-list .message.is-own-message .chat-message-bubble {
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  background: #fff3aa;
}

.message-list.is-chat-list .message.admin .chat-message-bubble {
  justify-self: end;
  background: #000;
  color: #fff;
}

.message-list.is-chat-list .chat-sticker-unit {
  display: grid;
  gap: 2px;
  width: fit-content;
  max-width: min(72%, 260px);
  justify-items: start;
}

.message-list.is-chat-list .message.is-own-message .chat-sticker-unit,
.message-list.is-chat-list .message.admin .chat-sticker-unit {
  justify-self: end;
  justify-items: end;
}

.message-list.is-chat-list .chat-sticker-meta {
  gap: 4px 6px;
  padding: 0 3px;
  font-size: 10px;
  line-height: 1.2;
  opacity: .74;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.message-list.is-chat-list .chat-sticker-image-wrap {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.message-list.is-chat-list .chat-sticker-image-wrap .sticker-image {
  width: min(164px, 34vw);
  max-width: 100%;
  margin: 0;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.message-list.is-chat-list .chat-sticker-image-wrap .sticker {
  background: rgba(255, 226, 74, .86);
  border: 2px solid currentColor;
  box-shadow: none;
}

html[data-theme="retro"] .thread-view-switch {
  background: #fff8d6;
  border-color: #274f9e;
  border-style: ridge;
  box-shadow: 2px 2px 0 rgba(39, 79, 158, .32);
}

html[data-theme="retro"] .thread-view-option {
  background: linear-gradient(#fffca8, #ff9fd2);
  color: #46105e;
}

html[data-theme="retro"] .thread-view-option + .thread-view-option {
  border-left-color: #274f9e;
}

html[data-theme="retro"] .thread-view-option.is-active {
  background: linear-gradient(#fff, #ffe7a3);
  color: #0645ad;
}

html[data-theme="retro"] .message-list.is-chat-list {
  background:
    linear-gradient(rgba(255, 254, 248, .8), rgba(255, 254, 248, .68)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(106, 166, 228, .18) 23px 24px);
  border-color: #274f9e;
  border-style: ridge;
  box-shadow: 0 0 0 2px #fff inset, 3px 3px 0 rgba(39, 79, 158, .28);
}

html[data-theme="retro"] .message-list.is-chat-list .message {
  background: #fffef8;
  border-color: #274f9e;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .3);
}

html[data-theme="retro"] .message-list.is-chat-list .chat-message-bubble {
  background: #fffef8;
  border-color: #274f9e;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .3);
}

html[data-theme="retro"] .message-list.is-chat-list .message.is-own-message {
  background: linear-gradient(#fffca8, #fff3cf);
  color: #13216f;
}

html[data-theme="retro"] .message-list.is-chat-list .message.is-own-message .chat-message-bubble {
  background: linear-gradient(#fffca8, #fff3cf);
  color: #13216f;
}

html[data-theme="retro"] .message-list.is-chat-list .message.admin {
  background: #1546bc;
  color: #fff;
}

html[data-theme="retro"] .message-list.is-chat-list .message.admin .chat-message-bubble {
  background: #1546bc;
  color: #fff;
}

html[data-theme="retro"] .thread-chat-more {
  background: linear-gradient(#fffca8, #ff9fd2);
  color: #46105e;
  border-color: #274f9e;
  border-style: ridge;
  box-shadow: 2px 2px 0 rgba(39, 79, 158, .28);
}

html[data-theme="modern"] .thread-view-switch {
  overflow: hidden;
  background: #f7f9fc;
  border-color: #d8dee8;
  border-style: solid;
  border-radius: 8px;
  box-shadow: none;
}

html[data-theme="modern"] .thread-view-option {
  background: #141820;
  color: #fff;
}

html[data-theme="modern"] .thread-view-option + .thread-view-option {
  border-left-color: #d8dee8;
}

html[data-theme="modern"] .thread-view-option.is-active {
  background: transparent;
  color: #171b24;
}

html[data-theme="modern"] .message-list.is-chat-list {
  background: #f8fafc;
  border-color: #d8dee8;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .82), 0 12px 28px rgba(20, 24, 32, .08);
}

html[data-theme="modern"] .message-list.is-chat-list .message {
  background: #fff;
  border-color: #d8dee8;
  border-radius: 14px 14px 14px 6px;
  box-shadow: 0 10px 24px rgba(20, 24, 32, .1);
}

html[data-theme="modern"] .message-list.is-chat-list .chat-message-bubble {
  background: #fff;
  border-color: #d8dee8;
  border-radius: 14px 14px 14px 6px;
  box-shadow: 0 10px 24px rgba(20, 24, 32, .1);
}

html[data-theme="modern"] .message-list.is-chat-list .message.is-own-message {
  background: #fff7cc;
  border-color: #e8c95a;
  border-radius: 14px 14px 6px 14px;
  color: #141820;
}

html[data-theme="modern"] .message-list.is-chat-list .message.is-own-message .chat-message-bubble {
  background: #fff7cc;
  border-color: #e8c95a;
  border-radius: 14px 14px 6px 14px;
  color: #141820;
}

html[data-theme="modern"] .message-list.is-chat-list .message.admin {
  background: #141820;
  color: #fff;
}

html[data-theme="modern"] .message-list.is-chat-list .message.admin .chat-message-bubble {
  background: #141820;
  color: #fff;
}

html[data-theme="modern"] .thread-chat-more {
  background: #141820;
  color: #fff;
  border-color: #141820;
  border-radius: 999px;
  box-shadow: none;
}

html[data-theme="elegant"] .thread-view-switch {
  overflow: hidden;
  background: rgba(255, 250, 244, .38);
  border: 1px solid rgba(216, 183, 94, .62);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(35, 22, 41, .08);
}

html[data-theme="elegant"] .thread-view-option {
  background: rgba(90, 40, 72, .86);
  color: #fffaf4;
  font-family: var(--elegant-display-font);
  font-weight: 600;
  text-transform: lowercase;
}

html[data-theme="elegant"] .thread-view-option + .thread-view-option {
  border-left: 1px solid rgba(216, 183, 94, .62);
}

html[data-theme="elegant"] .thread-view-option.is-active {
  background: transparent;
  color: #4e2342;
}

html[data-theme="elegant"] .message-list.is-chat-list {
  background: rgba(255, 250, 244, .44);
  border: 1px solid rgba(216, 183, 94, .62);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(35, 22, 41, .14), 0 0 0 1px rgba(255, 250, 244, .38) inset;
  backdrop-filter: blur(9px);
}

html[data-theme="elegant"] .message-list.is-chat-list .message {
  background: rgba(255, 250, 244, .8);
  border: 1px solid rgba(90, 40, 72, .18);
  border-radius: 14px 14px 14px 6px;
  box-shadow: 0 10px 24px rgba(35, 22, 41, .1);
}

html[data-theme="elegant"] .message-list.is-chat-list .chat-message-bubble {
  background: rgba(255, 250, 244, .8);
  border: 1px solid rgba(90, 40, 72, .18);
  border-radius: 14px 14px 14px 6px;
  box-shadow: 0 10px 24px rgba(35, 22, 41, .1);
}

html[data-theme="elegant"] .message-list.is-chat-list .message.is-own-message {
  background: rgba(231, 207, 145, .34);
  border-color: rgba(216, 183, 94, .72);
  border-radius: 14px 14px 6px 14px;
  color: #4e2342;
}

html[data-theme="elegant"] .message-list.is-chat-list .message.is-own-message .chat-message-bubble {
  background: rgba(231, 207, 145, .34);
  border-color: rgba(216, 183, 94, .72);
  border-radius: 14px 14px 6px 14px;
  color: #4e2342;
}

html[data-theme="elegant"] .message-list.is-chat-list .message.admin {
  background: #231629;
  border-color: rgba(216, 183, 94, .72);
  color: #fffaf4;
}

html[data-theme="elegant"] .message-list.is-chat-list .message.admin .chat-message-bubble {
  background: #231629;
  border-color: rgba(216, 183, 94, .72);
  color: #fffaf4;
}

html[data-theme="elegant"] .thread-chat-more {
  background: rgba(90, 40, 72, .86);
  color: #fffaf4;
  border: 1px solid rgba(216, 183, 94, .68);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(35, 22, 41, .1);
  font-family: var(--elegant-display-font);
  font-weight: 600;
}

html[data-theme="cute"] .thread-view-switch {
  overflow: hidden;
  background: #fff;
  border-color: #f0d7e8;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(155, 83, 130, .1);
}

html[data-theme="cute"] .thread-view-option {
  background: #ff7fb3;
  color: #fff;
  text-decoration: none;
}

html[data-theme="cute"] .thread-view-option + .thread-view-option {
  border-left-color: #f0d7e8;
}

html[data-theme="cute"] .thread-view-option.is-active {
  background: transparent;
  color: #3b335c;
}

html[data-theme="cute"] .message-list.is-chat-list {
  background:
    radial-gradient(circle at 14px 14px, rgba(255, 127, 179, .14) 0 4px, transparent 4px),
    radial-gradient(circle at 42px 34px, rgba(170, 245, 221, .28) 0 5px, transparent 5px),
    #fff9fd;
  background-size: 56px 56px, 68px 68px, auto;
  border-color: #ffb7d5;
  border-radius: 8px;
  box-shadow: inset 0 -4px 0 #aaf5dd, 0 12px 28px rgba(155, 83, 130, .12);
}

html[data-theme="cute"] .message-list.is-chat-list .message {
  background: #fff;
  border-color: #f0d7e8;
  border-radius: 16px 16px 16px 8px;
  box-shadow: 0 8px 18px rgba(155, 83, 130, .1);
}

html[data-theme="cute"] .message-list.is-chat-list .chat-message-bubble {
  background: #fff;
  border-color: #f0d7e8;
  border-radius: 16px 16px 16px 8px;
  box-shadow: 0 8px 18px rgba(155, 83, 130, .1);
}

html[data-theme="cute"] .message-list.is-chat-list .message.is-own-message {
  background: #fff6ba;
  border-color: #ffe98f;
  border-radius: 16px 16px 8px 16px;
  color: #3b335c;
}

html[data-theme="cute"] .message-list.is-chat-list .message.is-own-message .chat-message-bubble {
  background: #fff6ba;
  border-color: #ffe98f;
  border-radius: 16px 16px 8px 16px;
  color: #3b335c;
}

html[data-theme="cute"] .message-list.is-chat-list .message.admin {
  background: #3b335c;
  border-color: #3b335c;
  color: #fff;
}

html[data-theme="cute"] .message-list.is-chat-list .message.admin .chat-message-bubble {
  background: #3b335c;
  border-color: #3b335c;
  color: #fff;
}

html[data-theme="cute"] .thread-chat-more {
  background: #ff7fb3;
  color: #fff;
  border-color: #f0d7e8;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(155, 83, 130, .12);
}

html[data-theme="taxi"] .thread-view-switch {
  overflow: hidden;
  background: #11151c;
  border-color: #11151c;
  border-radius: 8px;
  box-shadow: inset 0 -4px 0 #ffd22e;
}

html[data-theme="taxi"] .thread-view-option {
  background: #ffd22e;
  color: #11151c;
  text-decoration: none;
}

html[data-theme="taxi"] .thread-view-option + .thread-view-option {
  border-left-color: rgba(255, 210, 46, .55);
}

html[data-theme="taxi"] .thread-view-option.is-active {
  background: transparent;
  color: #ffd22e;
}

/* Keep the selected view option visually emphasized; the inactive view stays quiet. */
.thread-view-switch .thread-view-option:not(.is-active) {
  background: transparent;
  color: inherit;
}

.thread-view-switch .thread-view-option.is-active {
  background: var(--yellow);
  color: #000;
}

html[data-theme="retro"] .thread-view-switch .thread-view-option:not(.is-active) {
  background: linear-gradient(#fff, #ffe7a3);
  color: #0645ad;
}

html[data-theme="retro"] .thread-view-switch .thread-view-option.is-active {
  background: linear-gradient(#fffca8, #ff9fd2);
  color: #46105e;
}

html[data-theme="modern"] .thread-view-switch .thread-view-option:not(.is-active) {
  background: transparent;
  color: #171b24;
}

html[data-theme="modern"] .thread-view-switch .thread-view-option.is-active {
  background: #141820;
  color: #fff;
}

html[data-theme="elegant"] .thread-view-switch .thread-view-option:not(.is-active) {
  background: transparent;
  color: #4e2342;
}

html[data-theme="elegant"] .thread-view-switch .thread-view-option.is-active {
  background: rgba(90, 40, 72, .86);
  color: #fffaf4;
}

html[data-theme="cute"] .thread-view-switch .thread-view-option:not(.is-active) {
  background: transparent;
  color: #3b335c;
}

html[data-theme="cute"] .thread-view-switch .thread-view-option.is-active {
  background: #ff7fb3;
  color: #fff;
}

html[data-theme="taxi"] .thread-view-switch .thread-view-option:not(.is-active) {
  background: transparent;
  color: #ffd22e;
}

html[data-theme="taxi"] .thread-view-switch .thread-view-option.is-active {
  background: #ffd22e;
  color: #11151c;
}

html[data-theme="taxi"] .message-list.is-chat-list {
  background:
    repeating-linear-gradient(45deg, rgba(17, 21, 28, .055) 0 8px, transparent 8px 16px),
    #fffdf2;
  border-color: #11151c;
  border-radius: 8px;
  box-shadow: inset 0 -5px 0 #ffd22e, 0 14px 30px rgba(17, 21, 28, .16);
}

html[data-theme="taxi"] .message-list.is-chat-list .message {
  background: #fffdf2;
  border-color: rgba(17, 21, 28, .22);
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 8px 18px rgba(17, 21, 28, .12);
}

html[data-theme="taxi"] .message-list.is-chat-list .chat-message-bubble {
  background: #fffdf2;
  border-color: rgba(17, 21, 28, .22);
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 8px 18px rgba(17, 21, 28, .12);
}

html[data-theme="taxi"] .message-list.is-chat-list .message.is-own-message {
  background: #ffd22e;
  border-color: #11151c;
  border-radius: 12px 12px 4px 12px;
  color: #11151c;
}

html[data-theme="taxi"] .message-list.is-chat-list .message.is-own-message .chat-message-bubble {
  background: #ffd22e;
  border-color: #11151c;
  border-radius: 12px 12px 4px 12px;
  color: #11151c;
}

html[data-theme="taxi"] .message-list.is-chat-list .message.admin {
  background: #11151c;
  border-color: #11151c;
  color: #ffd22e;
}

html[data-theme="taxi"] .message-list.is-chat-list .message.admin .chat-message-bubble {
  background: #11151c;
  border-color: #11151c;
  color: #ffd22e;
}

html[data-theme="taxi"] .thread-chat-more {
  background: #ffd22e;
  color: #11151c;
  border-color: #11151c;
  border-radius: 999px;
  box-shadow: inset 0 -3px 0 rgba(17, 21, 28, .18), 2px 2px 0 rgba(17, 21, 28, .2);
}

@media (max-width: 640px) {
  .thread-message-title {
    align-items: stretch;
    flex-direction: column;
  }

  .thread-view-switch {
    width: 100%;
  }

  .message-list.is-chat-list {
    max-height: 62vh;
    min-height: 50vh;
    padding: 10px;
  }

  .message-list.is-chat-list .message {
    width: fit-content;
    max-width: min(94%, 520px);
  }

  .message-list.is-chat-list .sticker-image {
    width: 92px;
    max-width: min(58vw, 50%);
  }

  .message-list.is-chat-list .chat-sticker-image-wrap .sticker-image {
    width: min(134px, 42vw);
  }

  .message-list.is-chat-list .message-like-stamp {
    height: 38px;
    max-width: min(52%, 106px);
  }
}

.thread-reply-pagination {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.thread-reply-page-status {
  font-size: 13px;
  font-weight: bold;
  padding: 4px 10px;
  border: 3px solid #000;
  border-radius: 12px;
  background: var(--yellow);
  color: #000;
}

.thread-reply-pagination .pixel-button {
  min-width: 68px;
  padding: 8px 12px;
  min-height: 36px;
}

.thread-author-card {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 8px;
  padding: 5px 9px;
  background: var(--yellow);
  color: #000;
  border: 3px solid #000;
  border-radius: 999px;
  box-shadow: 3px 3px 0 #000;
  font-size: 13px;
}

.thread-author-card span {
  font-size: 11px;
}

.thread-author-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-thread-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.admin-thread-link:hover {
  background: var(--yellow);
  color: #000;
}

.message {
  position: relative;
  display: grid;
  gap: 6px;
  max-width: 82%;
  padding: 12px;
  background: #fff;
  border: 3px solid #000;
  border-radius: 16px;
}

.message.has-admin-delete {
  min-height: 44px;
  padding-right: 42px;
}

.message .message-delete-x {
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
}

.message.admin {
  margin-left: auto;
  background: #000;
  color: #fff;
}

.message .meta-row {
  color: inherit;
  opacity: .75;
}

.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.news-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.text-link,
.message-link,
.news-text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.sticker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 8px;
  background: var(--yellow);
  color: #000;
  border: 2px solid #000;
  border-radius: 14px;
  font-size: 13px;
}

.sticker-image {
  width: 118px;
  max-width: 45vw;
  margin-top: 4px;
}

.sticker-preview {
  min-height: 74px;
  padding: 8px;
  border: 3px solid #000;
  background: #fff;
}

.sticker-preview .sticker-image {
  width: 92px;
  margin: 0;
}

.arcade-scene {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #ddd;
  border: 4px solid #000;
}

.arcade-scene img,
.arcade-scene > picture.responsive-scene-image,
.arcade-scene > picture.responsive-scene-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cabinet-hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  min-height: 15%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  padding: 7px;
  background: #fff;
  color: #000;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  appearance: none;
  text-align: center;
  text-decoration: none;
  font-size: clamp(10px, 1.45vw, 17px);
  line-height: 1.05;
}

.cabinet-hotspot:hover {
  background: var(--yellow);
}

.cabinet-hotspot span {
  display: block;
}

.cabinet-game-button {
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}

.cabinet-screen-button {
  min-height: 19%;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  color: transparent;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.cabinet-screen-button:hover,
.cabinet-screen-button:focus,
.cabinet-screen-button:active,
.cabinet-screen-button:focus-visible {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.game-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 34px);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68) 45%, rgba(0, 0, 0, 0.42));
}

.game-menu-panel[hidden] {
  display: none;
}

.game-menu-window {
  position: relative;
  width: min(780px, calc(100vw - 28px));
  max-height: min(82vh, 640px);
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(12px, 2vw, 18px);
  padding: clamp(15px, 2.4vw, 24px);
  background: #fff;
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
}

.game-menu-window::-webkit-scrollbar {
  display: none;
}

.game-menu-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  border: 3px solid #000;
  font: inherit;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

.game-menu-close::before,
.game-menu-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 3px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: 50% 50%;
}

.game-menu-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.game-menu-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.game-menu-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0;
}

.game-menu-window h2 {
  margin: 0;
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.15;
}

.game-menu-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(8px, 2vw, 18px);
  padding-right: 42px;
}

.game-menu-title-block {
  min-width: 0;
}

.game-menu-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.game-menu-title-row h2 {
  min-width: 0;
}

.game-menu-note {
  margin: 0;
  font-size: clamp(12px, 1.55vw, 16px);
  line-height: 1;
  white-space: nowrap;
}

.game-menu-panel.is-card-kuji {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 248, 226, 0.92), rgba(198, 147, 70, 0.58) 52%, rgba(35, 22, 9, 0.54));
}

.game-menu-panel.is-card-kuji .game-menu-window {
  border: 1px solid rgba(167, 111, 32, 0.62);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 242, 0.98), rgba(247, 227, 184, 0.98));
  color: #3b2712;
  box-shadow:
    0 18px 48px rgba(38, 21, 6, 0.42),
    inset 0 0 0 2px rgba(255, 255, 255, 0.58);
}

.game-menu-panel.is-card-kuji .game-menu-kicker {
  color: #9b6d25;
  font-family: "Times New Roman", "Yu Mincho", serif;
  font-weight: 700;
}

.game-menu-panel.is-card-kuji .game-menu-window h2 {
  color: #3b2712;
  font-family: "Times New Roman", "Yu Mincho", serif;
}

.game-menu-panel.is-card-kuji .game-menu-note {
  color: #a31922;
  font-family: "Brush Script MT", "Snell Roundhand", "Times New Roman", "Yu Mincho", serif;
  font-size: clamp(13px, 2.1vw, 18px);
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 245, 220, 0.9);
}

.game-menu-panel.is-card-kuji .game-menu-note::before,
.game-menu-panel.is-card-kuji .game-menu-note::after {
  content: none;
}

.game-menu-panel.is-card-kuji .game-menu-close {
  border: 1px solid rgba(91, 55, 12, 0.42);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff9e8, #dfbd76);
  color: #3b2712;
}

.game-menu-panel.is-card-kuji .mini-button {
  border: 1px solid rgba(104, 61, 18, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, #fffaf0, #e7c47e);
  color: #3b2712;
  box-shadow:
    0 8px 20px rgba(91, 54, 16, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.58);
}

.game-menu-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0;
}

.game-menu-actions .mini-button {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 7px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.thread-edit-window {
  width: min(680px, 94vw);
}

.thread-edit-form {
  margin-top: 12px;
}

.thread-edit-actions {
  display: flex;
  justify-content: flex-end;
}

.game-rank-preview {
  min-height: 0;
  padding-top: 9px;
  border-top: 3px solid #000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.game-rank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.game-rank-tabs[hidden] {
  display: none;
}

.game-rank-tabs .rank-tab {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
}

.game-rank-tournament-meta {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 2px solid #000;
  background: #fff7d6;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.85);
}

.game-rank-tournament-meta[hidden] {
  display: none;
}

.game-rank-note {
  margin: 0;
  color: rgba(52, 36, 17, 0.72);
  font-size: clamp(10px, 1.4vw, 12px);
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.game-rank-note[hidden] {
  display: none;
}

.game-rank-tournament-copy {
  min-width: 0;
  text-align: center;
}

.game-rank-tournament-title,
.game-rank-tournament-subtitle {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-rank-tournament-title {
  color: #111;
  font-size: clamp(12px, 2.2vw, 16px);
  font-weight: 900;
  line-height: 1.12;
}

.game-rank-tournament-subtitle {
  margin-top: 2px;
  color: #5b3c13;
  font-size: clamp(9px, 1.7vw, 11px);
  font-weight: 800;
  line-height: 1.1;
}

.game-rank-page-button {
  width: 34px;
  height: 34px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #111;
  color: #ffd83d;
  box-shadow: 2px 2px 0 #000;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.game-rank-page-button:disabled {
  opacity: .38;
  cursor: default;
  filter: grayscale(.35);
}

.game-rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  max-height: min(48vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-rank-list::-webkit-scrollbar {
  display: none;
}

.game-rank-list li {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  background: #fff;
  border: 2px solid #000;
  font-size: clamp(10px, 1.55vw, 13px);
}

.game-rank-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-rank-list em {
  font-style: normal;
}

.game-rank-list li.is-card-kuji-rank {
  grid-template-columns: 1.7em minmax(118px, auto) minmax(0, 1fr) minmax(5.8em, .58fr);
}

.game-rank-list li.is-card-kuji-rank .card-kuji-rank-thumb-grid {
  display: grid;
  grid-template-columns: repeat(5, 22px);
  grid-auto-rows: 29px;
  gap: 2px;
}

.game-rank-list li.is-card-kuji-rank .card-kuji-rank-thumb {
  display: block;
  width: 22px;
  height: 29px;
  border: 1px solid currentColor;
  background-color: #fff;
  background-image: var(--card-kuji-rank-thumb, none);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.game-rank-list li.is-card-kuji-rank .card-kuji-rank-thumb-slot {
  display: block;
  width: 22px;
  height: 29px;
  border: 1px dashed rgba(139, 95, 31, 0.2);
  background: rgba(255, 255, 255, 0.36);
}

.game-rank-list li.is-card-kuji-rank .card-kuji-rank-score {
  overflow: hidden;
  color: #8b5f1f;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-rank-list li.is-card-kuji-rank small {
  display: grid;
  min-width: 0;
  font-size: 10px;
  line-height: 1.12;
}

.game-rank-list li.is-card-kuji-rank small b,
.game-rank-list li.is-card-kuji-rank small span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-menu-panel.is-card-kuji .game-rank-note {
  color: rgba(91, 61, 22, 0.72);
  font-family: "Times New Roman", "Yu Mincho", serif;
}

.arcade-player {
  background: #111;
  border: 5px solid #000;
  box-shadow: 6px 6px 0 #000;
}

.arcade-player[hidden] {
  display: none;
}

.arcade-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: repeating-linear-gradient(90deg, #000 0 12px, #fff 12px 24px);
  border-bottom: 5px solid #000;
}

.arcade-player-head span {
  padding: 6px 10px;
  background: #fff;
  border: 3px solid #000;
  line-height: 1;
}

.mini-button {
  padding: 6px 10px;
  background: var(--yellow);
  color: #000;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  line-height: 1;
}

.arcade-cabinet {
  padding: clamp(14px, 3vw, 28px);
  background:
    linear-gradient(90deg, #000 0 5%, transparent 5% 95%, #000 95%),
    repeating-linear-gradient(0deg, #1a1a1a 0 10px, #050505 10px 20px);
}

.arcade-screen-shell {
  position: relative;
  overflow: hidden;
  width: min(980px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  background: #000;
  border: 8px solid #000;
  outline: 5px solid #fff;
  box-shadow: inset 0 0 0 4px #333, 0 8px 0 #000;
}

.arcade-screen-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.arcade-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 22px auto 0;
  padding: 14px;
  width: min(360px, 100%);
  background: #fff;
  border: 4px solid #000;
}

.stick {
  width: 20px;
  height: 34px;
  background: #000;
  border: 3px solid #000;
  border-radius: 999px 999px 4px 4px;
  box-shadow: 0 22px 0 6px #fff, 0 22px 0 10px #000;
}

.push {
  width: 30px;
  height: 30px;
  background: var(--yellow);
  border: 4px solid #000;
  border-radius: 50%;
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .2);
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
}

.game-modal.open {
  display: grid;
}

.game-window {
  width: min(760px, 100%);
  background: #fff;
  border: 5px solid #000;
  box-shadow: 10px 10px 0 #000;
}

.game-screen {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 20px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 2px, transparent 2px 6px),
    #fff;
  border-bottom: 4px solid #000;
  text-align: center;
}

.game-screen h2 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(30px, 6vw, 58px);
  line-height: 1;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
}

.admin-lock {
  max-width: 520px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 3px solid #000;
}

.admin-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.admin-reply-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 4px solid #000;
  text-align: center;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

html[data-theme="retro"] {
  --black: #201900;
  --ink: #221d15;
  --paper: #fffde8;
  --soft: #fff7c7;
  --gray: #9eb0c9;
  --yellow: #fff36a;
  --green: #d5ffd0;
  --danger: #ffe4ef;
}

html[data-theme="retro"] body {
  background-color: #6ecbf2;
  background-image:
    radial-gradient(circle at 7px 7px, rgba(255, 255, 255, .55) 0 2px, transparent 2px),
    linear-gradient(45deg, rgba(255, 246, 121, .45) 25%, transparent 25% 75%, rgba(255, 246, 121, .45) 75%),
    linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, .32) 25% 75%, transparent 75%);
  background-position: 0 0, 0 0, 10px 10px;
  background-size: 16px 16px, 20px 20px, 20px 20px;
  color: #1f2608;
  font-family: Verdana, "MS PGothic", "Osaka", sans-serif;
  font-weight: 700;
  image-rendering: auto;
}

html[data-theme="retro"] a {
  color: #0645ad;
}

html[data-theme="retro"] .site-shell {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .62) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .62) 0 1px, transparent 1px),
    #fffbd7;
  background-size: 22px 22px;
  border-left-color: #f5c04b;
  border-right-color: #f5c04b;
  box-shadow: 0 0 0 2px #1576c7 inset;
}

html[data-theme="retro"] .top-title {
  background: linear-gradient(90deg, #ff6fb2, #fff36a 38%, #72d6ff 70%, #9aff81);
  color: #13216f;
  border: 4px double #1546bc;
  box-shadow: 0 0 0 4px rgba(255,255,255,.65) inset, 5px 5px 0 rgba(8, 40, 115, .22);
  text-shadow: 1px 1px 0 #fff;
}

html[data-theme="retro"] .admin-mode-bar,
html[data-theme="retro"] .theme-switcher,
html[data-theme="retro"] .ticker,
html[data-theme="retro"] .sidebar,
html[data-theme="retro"] .content,
html[data-theme="retro"] .iframe-board,
html[data-theme="retro"] .panel,
html[data-theme="retro"] .portrait-card,
html[data-theme="retro"] .news-item,
html[data-theme="retro"] .mini-card,
html[data-theme="retro"] .bbs-map,
html[data-theme="retro"] .arcade-scene,
html[data-theme="retro"] .game-window {
  border-color: #274f9e;
  outline-color: #fff;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .28);
}

html[data-theme="retro"] .theme-switcher {
  background: #fff8d6;
  border-style: ridge;
  color: #21386f;
}

html[data-theme="retro"] .theme-switcher button,
html[data-theme="retro"] .pixel-button,
html[data-theme="retro"] .district-tabs button,
html[data-theme="retro"] .slot-tabs button,
html[data-theme="retro"] .icon-picker button,
html[data-theme="retro"] .character-option,
html[data-theme="retro"] .sticker-option,
html[data-theme="retro"] .mini-button {
  background: linear-gradient(#fff, #ffe7a3);
  color: #063d94;
  border-color: #274f9e;
  border-style: outset;
  box-shadow: 2px 2px 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .theme-switcher button.active,
html[data-theme="retro"] .pixel-button:hover,
html[data-theme="retro"] .district-tabs button:hover,
html[data-theme="retro"] .slot-tabs button:hover,
html[data-theme="retro"] .icon-picker button:hover,
html[data-theme="retro"] .character-option:hover,
html[data-theme="retro"] .sticker-option:hover,
html[data-theme="retro"] .pixel-button.active,
html[data-theme="retro"] .district-tabs button.active,
html[data-theme="retro"] .slot-tabs button.active,
html[data-theme="retro"] .icon-picker button.active,
html[data-theme="retro"] .character-option.active,
html[data-theme="retro"] .sticker-option.active {
  background: linear-gradient(#fffca8, #ff9fd2);
  color: #46105e;
}

html[data-theme="retro"] .ticker {
  background: #fff36a;
  color: #c00000;
  border: 3px ridge #e34886;
  box-shadow: 0 0 0 2px #fff inset;
}

html[data-theme="retro"] .ticker-track {
  font-size: 16px;
}

html[data-theme="retro"] .ticker-link.celebration {
  color: #d0006f;
  text-shadow:
    1px 1px 0 #fff,
    0 0 10px #ff9fd2,
    0 0 14px #fff36a;
}

html[data-theme="retro"] .ticker-link.presence {
  background: #1546bc;
  color: #fff;
}

html[data-theme="retro"] .sidebar,
html[data-theme="retro"] .content,
html[data-theme="retro"] .iframe-board,
html[data-theme="retro"] .panel,
html[data-theme="retro"] .portrait-card,
html[data-theme="retro"] .mini-card,
html[data-theme="retro"] .news-item {
  background: #fffef0;
}

html[data-theme="retro"] .side-head,
html[data-theme="retro"] .content-head,
html[data-theme="retro"] .panel-title,
html[data-theme="retro"] .iframe-title {
  background: linear-gradient(90deg, #2467d8, #87e7ff);
  color: #fff;
  border-color: #274f9e;
  text-shadow: 1px 1px 0 #152c7a;
}

html[data-theme="retro"] .side-link {
  color: #0645ad;
  text-decoration: underline;
}

html[data-theme="retro"] .side-icon {
  background: radial-gradient(circle at 30% 30%, #fff 0 24%, #ffec8a 25% 58%, #78d9ff 59%);
  border-color: #274f9e;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .nav-svg {
  fill: #fffbe9;
  stroke: #1744a7;
}

html[data-theme="retro"] .nav-svg circle {
  fill: #ff66ad;
  stroke: #1744a7;
}

html[data-theme="retro"] .content-inner {
  background:
    linear-gradient(rgba(255,255,255,.58), rgba(255,255,255,.58)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(106, 166, 228, .15) 23px 24px);
}

html[data-theme="retro"] .page-title {
  color: #1243a6;
  border-bottom-color: #ff78b4;
  text-shadow: 1px 1px 0 #fff;
}

html[data-theme="retro"] .hero-image,
html[data-theme="retro"] .portrait-frame {
  background: #fff;
  border: 5px ridge #f3bf4e;
}

html[data-theme="retro"] .hero-image img,
html[data-theme="retro"] .portrait-frame img {
  border-color: #fff;
  filter: none;
  image-rendering: auto;
}

html[data-theme="retro"] .portrait-card::before,
html[data-theme="retro"] .portrait-card::after,
html[data-theme="retro"] .portrait-bottom {
  display: none;
}

html[data-theme="retro"] .sns-panel {
  border-top-color: #ff78b4;
  border-bottom-color: #ff78b4;
}

html[data-theme="retro"] .sns-title {
  color: #b00072;
  text-shadow: 1px 1px 0 #fff;
}

html[data-theme="retro"] .sns-links a {
  background: linear-gradient(#8ee8ff, #2d62cf);
  color: #fff;
  border-color: #274f9e;
  outline-color: #fff;
  text-shadow: 1px 1px 0 #001b59;
}

html[data-theme="retro"] .counter {
  background: #101010;
  color: #7cff55;
  border: 4px ridge #f3bf4e;
  outline-color: #fff;
  box-shadow: inset 0 0 12px rgba(124,255,85,.22);
}

html[data-theme="retro"] .counter.is-celebrating::after,
html[data-theme="retro"] .thread-author-card {
  background: #fff36a;
  border-color: #e34886;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .counter-popup-card {
  background: #fffef8;
  border-color: #274f9e;
  outline-color: #fff36a;
  box-shadow: 8px 8px 0 rgba(39, 79, 158, .45);
}

html[data-theme="retro"] .counter-popup-kicker {
  background: #1546bc;
  color: #fff36a;
}

html[data-theme="retro"] .counter-popup-label {
  background: #fff36a;
  border-color: #e34886;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .35);
  color: #13216f;
}

html[data-theme="retro"] .counter-burst {
  border-color: #274f9e;
}

html[data-theme="retro"] .news-item.pinned,
html[data-theme="retro"] .news-item.express-news {
  background: #fff36a;
  border-color: #e34886;
}

html[data-theme="retro"] .tag {
  background: #2366d8;
  color: #fff;
  border-color: #163b9b;
}

html[data-theme="retro"] .tag.light {
  background: #fff;
  color: #1546bc;
}

html[data-theme="retro"] .tag.live,
html[data-theme="retro"] .activity-mark {
  background: #ff78b4;
  color: #fff;
  border-color: #8f0a62;
}

html[data-theme="retro"] .bbs-map,
html[data-theme="retro"] .arcade-scene {
  background: #a6e3ff;
  border-style: ridge;
}

html[data-theme="retro"] .bbs-map::before,
html[data-theme="retro"] .arcade-scene::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: none;
  mix-blend-mode: color;
  pointer-events: none;
}

html[data-theme="retro"] .bbs-map > img,
html[data-theme="retro"] .bbs-map > picture.responsive-scene-image > img,
html[data-theme="retro"] .arcade-scene img,
html[data-theme="retro"] .arcade-scene > picture.responsive-scene-image > img {
  filter: none;
  image-rendering: auto;
}

html[data-theme="retro"] .thread-marker,
html[data-theme="retro"] .cabinet-hotspot {
  z-index: 2;
}

html[data-theme="retro"] .game-menu-panel {
  background: rgba(255, 255, 210, .7);
}

html[data-theme="retro"] .game-menu-window,
html[data-theme="retro"] .game-rank-list li {
  background: #fffef8;
  border-color: #274f9e;
  box-shadow: 4px 4px 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .home-movie-frame {
  border-color: #f3bf4e;
  background: #fffef8;
}

html[data-theme="retro"] .homepage-video-credit {
  background:
    linear-gradient(90deg, rgba(255, 120, 180, .16), rgba(255, 243, 106, .4), rgba(110, 203, 242, .2)),
    #fffef8;
  color: #1546bc;
  border-color: #274f9e;
  box-shadow: 4px 4px 0 rgba(39, 79, 158, .3);
}

html[data-theme="retro"] .homepage-video-credit strong {
  color: #1243a6;
}

html[data-theme="retro"] .homepage-video-label {
  background: #fff36a;
  color: #1243a6;
  border-color: #274f9e;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .34);
}

html[data-theme="retro"] .homepage-video-play {
  background: #fffef8;
  color: #1243a6;
  border-color: #274f9e;
  box-shadow: 4px 4px 0 rgba(39, 79, 158, .34);
}

html[data-theme="retro"] .homepage-video-play:hover {
  background: #fff36a;
}

html[data-theme] .selected-sticker .protected-sticker-image,
html[data-theme] .sticker-option .protected-sticker-image,
html[data-theme] .sticker-image {
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

html[data-theme="retro"] .game-rank-preview {
  border-top-color: #274f9e;
}

html[data-theme="retro"] .thread-marker.is-bubble-pulse {
  z-index: 50;
}

html[data-theme="retro"] .thread-bubble {
  background: #fffef8;
  border-color: #274f9e;
  box-shadow: var(--map-bubble-shadow) var(--map-bubble-shadow) 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .thread-bubble::after {
  background: #fffef8;
  border-color: #274f9e;
}

html[data-theme="retro"] .thread-owner-name {
  background: rgba(255, 254, 248, .96);
  border-color: #274f9e;
  box-shadow: .38cqw .38cqw 0 rgba(39, 79, 158, .35);
  color: #1546bc;
}

html[data-theme="retro"] .thread-avatar,
html[data-theme="retro"] .character-option img,
html[data-theme="retro"] .thread-head-avatar-frame {
  filter: drop-shadow(3px 3px 0 rgba(39, 79, 158, .35));
  image-rendering: auto;
}

html[data-theme="retro"] .thread-head-avatar-frame,
html[data-theme="retro"] .admin-delete-x {
  border-color: #274f9e;
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .admin-delete-x {
  background: #ff9fd2;
  color: #46105e;
}

html[data-theme="retro"] .field input,
html[data-theme="retro"] .field textarea,
html[data-theme="retro"] .field select,
html[data-theme="retro"] .admin-row,
html[data-theme="retro"] .message,
html[data-theme="retro"] .sticker-preview,
html[data-theme="retro"] .selected-sticker .protected-sticker-image,
html[data-theme="retro"] .sticker-option .protected-sticker-image,
html[data-theme="retro"] .sticker-image {
  border-color: #274f9e;
}

html[data-theme="retro"] .message {
  background: #fffef8;
}

html[data-theme="retro"] .message.admin {
  background: #1546bc;
  color: #fff;
}

html[data-theme="retro"] .arcade-player {
  background: #2a2461;
  border-color: #274f9e;
  box-shadow: 4px 4px 0 rgba(39, 79, 158, .35);
}

html[data-theme="retro"] .arcade-player-head {
  background: linear-gradient(90deg, #ff78b4, #fff36a, #72d6ff);
  border-bottom-color: #274f9e;
}

html[data-theme="retro"] .arcade-cabinet {
  background:
    linear-gradient(90deg, #31388e 0 6%, transparent 6% 94%, #31388e 94%),
    repeating-linear-gradient(0deg, #2d62cf 0 12px, #1744a7 12px 24px);
}

html[data-theme="retro"] .arcade-screen-shell {
  border-color: #151515;
  outline-color: #fff36a;
  box-shadow: inset 0 0 0 4px #333, 0 8px 0 rgba(0,0,0,.35);
}

html[data-theme="retro"] .footer {
  border-top-color: #ff78b4;
  color: #1546bc;
}

html[data-theme="modern"] {
  --black: #141820;
  --ink: #171b24;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --gray: #667085;
  --yellow: #f4c542;
  --green: #55c78a;
  --danger: #ffe2e8;
  color-scheme: light;
}

html[data-theme="modern"] body {
  background-color: #eef2f7;
  background-image:
    linear-gradient(rgba(20, 24, 32, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 32, .055) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 32px 32px;
  color: #171b24;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  image-rendering: auto;
}

html[data-theme="modern"] a {
  color: #1769e0;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

html[data-theme="modern"] .site-shell {
  background: rgba(255, 255, 255, .88);
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow:
    0 28px 80px rgba(20, 24, 32, .16),
    0 0 0 1px rgba(20, 24, 32, .08);
  backdrop-filter: blur(16px);
}

html[data-theme="modern"] .top-title {
  background: #141820;
  color: #f8fbff;
  border-color: #141820;
  border-style: solid;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(20, 24, 32, .2);
  letter-spacing: 0;
  text-shadow: none;
}

html[data-theme="modern"] .admin-mode-bar,
html[data-theme="modern"] .theme-switcher,
html[data-theme="modern"] .ticker,
html[data-theme="modern"] .sidebar,
html[data-theme="modern"] .content,
html[data-theme="modern"] .iframe-board,
html[data-theme="modern"] .panel,
html[data-theme="modern"] .portrait-card,
html[data-theme="modern"] .news-item,
html[data-theme="modern"] .mini-card,
html[data-theme="modern"] .bbs-map,
html[data-theme="modern"] .arcade-scene,
html[data-theme="modern"] .game-window {
  border-color: rgba(20, 24, 32, .12);
  border-style: solid;
  outline-color: transparent;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(20, 24, 32, .1);
}

html[data-theme="modern"] .admin-mode-bar,
html[data-theme="modern"] .theme-switcher {
  background: rgba(255, 255, 255, .92);
  color: #475467;
  backdrop-filter: blur(12px);
}

html[data-theme="modern"] .theme-switcher span {
  color: #667085;
  font-weight: 800;
}

html[data-theme="modern"] .theme-switcher button,
html[data-theme="modern"] .pixel-button,
html[data-theme="modern"] .district-tabs button,
html[data-theme="modern"] .slot-tabs button,
html[data-theme="modern"] .icon-picker button,
html[data-theme="modern"] .character-option,
html[data-theme="modern"] .sticker-option,
html[data-theme="modern"] .mini-button {
  background: #f7f9fc;
  color: #171b24;
  border-color: #d8dee8;
  border-style: solid;
  border-radius: 8px;
  box-shadow: none;
  text-shadow: none;
}

html[data-theme="modern"] .theme-switcher button.active,
html[data-theme="modern"] .pixel-button:hover,
html[data-theme="modern"] .district-tabs button:hover,
html[data-theme="modern"] .slot-tabs button:hover,
html[data-theme="modern"] .icon-picker button:hover,
html[data-theme="modern"] .character-option:hover,
html[data-theme="modern"] .sticker-option:hover,
html[data-theme="modern"] .pixel-button.active,
html[data-theme="modern"] .district-tabs button.active,
html[data-theme="modern"] .slot-tabs button.active,
html[data-theme="modern"] .icon-picker button.active,
html[data-theme="modern"] .character-option.active,
html[data-theme="modern"] .sticker-option.active {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
}

html[data-theme="modern"] .ticker {
  background: #ffffff;
  color: #171b24;
  border-color: rgba(20, 24, 32, .12);
  outline-color: transparent;
  box-shadow: 0 10px 28px rgba(20, 24, 32, .08);
}

html[data-theme="modern"] .ticker-track {
  font-size: 15px;
}

html[data-theme="modern"] .ticker-link.celebration {
  color: #c14379;
  text-shadow: none;
}

html[data-theme="modern"] .ticker-link.presence {
  background: #141820;
  color: #ffffff;
  border-radius: 4px;
}

html[data-theme="modern"] .sidebar,
html[data-theme="modern"] .content,
html[data-theme="modern"] .iframe-board,
html[data-theme="modern"] .panel,
html[data-theme="modern"] .portrait-card,
html[data-theme="modern"] .mini-card,
html[data-theme="modern"] .news-item {
  background: rgba(255, 255, 255, .94);
}

html[data-theme="modern"] .side-head,
html[data-theme="modern"] .content-head,
html[data-theme="modern"] .panel-title,
html[data-theme="modern"] .iframe-title {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
  border-style: solid;
  text-shadow: none;
}

html[data-theme="modern"] .side-link {
  color: #171b24;
  text-decoration: none;
}

html[data-theme="modern"] .side-link:hover {
  color: #1769e0;
}

html[data-theme="modern"] .side-icon {
  background: #f4c542;
  border-color: #141820;
  box-shadow: none;
}

html[data-theme="modern"] .nav-svg {
  fill: #f8fbff;
  stroke: #141820;
}

html[data-theme="modern"] .nav-svg circle {
  fill: #f4c542;
  stroke: #141820;
}

html[data-theme="modern"] .content-inner {
  background: #f8fafc;
}

html[data-theme="modern"] .page-title {
  color: #141820;
  border-bottom-color: #d8dee8;
  text-shadow: none;
}

html[data-theme="modern"] .hero-image,
html[data-theme="modern"] .portrait-frame {
  overflow: hidden;
  background: #eef2f7;
  border-color: #d8dee8;
  border-style: solid;
  border-radius: 8px;
}

html[data-theme="modern"] .hero-image img,
html[data-theme="modern"] .portrait-frame img {
  border-color: transparent;
  filter: saturate(1.02) contrast(1.01);
  image-rendering: auto;
}

html[data-theme="modern"] .portrait-card::before,
html[data-theme="modern"] .portrait-card::after,
html[data-theme="modern"] .portrait-bottom {
  display: none;
}

html[data-theme="modern"] .sns-panel {
  border-top-color: #d8dee8;
  border-bottom-color: #d8dee8;
}

html[data-theme="modern"] .sns-title {
  color: #141820;
  text-shadow: none;
}

html[data-theme="modern"] .sns-links a {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
  border-radius: 8px;
  outline-color: transparent;
  box-shadow: none;
  text-decoration: none;
  text-shadow: none;
}

html[data-theme="modern"] .counter {
  background: #141820;
  color: #55c78a;
  border-color: #141820;
  outline-color: transparent;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

html[data-theme="modern"] .counter.is-celebrating::after,
html[data-theme="modern"] .thread-author-card {
  background: #fff7cc;
  border-color: #e8c95a;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 24, 32, .1);
}

html[data-theme="modern"] .counter-popup-card {
  background: #ffffff;
  border-color: #d8dee8;
  outline-color: transparent;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(20, 24, 32, .2);
}

html[data-theme="modern"] .counter-popup-kicker {
  background: #141820;
  color: #ffffff;
}

html[data-theme="modern"] .counter-popup-label {
  background: #fff7cc;
  border-color: #e8c95a;
  box-shadow: none;
  color: #141820;
}

html[data-theme="modern"] .counter-burst {
  border-color: #d8dee8;
}

html[data-theme="modern"] .news-item.pinned,
html[data-theme="modern"] .news-item.express-news {
  background: #fff7cc;
  border-color: #e8c95a;
}

html[data-theme="modern"] .tag {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
  border-radius: 4px;
}

html[data-theme="modern"] .tag.light {
  background: #eef2f7;
  color: #344054;
  border-color: #d8dee8;
}

html[data-theme="modern"] .tag.live,
html[data-theme="modern"] .activity-mark {
  background: #e9f8f0;
  color: #16744b;
  border-color: #b8e5cb;
}

html[data-theme="modern"] .bbs-map,
html[data-theme="modern"] .arcade-scene {
  background: #eef2f7;
  border-color: #d8dee8;
}

html[data-theme="modern"] .bbs-map::before,
html[data-theme="modern"] .arcade-scene::before {
  content: none;
}

html[data-theme="modern"] .bbs-map > img,
html[data-theme="modern"] .bbs-map > picture.responsive-scene-image > img,
html[data-theme="modern"] .arcade-scene img,
html[data-theme="modern"] .arcade-scene > picture.responsive-scene-image > img {
  filter: saturate(1.02) contrast(1.01);
  image-rendering: auto;
}

html[data-theme="modern"] .game-menu-panel {
  background: rgba(20, 24, 32, .42);
}

html[data-theme="modern"] .game-menu-window,
html[data-theme="modern"] .game-rank-list li {
  background: #ffffff;
  border-color: #d8dee8;
  border-radius: 8px;
  box-shadow: 0 20px 54px rgba(20, 24, 32, .16);
}

html[data-theme="modern"] .game-rank-preview {
  border-top-color: #d8dee8;
}

html[data-theme="modern"] .thread-marker.is-bubble-pulse {
  z-index: 50;
}

html[data-theme="modern"] .thread-bubble {
  background: #ffffff;
  border-color: #d8dee8;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 24, 32, .12);
}

html[data-theme="modern"] .thread-bubble::after {
  background: #ffffff;
  border-color: #d8dee8;
}

html[data-theme="modern"] .thread-owner-name {
  background: rgba(255, 255, 255, .96);
  border-color: #d8dee8;
  border-radius: 6px;
  box-shadow: 0 .5cqw 1.2cqw rgba(20, 24, 32, .16);
  color: #171b24;
}

html[data-theme="modern"] .thread-avatar,
html[data-theme="modern"] .character-option img,
html[data-theme="modern"] .thread-head-avatar-frame {
  filter: drop-shadow(0 8px 14px rgba(20, 24, 32, .18));
  image-rendering: auto;
}

html[data-theme="modern"] .thread-head-avatar-frame,
html[data-theme="modern"] .admin-delete-x {
  border-color: #d8dee8;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(20, 24, 32, .1);
}

html[data-theme="modern"] .admin-delete-x {
  background: #fff;
  color: #141820;
}

html[data-theme="elegant"] .admin-delete-x {
  background: rgba(255, 250, 244, .92);
  color: #5a2848;
  border-color: rgba(216, 183, 94, .72);
  box-shadow: 0 8px 18px rgba(35, 22, 41, .12);
}

html[data-theme="cute"] .admin-delete-x {
  background: #ff7fb3;
  color: #fff;
  border-color: #f0d7e8;
  box-shadow: 0 8px 18px rgba(155, 83, 130, .12);
}

html[data-theme="taxi"] .admin-delete-x {
  background: #ffd22e;
  color: #11151c;
  border-color: #11151c;
  box-shadow: 2px 2px 0 rgba(17, 21, 28, .24);
}

html[data-theme="retro"] .admin-delete-x:hover {
  background: #274f9e;
  color: #fffca8;
}

html[data-theme="modern"] .admin-delete-x:hover {
  background: #141820;
  color: #fff;
}

html[data-theme="elegant"] .admin-delete-x:hover {
  background: #5a2848;
  color: #fffaf4;
}

html[data-theme="cute"] .admin-delete-x:hover {
  background: #3b335c;
  color: #fff6fa;
}

html[data-theme="taxi"] .admin-delete-x:hover {
  background: #11151c;
  color: #ffd22e;
}

html[data-theme="modern"] .field input,
html[data-theme="modern"] .field textarea,
html[data-theme="modern"] .field select,
html[data-theme="modern"] .admin-row,
html[data-theme="modern"] .message,
html[data-theme="modern"] .sticker-preview,
html[data-theme="modern"] .selected-sticker .protected-sticker-image,
html[data-theme="modern"] .sticker-option .protected-sticker-image,
html[data-theme="modern"] .sticker-image {
  border-color: #d8dee8;
  border-style: solid;
  border-radius: 8px;
}

html[data-theme="modern"] .message {
  background: #ffffff;
}

html[data-theme="modern"] .message.admin {
  background: #141820;
  color: #ffffff;
}

html[data-theme="modern"] .arcade-player {
  background: #141820;
  border-color: #141820;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(20, 24, 32, .2);
}

html[data-theme="modern"] .arcade-player-head {
  background: #f4c542;
  border-bottom-color: #141820;
}

html[data-theme="modern"] .arcade-cabinet {
  background:
    linear-gradient(90deg, #141820 0 6%, transparent 6% 94%, #141820 94%),
    linear-gradient(0deg, #1769e0, #20c997);
}

html[data-theme="modern"] .arcade-screen-shell {
  border-color: #141820;
  outline-color: #f4c542;
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .18), 0 12px 28px rgba(20, 24, 32, .22);
}

html[data-theme="modern"] .home-movie-frame {
  background: #ffffff;
  border-color: #d8dee8;
  border-radius: 8px;
}

html[data-theme="modern"] .homepage-video-credit {
  background: #ffffff;
  color: #475467;
  border-color: #d8dee8;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(20, 24, 32, .09);
}

html[data-theme="modern"] .homepage-video-credit strong {
  color: #141820;
}

html[data-theme="modern"] .homepage-video-label {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
  border-radius: 8px;
  box-shadow: none;
}

html[data-theme="modern"] .homepage-video-play {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(20, 24, 32, .18);
}

html[data-theme="modern"] .homepage-video-play:hover {
  background: #1769e0;
}

html[data-theme="modern"] .footer {
  border-top-color: #d8dee8;
  color: #667085;
}

html[data-theme="elegant"] {
  --black: #231629;
  --ink: #2b2132;
  --paper: #fffaf4;
  --soft: #f2eee7;
  --gray: #796f82;
  --yellow: #d8b75e;
  --green: #8fae9d;
  --danger: #f3d8df;
  --elegant-display-font: "Baskerville", "Didot", "Bodoni 72", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  color-scheme: light;
}

html[data-theme="elegant"] body {
  background-color: #1e2433;
  background-image:
    radial-gradient(circle at 18% 8%, rgba(216, 183, 94, .22), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(129, 86, 116, .32), transparent 30%),
    linear-gradient(135deg, #1e2433 0%, #3e2037 45%, #f5efe4 45.2%, #f5efe4 100%);
  background-attachment: fixed;
  color: #2b2132;
  font-family: var(--elegant-display-font);
  font-weight: 700;
  image-rendering: auto;
}

html[data-theme="elegant"] a {
  color: #6d3354;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

html[data-theme="elegant"] .site-shell {
  background: rgba(255, 250, 244, .92);
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow: 0 30px 90px rgba(23, 18, 28, .24), 0 0 0 1px rgba(216, 183, 94, .28);
}

html[data-theme="elegant"] .top-title {
  background: linear-gradient(90deg, #231629, #5a2848);
  color: #fffaf4;
  border-color: #d8b75e;
  border-style: solid;
  border-radius: 8px;
  box-shadow: inset 0 -5px 0 #d8b75e, 0 18px 44px rgba(35, 22, 41, .24);
  letter-spacing: 0;
  text-shadow: none;
}

html[data-theme="elegant"] .admin-mode-bar,
html[data-theme="elegant"] .theme-switcher,
html[data-theme="elegant"] .ticker,
html[data-theme="elegant"] .sidebar,
html[data-theme="elegant"] .content,
html[data-theme="elegant"] .iframe-board,
html[data-theme="elegant"] .panel,
html[data-theme="elegant"] .portrait-card,
html[data-theme="elegant"] .news-item,
html[data-theme="elegant"] .mini-card,
html[data-theme="elegant"] .bbs-map,
html[data-theme="elegant"] .arcade-scene,
html[data-theme="elegant"] .game-window {
  border-color: rgba(83, 56, 73, .18);
  border-style: solid;
  outline-color: transparent;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(35, 22, 41, .12);
}

html[data-theme="elegant"] .admin-mode-bar,
html[data-theme="elegant"] .theme-switcher {
  background: rgba(255, 250, 244, .94);
  color: #5a2848;
}

html[data-theme="elegant"] .theme-switcher span {
  color: #8b6b2f;
}

html[data-theme="elegant"] .theme-switcher button,
html[data-theme="elegant"] .pixel-button,
html[data-theme="elegant"] .district-tabs button,
html[data-theme="elegant"] .slot-tabs button,
html[data-theme="elegant"] .icon-picker button,
html[data-theme="elegant"] .character-option,
html[data-theme="elegant"] .sticker-option,
html[data-theme="elegant"] .mini-button {
  background: #fffaf4;
  color: #2b2132;
  border-color: rgba(90, 40, 72, .22);
  border-style: solid;
  border-radius: 8px;
  box-shadow: none;
  text-shadow: none;
}

html[data-theme="elegant"] .theme-switcher button.active,
html[data-theme="elegant"] .pixel-button:hover,
html[data-theme="elegant"] .district-tabs button:hover,
html[data-theme="elegant"] .slot-tabs button:hover,
html[data-theme="elegant"] .icon-picker button:hover,
html[data-theme="elegant"] .character-option:hover,
html[data-theme="elegant"] .sticker-option:hover,
html[data-theme="elegant"] .pixel-button.active,
html[data-theme="elegant"] .district-tabs button.active,
html[data-theme="elegant"] .slot-tabs button.active,
html[data-theme="elegant"] .icon-picker button.active,
html[data-theme="elegant"] .character-option.active,
html[data-theme="elegant"] .sticker-option.active {
  background: #5a2848;
  color: #fffaf4;
  border-color: #5a2848;
}

html[data-theme="elegant"] .ticker {
  background: #efe3c7;
  color: #5a2848;
  border-color: rgba(90, 40, 72, .14);
  box-shadow: inset 0 -4px 0 #d8b75e, 0 10px 28px rgba(35, 22, 41, .08);
}

html[data-theme="elegant"] .ticker-link.celebration {
  color: #8a314f;
  text-shadow: none;
}

html[data-theme="elegant"] .ticker-link.presence {
  background: #231629;
  color: #f5dd92;
  border-radius: 4px;
}

html[data-theme="elegant"] .sidebar,
html[data-theme="elegant"] .content,
html[data-theme="elegant"] .iframe-board,
html[data-theme="elegant"] .panel,
html[data-theme="elegant"] .portrait-card,
html[data-theme="elegant"] .mini-card,
html[data-theme="elegant"] .news-item {
  background: rgba(255, 250, 244, .95);
}

html[data-theme="elegant"] .side-head,
html[data-theme="elegant"] .content-head,
html[data-theme="elegant"] .panel-title,
html[data-theme="elegant"] .iframe-title {
  background: linear-gradient(90deg, #231629, #5a2848);
  color: #fffaf4;
  border-color: #d8b75e;
  text-shadow: none;
}

html[data-theme="elegant"] .side-link {
  color: #5a2848;
  text-decoration: none;
}

html[data-theme="elegant"] .side-link:hover {
  color: #8b6b2f;
}

html[data-theme="elegant"] .side-icon {
  background: #efe3c7;
  border-color: #d8b75e;
  box-shadow: none;
}

html[data-theme="elegant"] .nav-svg {
  fill: #fffaf4;
  stroke: #5a2848;
}

html[data-theme="elegant"] .nav-svg circle {
  fill: #d8b75e;
  stroke: #5a2848;
}

html[data-theme="elegant"] .content-inner,
html[data-theme="elegant"] .iframe-body,
html[data-theme="elegant"] .panel-body {
  background: #fffaf4;
}

html[data-theme="elegant"] .page-title,
html[data-theme="elegant"] .sns-title {
  color: #231629;
  border-bottom-color: #d8b75e;
  text-shadow: none;
}

html[data-theme="elegant"] .hero-image,
html[data-theme="elegant"] .portrait-frame,
html[data-theme="elegant"] .home-movie-frame {
  background: #f6f0e7;
  border-color: #d8b75e;
  border-style: solid;
  border-radius: 8px;
}

html[data-theme="elegant"] .portrait-card::before,
html[data-theme="elegant"] .portrait-card::after,
html[data-theme="elegant"] .portrait-bottom {
  display: none;
}

html[data-theme="elegant"] .sns-links a,
html[data-theme="elegant"] .homepage-video-play {
  background: #231629;
  color: #fffaf4;
  border-color: #231629;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(35, 22, 41, .18);
  text-shadow: none;
}

html[data-theme="elegant"] .homepage-video-credit {
  background: #fffaf4;
  color: #6f6172;
  border-color: rgba(90, 40, 72, .16);
}

html[data-theme="elegant"] .homepage-video-credit strong,
html[data-theme="elegant"] .counter {
  color: #d8b75e;
}

html[data-theme="elegant"] .homepage-video-label {
  background: #5a2848;
  color: #fffaf4;
  border-color: #5a2848;
}

html[data-theme="elegant"] .counter {
  background: #231629;
  border-color: #231629;
  outline-color: transparent;
  border-radius: 8px;
}

html[data-theme="cute"] {
  --black: #3b335c;
  --ink: #3b335c;
  --paper: #fff9fd;
  --soft: #f8efff;
  --gray: #7b7198;
  --yellow: #ffe98f;
  --green: #aaf5dd;
  --danger: #ffd3e2;
  color-scheme: light;
}

html[data-theme="cute"] body {
  background-color: #ffe9f2;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, .8) 0 3px, transparent 3px),
    radial-gradient(circle at 76% 12%, rgba(170, 245, 221, .55), transparent 26%),
    linear-gradient(135deg, #ffe9f2 0%, #f1edff 46%, #eafff7 100%);
  background-position: 0 0, 0 0, 0 0;
  background-size: 28px 28px, auto, auto;
  color: #3b335c;
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", system-ui, sans-serif;
  font-weight: 800;
  image-rendering: auto;
}

html[data-theme="cute"] a {
  color: #c23d78;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

html[data-theme="cute"] .site-shell {
  background: rgba(255, 249, 253, .9);
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow: 0 28px 80px rgba(155, 83, 130, .18), 0 0 0 1px rgba(255, 255, 255, .85);
}

html[data-theme="cute"] .top-title {
  background: linear-gradient(90deg, #ff9fc8, #ffe98f 44%, #aaf5dd);
  color: #3b335c;
  border-color: #ffffff;
  border-style: solid;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(255, 120, 176, .22);
  letter-spacing: 0;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, .75);
}

html[data-theme="cute"] .admin-mode-bar,
html[data-theme="cute"] .theme-switcher,
html[data-theme="cute"] .ticker,
html[data-theme="cute"] .sidebar,
html[data-theme="cute"] .content,
html[data-theme="cute"] .iframe-board,
html[data-theme="cute"] .panel,
html[data-theme="cute"] .portrait-card,
html[data-theme="cute"] .news-item,
html[data-theme="cute"] .mini-card,
html[data-theme="cute"] .bbs-map,
html[data-theme="cute"] .arcade-scene,
html[data-theme="cute"] .game-window {
  border-color: rgba(151, 92, 134, .15);
  border-style: solid;
  outline-color: transparent;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(155, 83, 130, .12);
}

html[data-theme="cute"] .admin-mode-bar,
html[data-theme="cute"] .theme-switcher {
  background: rgba(255, 255, 255, .9);
  color: #7b7198;
}

html[data-theme="cute"] .theme-switcher span {
  color: #c23d78;
}

html[data-theme="cute"] .theme-switcher button,
html[data-theme="cute"] .pixel-button,
html[data-theme="cute"] .district-tabs button,
html[data-theme="cute"] .slot-tabs button,
html[data-theme="cute"] .icon-picker button,
html[data-theme="cute"] .character-option,
html[data-theme="cute"] .sticker-option,
html[data-theme="cute"] .mini-button {
  background: #ffffff;
  color: #3b335c;
  border-color: #f0d7e8;
  border-style: solid;
  border-radius: 8px;
  box-shadow: none;
  text-shadow: none;
}

html[data-theme="cute"] .theme-switcher button.active,
html[data-theme="cute"] .pixel-button:hover,
html[data-theme="cute"] .district-tabs button:hover,
html[data-theme="cute"] .slot-tabs button:hover,
html[data-theme="cute"] .icon-picker button:hover,
html[data-theme="cute"] .character-option:hover,
html[data-theme="cute"] .sticker-option:hover,
html[data-theme="cute"] .pixel-button.active,
html[data-theme="cute"] .district-tabs button.active,
html[data-theme="cute"] .slot-tabs button.active,
html[data-theme="cute"] .icon-picker button.active,
html[data-theme="cute"] .character-option.active,
html[data-theme="cute"] .sticker-option.active {
  background: #ff7fb3;
  color: #ffffff;
  border-color: #ff7fb3;
}

html[data-theme="cute"] .ticker {
  background: #fff6ba;
  color: #3b335c;
  border-color: #ffe98f;
  box-shadow: inset 0 -4px 0 #aaf5dd, 0 10px 28px rgba(155, 83, 130, .1);
}

html[data-theme="cute"] .ticker-link.celebration {
  color: #c23d78;
  text-shadow: none;
}

html[data-theme="cute"] .ticker-link.presence {
  background: #ff7fb3;
  color: #ffffff;
  border-radius: 8px;
}

html[data-theme="cute"] .sidebar,
html[data-theme="cute"] .content,
html[data-theme="cute"] .iframe-board,
html[data-theme="cute"] .panel,
html[data-theme="cute"] .portrait-card,
html[data-theme="cute"] .mini-card,
html[data-theme="cute"] .news-item {
  background: rgba(255, 249, 253, .95);
}

html[data-theme="cute"] .side-head,
html[data-theme="cute"] .content-head,
html[data-theme="cute"] .panel-title,
html[data-theme="cute"] .iframe-title {
  background: linear-gradient(90deg, #ff9fc8, #d9c7ff);
  color: #3b335c;
  border-color: #ffffff;
  text-shadow: none;
}

html[data-theme="cute"] .side-link {
  color: #3b335c;
  text-decoration: none;
}

html[data-theme="cute"] .side-link:hover {
  color: #c23d78;
}

html[data-theme="cute"] .side-icon {
  background: #ffe98f;
  border-color: #ffffff;
  box-shadow: none;
}

html[data-theme="cute"] .nav-svg {
  fill: #ffffff;
  stroke: #3b335c;
}

html[data-theme="cute"] .nav-svg circle {
  fill: #aaf5dd;
  stroke: #3b335c;
}

html[data-theme="cute"] .content-inner,
html[data-theme="cute"] .iframe-body,
html[data-theme="cute"] .panel-body {
  background: #fff9fd;
}

html[data-theme="cute"] .page-title,
html[data-theme="cute"] .sns-title {
  color: #3b335c;
  border-bottom-color: #ffb7d5;
  text-shadow: none;
}

html[data-theme="cute"] .hero-image,
html[data-theme="cute"] .portrait-frame,
html[data-theme="cute"] .home-movie-frame {
  background: #ffffff;
  border-color: #ffb7d5;
  border-style: solid;
  border-radius: 8px;
}

html[data-theme="cute"] .portrait-card::before,
html[data-theme="cute"] .portrait-card::after,
html[data-theme="cute"] .portrait-bottom {
  display: none;
}

html[data-theme="cute"] .sns-links a,
html[data-theme="cute"] .homepage-video-play {
  background: #3b335c;
  color: #ffffff;
  border-color: #3b335c;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(59, 51, 92, .16);
  text-shadow: none;
}

html[data-theme="cute"] .homepage-video-credit {
  background: #ffffff;
  color: #7b7198;
  border-color: #f0d7e8;
}

html[data-theme="cute"] .homepage-video-credit strong {
  color: #c23d78;
}

html[data-theme="cute"] .homepage-video-label {
  background: #ff7fb3;
  color: #ffffff;
  border-color: #ff7fb3;
}

html[data-theme="cute"] .counter {
  background: #3b335c;
  color: #aaf5dd;
  border-color: #3b335c;
  outline-color: transparent;
  border-radius: 8px;
}

html[data-theme="taxi"] {
  --black: #11151c;
  --ink: #17120a;
  --paper: #fffdf2;
  --soft: #fff4bd;
  --gray: #6b6250;
  --yellow: #ffd22e;
  --green: #d8efc2;
  --danger: #ffe5d6;
}

html[data-theme="taxi"] body {
  background-color: #101318;
  background-image:
    linear-gradient(135deg, rgba(255, 210, 46, .24) 0 12%, transparent 12% 100%),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px;
  color: #17120a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  image-rendering: auto;
}

html[data-theme="taxi"] a {
  color: #141820;
}

html[data-theme="taxi"] .site-shell {
  background: #ffd22e;
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28), 0 0 0 1px rgba(255, 255, 255, .24) inset;
}

html[data-theme="taxi"] .top-title {
  overflow: hidden;
  background: #11151c;
  color: #ffd22e;
  border-color: #11151c;
  border-style: solid;
  border-radius: 8px;
  box-shadow: inset 0 -6px 0 #ffd22e, 0 18px 44px rgba(0, 0, 0, .24);
  text-shadow: none;
}

html[data-theme="taxi"] .top-title::before,
html[data-theme="taxi"] .top-title::after,
html[data-theme="taxi"] .ticker::before,
html[data-theme="taxi"] .ticker::after {
  content: none;
}

html[data-theme="taxi"] .admin-mode-bar,
html[data-theme="taxi"] .theme-switcher,
html[data-theme="taxi"] .ticker,
html[data-theme="taxi"] .sidebar,
html[data-theme="taxi"] .content,
html[data-theme="taxi"] .iframe-board,
html[data-theme="taxi"] .panel,
html[data-theme="taxi"] .portrait-card,
html[data-theme="taxi"] .news-item,
html[data-theme="taxi"] .mini-card,
html[data-theme="taxi"] .bbs-map,
html[data-theme="taxi"] .arcade-scene,
html[data-theme="taxi"] .game-window {
  border-color: rgba(17, 21, 28, .18);
  border-style: solid;
  outline-color: transparent;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(17, 21, 28, .14);
}

html[data-theme="taxi"] .admin-mode-bar,
html[data-theme="taxi"] .theme-switcher {
  background: #11151c;
  color: #fffdf2;
}

html[data-theme="taxi"] .theme-switcher span {
  color: #ffd22e;
}

html[data-theme="taxi"] .theme-switcher button,
html[data-theme="taxi"] .pixel-button,
html[data-theme="taxi"] .district-tabs button,
html[data-theme="taxi"] .slot-tabs button,
html[data-theme="taxi"] .icon-picker button,
html[data-theme="taxi"] .character-option,
html[data-theme="taxi"] .sticker-option,
html[data-theme="taxi"] .mini-button {
  background: #fffdf2;
  color: #11151c;
  border-color: rgba(17, 21, 28, .18);
  border-style: solid;
  border-radius: 8px;
  box-shadow: none;
  clip-path: none;
  overflow: visible;
  text-shadow: none;
}

html[data-theme="taxi"] .theme-switcher button.active,
html[data-theme="taxi"] .pixel-button:hover,
html[data-theme="taxi"] .district-tabs button:hover,
html[data-theme="taxi"] .slot-tabs button:hover,
html[data-theme="taxi"] .icon-picker button:hover,
html[data-theme="taxi"] .character-option:hover,
html[data-theme="taxi"] .sticker-option:hover,
html[data-theme="taxi"] .pixel-button.active,
html[data-theme="taxi"] .district-tabs button.active,
html[data-theme="taxi"] .slot-tabs button.active,
html[data-theme="taxi"] .icon-picker button.active,
html[data-theme="taxi"] .character-option.active,
html[data-theme="taxi"] .sticker-option.active {
  background: #ffd22e;
  color: #11151c;
  border-color: #ffd22e;
}

html[data-theme="taxi"] .ticker {
  background: #11151c;
  color: #ffd22e;
  border-color: #11151c;
  outline-color: transparent;
  box-shadow: inset 0 -5px 0 #ffd22e, 0 10px 28px rgba(0, 0, 0, .18);
}

html[data-theme="taxi"] .ticker-track {
  padding-left: 0;
  font-size: 15px;
}

html[data-theme="taxi"] .ticker-link.celebration,
html[data-theme="taxi"] .ticker-link.presence {
  color: #fffdf2;
  text-shadow: none;
}

html[data-theme="taxi"] .ticker-link.presence {
  background: #ffd22e;
  color: #11151c;
  border-radius: 4px;
}

html[data-theme="taxi"] .sidebar,
html[data-theme="taxi"] .content,
html[data-theme="taxi"] .iframe-board,
html[data-theme="taxi"] .panel,
html[data-theme="taxi"] .portrait-card,
html[data-theme="taxi"] .mini-card,
html[data-theme="taxi"] .news-item {
  background: #fffdf2;
}

html[data-theme="taxi"] .side-head,
html[data-theme="taxi"] .content-head,
html[data-theme="taxi"] .panel-title,
html[data-theme="taxi"] .iframe-title {
  background: #11151c;
  color: #ffd22e;
  border-color: #11151c;
  text-shadow: none;
}

html[data-theme="taxi"] .side-link {
  color: #11151c;
  text-decoration: none;
}

html[data-theme="taxi"] .side-link:hover {
  color: #7a5b00;
}

html[data-theme="taxi"] .side-icon {
  background: #ffd22e;
  border-color: #11151c;
  box-shadow: none;
}

html[data-theme="taxi"] .nav-svg {
  fill: #fffdf2;
  stroke: #11151c;
}

html[data-theme="taxi"] .nav-svg circle {
  fill: #ffd22e;
  stroke: #11151c;
}

html[data-theme="taxi"] .content-inner,
html[data-theme="taxi"] .iframe-body,
html[data-theme="taxi"] .panel-body {
  background: #fffdf2;
}

html[data-theme="taxi"] .page-title,
html[data-theme="taxi"] .sns-title {
  color: #11151c;
  border-bottom-color: #ffd22e;
  text-shadow: none;
}

html[data-theme="taxi"] .hero-image,
html[data-theme="taxi"] .portrait-frame,
html[data-theme="taxi"] .home-movie-frame {
  background: #fffdf2;
  border-color: #11151c;
  border-style: solid;
  border-radius: 8px;
}

html[data-theme="taxi"] .portrait-card::before,
html[data-theme="taxi"] .portrait-card::after,
html[data-theme="taxi"] .portrait-bottom {
  display: none;
}

html[data-theme="taxi"] .sns-links a,
html[data-theme="taxi"] .homepage-video-play {
  background: #11151c;
  color: #ffd22e;
  border-color: #11151c;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(17, 21, 28, .22);
  text-shadow: none;
}

html[data-theme="taxi"] .homepage-video-credit {
  background: #11151c;
  color: #fffdf2;
  border-color: #11151c;
}

html[data-theme="taxi"] .homepage-video-credit strong,
html[data-theme="taxi"] .counter {
  color: #ffd22e;
}

html[data-theme="taxi"] .homepage-video-label {
  background: #ffd22e;
  color: #11151c;
  border-color: #ffd22e;
}

html[data-theme="taxi"] .counter {
  background: #11151c;
  border-color: #11151c;
  outline-color: transparent;
  border-radius: 8px;
}

/* Preview theme shape pass: make new themes feel structurally different without adding assets. */
html[data-theme="elegant"] body {
  background-color: #17121d;
  background-image:
    radial-gradient(circle at 22% 12%, rgba(231, 207, 145, .28), transparent 28%),
    radial-gradient(circle at 84% 20%, rgba(103, 48, 86, .42), transparent 34%),
    linear-gradient(118deg, #17121d 0 34%, #34213a 34.2% 58%, #f5efe6 58.2% 100%);
}

html[data-theme="elegant"] .site-shell {
  background: rgba(255, 250, 244, .68);
  border-color: rgba(255, 255, 255, .36);
  box-shadow: 0 34px 90px rgba(16, 11, 20, .32), 0 0 0 1px rgba(216, 183, 94, .18) inset;
  backdrop-filter: blur(12px);
}

html[data-theme="elegant"] .top-title {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  background: rgba(38, 22, 43, .78);
  border: 1px solid rgba(231, 207, 145, .72);
  box-shadow: 0 22px 46px rgba(26, 14, 31, .26), 0 0 0 1px rgba(255, 250, 244, .38) inset;
  font-family: var(--elegant-display-font);
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 500;
  line-height: .95;
}

html[data-theme="elegant"] .top-title::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(231, 207, 145, .52);
  pointer-events: none;
}

html[data-theme="elegant"] .top-title span {
  position: relative;
  z-index: 1;
}

html[data-theme="elegant"] .theme-switcher {
  justify-content: flex-end;
  background: rgba(255, 250, 244, .46);
  border: 1px solid rgba(255, 250, 244, .78);
  box-shadow: 0 14px 32px rgba(35, 22, 41, .13);
  backdrop-filter: blur(14px);
}

  html[data-theme="elegant"] .theme-switcher span,
html[data-theme="elegant"] .theme-switcher button,
html[data-theme="elegant"] .top-title span,
html[data-theme="elegant"] .iframe-title,
html[data-theme="elegant"] .side-link,
html[data-theme="elegant"] .ticker-track,
html[data-theme="elegant"] .sns-links a {
  font-family: var(--elegant-display-font);
  font-weight: 600;
  text-transform: lowercase;
}

html[data-theme="elegant"] .theme-switcher button,
html[data-theme="elegant"] .pixel-button,
html[data-theme="elegant"] .district-tabs button,
html[data-theme="elegant"] .slot-tabs button,
html[data-theme="elegant"] .mini-button,
html[data-theme="elegant"] .homepage-video-play {
  padding-inline: 15px;
  background: rgba(255, 250, 244, .38);
  border: 1px solid rgba(90, 40, 72, .22);
  box-shadow: 0 8px 22px rgba(35, 22, 41, .08), 0 1px 0 rgba(255, 255, 255, .8) inset;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  backdrop-filter: blur(9px);
}

html[data-theme="elegant"] .theme-switcher button.active,
html[data-theme="elegant"] .pixel-button:hover,
html[data-theme="elegant"] .district-tabs button:hover,
html[data-theme="elegant"] .slot-tabs button:hover,
html[data-theme="elegant"] .mini-button:hover,
html[data-theme="elegant"] .homepage-video-play:hover {
  background: rgba(90, 40, 72, .86);
  border-color: rgba(231, 207, 145, .72);
  color: #fffaf4;
}

html[data-theme="elegant"] .ticker {
  margin-block: 14px 18px;
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
}

html[data-theme="elegant"] .ticker-track {
  padding-block: 5px;
  color: #4e2342;
  font-size: 25px;
  line-height: 1.05;
  text-shadow: 0 1px 14px rgba(255, 250, 244, .88), 0 0 2px #fffaf4;
}

html[data-theme="elegant"] .ticker-link.celebration,
html[data-theme="elegant"] .ticker-link.presence {
  background: transparent;
  color: #4e2342;
}

html[data-theme="elegant"] .sidebar,
html[data-theme="elegant"] .content,
html[data-theme="elegant"] .panel,
html[data-theme="elegant"] .iframe-board,
html[data-theme="elegant"] .portrait-card,
html[data-theme="elegant"] .news-item,
html[data-theme="elegant"] .mini-card {
  background: rgba(255, 250, 244, .62);
  border: 1px solid rgba(255, 250, 244, .72);
  box-shadow: 0 20px 44px rgba(35, 22, 41, .12);
  backdrop-filter: blur(10px);
}

html[data-theme="elegant"] .side-head,
html[data-theme="elegant"] .content-head,
html[data-theme="elegant"] .panel-title,
html[data-theme="elegant"] .iframe-title {
  background: transparent;
  border-color: rgba(216, 183, 94, .7);
  color: #5a2848;
  font-family: var(--elegant-display-font);
  font-size: 23px;
}

html[data-theme="elegant"] .side-link {
  margin: 9px 0;
  padding: 9px 8px;
  background: rgba(255, 250, 244, .34);
  border: 1px solid rgba(216, 183, 94, .52);
  color: #4e2342;
  box-shadow: 0 10px 24px rgba(35, 22, 41, .08);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

html[data-theme="elegant"] .side-icon {
  background: rgba(255, 250, 244, .58);
  border-radius: 50%;
  border-color: rgba(216, 183, 94, .68);
  box-shadow: 0 10px 22px rgba(35, 22, 41, .12);
}

html[data-theme="elegant"] .home-movie-frame,
html[data-theme="elegant"] .hero-image,
html[data-theme="elegant"] .portrait-frame {
  padding: 10px;
  background: rgba(255, 250, 244, .44);
  border: 1px solid rgba(216, 183, 94, .62);
  box-shadow: 0 18px 42px rgba(35, 22, 41, .14);
}

html[data-theme="cute"] body {
  background-color: #fff0f7;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255, 127, 179, .2) 0 5px, transparent 5px),
    radial-gradient(circle at 40px 32px, rgba(170, 245, 221, .42) 0 6px, transparent 6px),
    linear-gradient(135deg, #fff0f7 0%, #f5edff 46%, #ebfff7 100%);
  background-size: 56px 56px, 68px 68px, auto;
}

html[data-theme="cute"] .site-shell {
  background: rgba(255, 250, 254, .84);
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 70px rgba(226, 92, 148, .2), 0 0 0 5px rgba(255, 255, 255, .38) inset;
}

html[data-theme="cute"] .top-title {
  position: relative;
  overflow: visible;
  min-height: 86px;
  background: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 0 #ff9fc8, 0 18px 36px rgba(255, 127, 179, .18);
  color: #3b335c;
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", system-ui, sans-serif;
  font-size: clamp(28px, 4.2vw, 46px);
}

html[data-theme="cute"] .top-title::before,
html[data-theme="cute"] .top-title::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  background:
    radial-gradient(circle, #ffffff 0 42%, transparent 43%),
    conic-gradient(from 45deg, #ff9fc8, #ffe98f, #aaf5dd, #d9c7ff, #ff9fc8);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(255, 127, 179, .18);
}

html[data-theme="cute"] .top-title::before {
  left: 16px;
  bottom: -20px;
}

html[data-theme="cute"] .top-title::after {
  right: 16px;
  top: -18px;
}

html[data-theme="cute"] .theme-switcher {
  justify-content: flex-end;
  background: #fff7fc;
  border: 2px dashed #ffb7d5;
  box-shadow: 0 8px 0 rgba(255, 159, 200, .34);
}

html[data-theme="cute"] .theme-switcher button,
html[data-theme="cute"] .pixel-button,
html[data-theme="cute"] .district-tabs button,
html[data-theme="cute"] .slot-tabs button,
html[data-theme="cute"] .mini-button,
html[data-theme="cute"] .homepage-video-play,
html[data-theme="cute"] .sns-links a {
  background: #ffffff;
  border: 3px solid #ffffff;
  color: #3b335c;
  box-shadow: 0 5px 0 #d9c7ff, 0 10px 18px rgba(155, 83, 130, .12);
}

html[data-theme="cute"] .theme-switcher button:nth-of-type(odd),
html[data-theme="cute"] .sns-links a:nth-child(odd) {
  transform: rotate(-1deg);
}

html[data-theme="cute"] .theme-switcher button:nth-of-type(even),
html[data-theme="cute"] .sns-links a:nth-child(even) {
  transform: rotate(1deg);
}

html[data-theme="cute"] .theme-switcher button.active,
html[data-theme="cute"] .pixel-button:hover,
html[data-theme="cute"] .district-tabs button:hover,
html[data-theme="cute"] .slot-tabs button:hover,
html[data-theme="cute"] .mini-button:hover,
html[data-theme="cute"] .homepage-video-play:hover,
html[data-theme="cute"] .sns-links a:hover {
  background: #ff7fb3;
  color: #ffffff;
  box-shadow: 0 5px 0 #3b335c, 0 12px 20px rgba(255, 127, 179, .2);
}

html[data-theme="cute"] .ticker {
  background: #fff6ba;
  border: 3px dashed #ff8fc1;
  outline: 4px solid rgba(170, 245, 221, .55);
  box-shadow: 0 8px 0 rgba(255, 159, 200, .24);
}

html[data-theme="cute"] .ticker-track {
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", system-ui, sans-serif;
  font-size: 20px;
  color: #3b335c;
  text-shadow: 1px 1px 0 #ffffff;
}

html[data-theme="cute"] .sidebar,
html[data-theme="cute"] .content,
html[data-theme="cute"] .panel,
html[data-theme="cute"] .iframe-board,
html[data-theme="cute"] .portrait-card,
html[data-theme="cute"] .news-item,
html[data-theme="cute"] .mini-card {
  background: rgba(255, 255, 255, .78);
  border: 3px solid #ffffff;
  box-shadow: 7px 7px 0 rgba(255, 159, 200, .24), 0 14px 28px rgba(155, 83, 130, .09);
}

html[data-theme="cute"] .side-head,
html[data-theme="cute"] .content-head,
html[data-theme="cute"] .panel-title,
html[data-theme="cute"] .iframe-title {
  background:
    radial-gradient(circle at 14px 50%, rgba(255, 255, 255, .9) 0 4px, transparent 5px),
    linear-gradient(90deg, #ff9fc8, #d9c7ff, #aaf5dd);
  color: #3b335c;
  border-color: #ffffff;
}

html[data-theme="cute"] .side-link {
  margin: 10px 0;
  padding: 8px;
  background: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 5px 0 #ffe98f, 0 10px 20px rgba(155, 83, 130, .12);
  transform: rotate(-1deg);
}

html[data-theme="cute"] .side-link:nth-of-type(even) {
  transform: rotate(1deg);
}

html[data-theme="cute"] .side-icon {
  background: #fff6ba;
  border-radius: 50%;
  border-color: #ffffff;
  box-shadow: inset 0 0 0 4px rgba(255, 159, 200, .24), 0 8px 16px rgba(155, 83, 130, .14);
}

html[data-theme="cute"] .home-movie-frame,
html[data-theme="cute"] .hero-image,
html[data-theme="cute"] .portrait-frame {
  padding: 8px;
  background: #ffffff;
  border: 4px solid #ffb7d5;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .86), 8px 8px 0 rgba(170, 245, 221, .42);
}

html[data-theme="taxi"] body {
  background-color: #0b0d12;
  background-image:
    linear-gradient(115deg, rgba(255, 210, 46, .92) 0 28%, transparent 28.2% 100%),
    linear-gradient(90deg, rgba(255, 210, 46, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 100% 100%, 42px 42px, 42px 42px;
}

html[data-theme="taxi"] .site-shell {
  background:
    linear-gradient(180deg, rgba(255, 210, 46, .94), rgba(255, 210, 46, .8)),
    #ffd22e;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34), 0 0 0 6px rgba(17, 21, 28, .18) inset;
}

html[data-theme="taxi"] .top-title {
  position: relative;
  min-height: 88px;
  border: 0;
  background: #0f1219;
  box-shadow: 0 8px 0 #ffd22e, 0 18px 42px rgba(0, 0, 0, .26);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 100%, 0 100%);
}

html[data-theme="taxi"] .top-title::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, #ffd22e 0 22px, transparent 22px 34px);
}

html[data-theme="taxi"] .theme-switcher {
  justify-content: flex-end;
  background: #0f1219;
  border: 0;
  box-shadow: 0 8px 0 rgba(17, 21, 28, .18);
}

html[data-theme="taxi"] .theme-switcher button,
html[data-theme="taxi"] .pixel-button,
html[data-theme="taxi"] .district-tabs button,
html[data-theme="taxi"] .slot-tabs button,
html[data-theme="taxi"] .mini-button,
html[data-theme="taxi"] .homepage-video-play {
  background: #fffdf2;
  border: 2px solid #0f1219;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .22);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

html[data-theme="taxi"] .theme-switcher button.active,
html[data-theme="taxi"] .pixel-button:hover,
html[data-theme="taxi"] .district-tabs button:hover,
html[data-theme="taxi"] .slot-tabs button:hover,
html[data-theme="taxi"] .mini-button:hover,
html[data-theme="taxi"] .homepage-video-play:hover {
  background: #ffd22e;
  color: #0f1219;
  border-color: #ffd22e;
}

html[data-theme="taxi"] .ticker {
  background: #ffd22e;
  color: #0f1219;
  border: 0;
  box-shadow: 0 8px 0 #0f1219;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
}

html[data-theme="taxi"] .ticker-track {
  color: #0f1219;
  font-size: 18px;
  text-shadow: none;
}

html[data-theme="taxi"] .ticker-link.celebration,
html[data-theme="taxi"] .ticker-link.presence {
  color: #0f1219;
}

html[data-theme="taxi"] .sidebar,
html[data-theme="taxi"] .content,
html[data-theme="taxi"] .panel,
html[data-theme="taxi"] .iframe-board,
html[data-theme="taxi"] .portrait-card,
html[data-theme="taxi"] .news-item,
html[data-theme="taxi"] .mini-card {
  background: #fffdf2;
  border: 0;
  box-shadow: 8px 8px 0 rgba(17, 21, 28, .18), 0 18px 34px rgba(17, 21, 28, .14);
}

html[data-theme="taxi"] .side-head,
html[data-theme="taxi"] .content-head,
html[data-theme="taxi"] .panel-title,
html[data-theme="taxi"] .iframe-title {
  background: #0f1219;
  color: #ffd22e;
  border: 0;
  box-shadow: inset 0 -5px 0 #ffd22e;
}

html[data-theme="taxi"] .side-link {
  margin: 8px 0;
  padding: 8px;
  background: #0f1219;
  color: #ffd22e;
  border: 0;
  box-shadow: 4px 4px 0 rgba(17, 21, 28, .16);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 12px 100%);
}

html[data-theme="taxi"] .side-icon {
  background: #ffd22e;
  border: 2px solid #0f1219;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .16);
}

html[data-theme="taxi"] .home-movie-frame,
html[data-theme="taxi"] .hero-image,
html[data-theme="taxi"] .portrait-frame {
  padding: 6px;
  background: #0f1219;
  border: 0;
  box-shadow: 0 0 0 4px #fffdf2 inset, 8px 8px 0 rgba(17, 21, 28, .22);
}

@media (max-width: 860px) {
  .site-shell {
    padding: 22px 14px 34px;
  }

  .top-title {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .side-head {
    display: none;
  }

  .side-link {
    margin: 0;
    font-size: 12px;
  }

  .side-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    box-shadow: 3px 3px 0 #000;
    font-size: 20px;
  }

  .content-inner {
    padding: 16px 14px 22px;
  }

  .home-hero,
  .mini-grid,
  .form-grid,
  .thread-head {
    grid-template-columns: 1fr;
  }

  .thread-exit-button {
    justify-self: end;
    width: auto;
    min-width: 150px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 15px;
  }

  .thread-head-actions {
    justify-items: end;
  }

  .hero-image {
    max-width: 260px;
    margin: 0 auto;
  }

  .sns-links {
    grid-template-columns: 1fr;
  }

  .counter {
    font-size: 25px;
  }

  .message {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .admin-mode-bar {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .admin-mode-bar a {
    width: 100%;
  }

  .empty-slot {
    width: 58px;
    font-size: 10px;
  }

  .cabinet-hotspot {
    min-height: 18%;
    padding: 4px;
    border-width: 2px;
    box-shadow: 2px 2px 0 #000;
    font-size: 9px;
  }

  .cabinet-game-button {
    font-size: clamp(5px, 1.55vw, 9px);
  }

  .game-menu-panel {
    padding: 10px;
  }

  .game-menu-window {
    width: calc(100vw - 20px);
    max-height: min(84vh, 620px);
    overflow: auto;
    gap: 8px;
    padding: 10px;
    border-width: 2px;
    box-shadow: 3px 3px 0 #000;
  }

  .game-menu-close {
    top: 5px;
    right: 5px;
    width: 26px;
    height: 26px;
    border-width: 2px;
  }

  .game-menu-close::before,
  .game-menu-close::after {
    width: 13px;
    height: 2px;
  }

  .game-menu-kicker {
    font-size: 9px;
  }

  .game-menu-window h2 {
    font-size: clamp(12px, 3.45vw, 15px);
    line-height: 1.05;
  }

  .game-menu-topline {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    padding-right: 28px;
  }

  .game-menu-title-row {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .game-menu-note {
    font-size: 10px;
  }

  .game-menu-panel.is-card-kuji .game-menu-note {
    font-size: 11px;
  }

  .game-menu-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .game-menu-actions .mini-button {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .game-rank-preview {
    padding-top: 4px;
    border-top-width: 2px;
    gap: 3px;
  }

  .game-rank-tabs {
    gap: 4px;
  }

  .game-rank-tabs .rank-tab {
    min-height: 20px;
    padding: 2px 7px;
    border-width: 2px;
    font-size: 9px;
  }

  .game-rank-tournament-meta {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 5px;
    padding: 5px 6px;
    border-width: 2px;
    box-shadow: 2px 2px 0 #000;
  }

  .game-rank-page-button {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .game-rank-tournament-title {
    font-size: 11px;
  }

  .game-rank-tournament-subtitle {
    font-size: 9px;
  }

  .game-rank-note {
    font-size: 9px;
  }

  .game-rank-list {
    grid-template-columns: 1fr;
    gap: 4px;
    max-height: min(49vh, 420px);
  }

  .game-rank-list li {
    grid-template-columns: 1.8em minmax(0, 1fr) auto;
    gap: 4px;
    min-height: 25px;
    padding: 3px 5px;
    border-width: 2px;
    font-size: 10px;
  }

  .game-rank-list strong,
  .game-rank-list em {
    font-size: inherit;
  }

  .game-rank-list li.is-card-kuji-rank {
    grid-template-columns: 1.45em 34px minmax(0, .72fr) minmax(0, 1.38fr);
  }

  .game-rank-list li.is-card-kuji-rank .card-kuji-rank-thumb {
    width: 32px;
    height: 42px;
  }

  .game-rank-list li.is-card-kuji-rank small {
    font-size: 8.5px;
  }

  .admin-preview-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .preview-notice {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    padding: 11px 38px 11px 11px;
    border-width: 3px;
    border-radius: 12px;
    box-shadow: 4px 4px 0 #000;
  }

  .preview-notice strong {
    font-size: 16px;
  }

  .arcade-player-head {
    align-items: stretch;
    flex-direction: column;
  }

  .arcade-player-head span,
  .mini-button {
    width: 100%;
    text-align: center;
  }

  .arcade-screen-shell {
    aspect-ratio: 9 / 13;
    border-width: 5px;
    outline-width: 3px;
  }

  .arcade-controls {
    gap: 14px;
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.18;
  }

  .site-shell {
    padding: 12px 8px 22px;
  }

  .top-title {
    gap: 4px;
    margin-bottom: 8px;
    padding: 9px 8px;
    border-width: 3px;
    font-size: clamp(17px, 5.4vw, 22px);
  }

  .admin-mode-bar,
  .theme-switcher {
    gap: 6px;
    margin: -2px 0 8px;
    padding: 5px 6px;
    border-width: 3px;
    outline-width: 2px;
    font-size: 11px;
  }

  .theme-switcher {
    justify-content: center;
  }

  .admin-mode-bar a,
  .theme-switcher button {
    min-height: 27px;
    padding: 3px 6px;
    border-width: 2px;
    box-shadow: 2px 2px 0 #000;
  }

  .ticker {
    margin-bottom: 10px;
    padding: 5px 0;
    border-width: 3px;
    outline-width: 2px;
  }

  .ticker-track {
    font-size: 12px;
  }

  .page-grid {
    gap: 9px;
  }

  .sidebar {
    gap: 4px;
    padding: 5px;
    border-width: 3px;
    outline-width: 2px;
  }

  .side-link {
    font-size: 9px;
    line-height: 1.05;
  }

  .side-icon {
    width: 31px;
    height: 31px;
    margin-bottom: 3px;
    border-width: 2px;
    box-shadow: 2px 2px 0 #000;
  }

  .nav-svg {
    width: 22px;
    height: 22px;
    stroke-width: 6;
  }

  .content {
    border-width: 3px;
    outline-width: 2px;
  }

  .content-head {
    height: 16px;
    border-bottom-width: 3px;
  }

  .content-inner {
    padding: 9px 7px 14px;
  }

  .page-title {
    margin-bottom: 9px;
    padding-bottom: 6px;
    border-bottom-width: 3px;
    font-size: clamp(20px, 6.4vw, 28px);
    line-height: 1;
  }

  .panel,
  .iframe-board,
  .portrait-card,
  .sns-panel {
    margin-bottom: 11px;
  }

  .panel,
  .iframe-board,
  .portrait-card {
    border-width: 3px;
  }

  .panel-title,
  .iframe-title {
    padding: 5px 7px;
    font-size: 14px;
  }

  .panel-body,
  .iframe-body {
    padding: 8px;
  }

  .panel-body.tight {
    padding: 5px;
  }

  .iframe-body {
    min-height: 120px;
  }

  .hero-copy {
    font-size: 13px;
  }

  .hero-copy p {
    margin-bottom: 8px;
  }

  .hero-image,
  .portrait-frame {
    padding: 4px;
    border-width: 3px;
  }

  .sns-panel {
    padding: 9px 0 10px;
    border-top-width: 3px;
    border-bottom-width: 3px;
  }

  .sns-title {
    margin-bottom: 8px;
    font-size: 18px;
  }

  .sns-links {
    gap: 7px;
  }

  .sns-links a {
    padding: 7px 5px;
    font-size: 12px;
  }

  .counter {
    margin-bottom: 12px;
    padding: 7px 8px;
    border-width: 3px;
    outline-width: 2px;
    font-size: clamp(15px, 5vw, 21px);
  }

  .footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top-width: 3px;
    font-size: 11px;
  }

  .news-list,
  .thread-list,
  .admin-list,
  .message-list {
    gap: 8px;
  }

  .news-item,
  .mini-card,
  .message,
  .admin-row {
    padding: 8px;
    border-width: 2px;
    font-size: 12px;
  }

  .meta-row {
    gap: 5px;
    font-size: 10px;
  }

  .tag {
    min-height: 17px;
    padding: 1px 4px;
    border-width: 1px;
    font-size: 9px;
  }

  .bbs-toolbar {
    gap: 6px;
    margin-bottom: 7px;
  }

  .bbs-toolbar-bottom {
    margin-top: 7px;
  }

  .district-tabs {
    width: 100%;
    gap: 4px;
  }

  .district-tabs button {
    flex: 1 1 calc(20% - 4px);
    min-width: 0;
    min-height: 32px;
    padding: 4px 3px;
    font-size: 12px;
  }

  .pixel-button,
  .slot-tabs button,
  .icon-picker button,
  .character-option,
  .sticker-option,
  .mini-button {
    min-height: 30px;
    padding: 4px 7px;
    border-width: 2px;
    box-shadow: 2px 2px 0 #000;
    font-size: 11px;
  }

  .bbs-new-thread-button {
    width: 100%;
    min-height: 34px;
    font-size: 13px;
  }

  .bbs-thread-actions {
    width: 100%;
    flex-direction: column;
    gap: 6px;
  }

  .bbs-thread-actions .pixel-button {
    width: 100%;
    min-height: 34px;
    font-size: 13px;
  }

  .bbs-admin-tools {
    width: 100%;
    gap: 6px;
  }

  .edit-help {
    padding: 4px 5px;
    border-width: 2px;
    font-size: 10px;
  }

  .bbs-map {
    border-width: 3px;
  }

  .form-grid {
    gap: 8px;
  }

  .field {
    gap: 4px;
  }

  .field label,
  .char-count {
    font-size: 10px;
  }

  .field input,
  .field textarea,
  .field select {
    min-height: 32px;
    padding: 6px;
    border-width: 2px;
    font-size: 12px;
  }

  .field input,
  .field select {
    height: 32px;
  }

  .field textarea {
    min-height: 68px;
  }

  .rules {
    gap: 5px;
    padding-left: 1.05em;
    font-size: 12px;
  }

  .character-picker,
  .sticker-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .character-option {
    min-height: 64px;
    padding: 3px;
  }

  .character-option img {
    width: min(44px, 100%);
  }

  .character-option span {
    font-size: 9px;
  }

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

  .icon-edit-window {
    padding: 10px;
    border-width: 3px;
    box-shadow: 6px 6px 0 #000;
  }

  .sticker-toggle-row {
    gap: 6px;
  }

  .selected-sticker {
    min-height: 30px;
    font-size: 11px;
  }

  .selected-sticker .protected-sticker-image {
    width: 46px;
  }

  .sticker-option {
    min-height: 52px;
    padding: 3px;
  }

  .sticker-option .protected-sticker-image {
    max-width: 48px;
  }

  .thread-head {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
  }

  .thread-head-avatar-frame {
    width: 54px;
    height: 54px;
  }

  .thread-head-actions {
    grid-column: 1 / -1;
    justify-items: end;
  }

  .thread-head-avatar {
    width: 100%;
  }

  .thread-head .page-title {
    margin-bottom: 5px;
    font-size: clamp(19px, 6.2vw, 25px);
  }

  .thread-exit-button {
    grid-column: 1 / -1;
    justify-self: end;
    width: auto;
    min-width: 120px;
    min-height: 34px;
    font-size: 13px;
  }

  .message {
    gap: 5px;
    max-width: 100%;
    border-radius: 10px;
    font-size: 12px;
  }

  .sticker-image {
    width: 82px;
    max-width: 38vw;
  }

  .sticker-preview {
    min-height: 56px;
    padding: 5px;
    border-width: 2px;
  }

  .sticker-preview .sticker-image {
    width: 62px;
  }

  .arcade-scene {
    border-width: 3px;
  }

  .arcade-player {
    border-width: 3px;
    box-shadow: 3px 3px 0 #000;
  }

  .arcade-player-head {
    gap: 7px;
    padding: 7px;
    border-bottom-width: 3px;
  }

  .arcade-player-head span {
    padding: 5px 7px;
    border-width: 2px;
    font-size: 11px;
  }

  .arcade-cabinet {
    padding: 10px;
  }

  .arcade-controls {
    margin-top: 12px;
    padding: 9px;
    border-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thread-marker.is-bubble-pulse .thread-bubble,
  .thread-marker.is-bubble-pulse .thread-title,
  .thread-marker.is-bubble-pulse .activity-mark {
    animation: none;
  }

  .side-link[data-nav-loading="true"],
  .nav-bar button[data-nav-loading="true"] {
    animation: none;
    opacity: .6;
  }
}

html[data-theme] .home-movie-frame .homepage-video-poster img,
html[data-theme] .home-movie-frame .homepage-video-player {
  height: auto;
  border: 0;
  filter: none;
  object-fit: cover;
}

html[data-theme] .home-movie-frame .homepage-random-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 0;
  filter: none;
  object-fit: contain;
}

@media (max-width: 640px) {
  html[data-theme="elegant"] .top-title {
    min-height: 66px;
    font-size: 31px;
  }

  html[data-theme="elegant"] .top-title::before {
    inset: 6px;
  }

  html[data-theme="elegant"] .theme-switcher {
    justify-content: center;
    gap: 5px;
  }

  html[data-theme="elegant"] .theme-switcher button,
  html[data-theme="elegant"] .pixel-button,
  html[data-theme="elegant"] .mini-button {
    min-height: 27px;
    padding: 4px 9px;
    clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
  }

  html[data-theme="elegant"] .ticker {
    margin-block: 9px 11px;
  }

  html[data-theme="elegant"] .ticker-track {
    font-size: 18px;
  }

  html[data-theme="elegant"] .side-link {
    min-height: 29px;
    padding: 4px 3px;
    background: rgba(255, 250, 244, .52);
    clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
    font-family: var(--elegant-display-font);
    font-size: 13px;
  }

  html[data-theme="cute"] .top-title {
    min-height: 64px;
    font-size: 24px;
    box-shadow: 0 5px 0 #ff9fc8, 0 12px 24px rgba(255, 127, 179, .18);
  }

  html[data-theme="cute"] .top-title::before,
  html[data-theme="cute"] .top-title::after {
    width: 24px;
    height: 24px;
    border-width: 2px;
  }

  html[data-theme="cute"] .top-title::before {
    left: 8px;
    bottom: -12px;
  }

  html[data-theme="cute"] .top-title::after {
    right: 8px;
    top: -10px;
  }

  html[data-theme="cute"] .theme-switcher {
    justify-content: center;
    gap: 5px;
  }

  html[data-theme="cute"] .theme-switcher button {
    min-height: 27px;
    padding: 4px 8px;
    border-width: 2px;
    box-shadow: 0 3px 0 #d9c7ff;
  }

  html[data-theme="cute"] .ticker {
    border-width: 2px;
    outline-width: 2px;
    box-shadow: 0 5px 0 rgba(255, 159, 200, .22);
  }

  html[data-theme="cute"] .ticker-track {
    font-size: 15px;
  }

  html[data-theme="cute"] .side-link {
    min-height: 29px;
    border-width: 2px;
    box-shadow: 0 3px 0 #ffe98f;
    transform: rotate(-.5deg);
  }

  html[data-theme="cute"] .side-link:nth-of-type(even) {
    transform: rotate(.5deg);
  }

  html[data-theme="taxi"] .top-title {
    min-height: 64px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
  }

  html[data-theme="taxi"] .theme-switcher {
    justify-content: center;
    gap: 5px;
  }

  html[data-theme="taxi"] .theme-switcher button,
  html[data-theme="taxi"] .pixel-button,
  html[data-theme="taxi"] .mini-button {
    min-height: 27px;
    padding: 4px 8px;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  }

  html[data-theme="taxi"] .ticker {
    box-shadow: 0 5px 0 #0f1219;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
  }

  html[data-theme="taxi"] .ticker-track {
    font-size: 15px;
  }

  html[data-theme="taxi"] .side-link {
    min-height: 29px;
    padding: 4px 3px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
  }
}

html[data-theme] .game-rank-list.is-card-kuji-list,
.game-rank-list.is-card-kuji-list {
  display: block;
  max-height: min(52vh, 460px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html[data-theme] .game-rank-list.is-card-kuji-list::-webkit-scrollbar,
.game-rank-list.is-card-kuji-list::-webkit-scrollbar {
  display: none;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank {
  display: grid;
  grid-template-columns: 1.8em minmax(118px, auto) minmax(4em, 1fr) minmax(5.8em, .58fr);
  align-items: center;
  gap: 7px;
  min-height: 64px;
  padding: 5px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(119, 76, 27, 0.16);
  box-shadow: none;
  color: #3d2813;
  font-size: clamp(11px, 2.8vw, 13px);
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank:first-child,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank:first-child {
  border-top: 0;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank .game-rank-position,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank .game-rank-position {
  color: #8b5f1f;
  font-weight: 800;
  white-space: nowrap;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-thumb-grid,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-thumb-grid {
  display: grid;
  grid-template-columns: repeat(5, 22px);
  grid-auto-rows: 29px;
  gap: 2px;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-thumb,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-thumb {
  width: 22px;
  height: 29px;
  border: 0;
  border-radius: 4px;
  background-color: #fff;
  background-image: var(--card-kuji-rank-thumb, none);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 9px rgba(72, 41, 12, 0.18);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-thumb-slot,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-thumb-slot {
  display: block;
  width: 22px;
  height: 29px;
  border: 1px dashed rgba(139, 95, 31, 0.2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.36);
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank strong,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank strong {
  min-width: 0;
  overflow: hidden;
  color: #3d2813;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-score,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank .card-kuji-rank-score {
  overflow: hidden;
  color: #8b5f1f;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank small,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank small {
  min-width: 0;
  display: grid;
  gap: 1px;
  color: #6f4b18;
  font-size: inherit;
  line-height: 1.18;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank small b,
html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank small span,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank small b,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank small span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank small b,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank small b {
  color: #a06d21;
  font-size: .92em;
}

html[data-theme] .game-rank-list.is-card-kuji-list li.is-card-kuji-rank small span,
.game-rank-list.is-card-kuji-list li.is-card-kuji-rank small span {
  font-size: .78em;
  opacity: .88;
}

html[data-theme] .arcade-scene.is-menu-open .game-menu-panel {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68) 45%, rgba(0, 0, 0, 0.42));
}

html[data-theme="retro"] .arcade-scene.is-menu-open .game-menu-panel {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 241, 0.92), rgba(255, 255, 223, 0.7) 45%, rgba(17, 49, 100, 0.38));
}

html[data-theme="taxi"] .arcade-scene.is-menu-open .game-menu-panel {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.9), rgba(255, 244, 203, 0.68) 45%, rgba(0, 0, 0, 0.44));
}

html[data-theme] .arcade-scene.is-menu-open .game-menu-panel.is-card-kuji {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 248, 226, 0.92), rgba(198, 147, 70, 0.58) 52%, rgba(35, 22, 9, 0.54));
}

.message.has-admin-stamp {
  padding-bottom: 58px;
}

.message-like-stamp {
  position: absolute;
  right: 8px;
  bottom: 4px;
  z-index: 8;
  display: block;
  width: auto;
  height: 54px;
  max-width: 44%;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  transform: rotate(-8deg);
  transform-origin: center;
}

.admin-like-button {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: var(--yellow);
  color: #000;
  border: 2px solid #000;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #000;
  font-size: 16px;
  line-height: 1;
}

.admin-like-button:hover {
  background: #000;
  color: #fff;
}

.message.has-message-controls {
  min-height: 104px;
  padding-right: 42px;
  padding-bottom: 62px;
}

.message.has-reply-action {
  position: relative;
}

.message.has-reply-action:not(.has-message-controls) {
  padding-bottom: 50px;
}

.message.has-reply-action.has-owner-stamp:not(.has-message-controls),
.message.has-reply-action.has-admin-stamp:not(.has-message-controls) {
  min-height: 96px;
  padding-bottom: 68px !important;
}

.message.has-reply-action.has-owner-stamp:not(.has-message-controls) .message-body,
.message.has-reply-action.has-admin-stamp:not(.has-message-controls) .message-body {
  padding-right: min(42%, 116px);
}

.message-reply-button {
  appearance: none;
  position: absolute;
  left: 10px;
  top: auto;
  bottom: 10px;
  z-index: 24;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 32px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(20, 20, 20, .72);
  box-shadow: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.message-reply-button-mark {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.message-reply-icon {
  display: block;
  width: 34px;
  height: 28px;
  fill: currentColor;
}

.message-reply-button:hover,
.message-reply-button:focus-visible {
  color: var(--ink);
  transform: translateY(-1px);
  outline: 2px solid rgba(43, 134, 255, .7);
  outline-offset: 2px;
}

html[data-theme="retro"] .message-reply-button,
html[data-theme="taxi"] .message-reply-button {
  color: rgba(17, 21, 28, .72);
}

html[data-theme="modern"] .message-reply-button {
  color: rgba(20, 24, 32, .52);
}

html[data-theme="elegant"] .message-reply-button {
  color: rgba(80, 55, 18, .62);
}

html[data-theme="cute"] .message-reply-button {
  color: rgba(91, 33, 66, .58);
}

.message-reply-context {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 2px 0 8px;
  padding: 4px 8px;
  border: 2px solid rgba(20, 20, 20, .78);
  border-radius: 999px;
  background: rgba(255, 210, 46, .2);
  color: rgba(20, 20, 20, .8);
  font-size: .78rem;
  font-weight: 900;
}

.thread-reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 2px solid rgba(20, 20, 20, .88);
  border-radius: 10px;
  background: rgba(255, 210, 46, .18);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 900;
}

.thread-reply-target[hidden] {
  display: none;
}

.thread-reply-target-clear {
  appearance: none;
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 2px solid rgba(20, 20, 20, .85);
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
}

.message.has-owner-stamp {
  padding-bottom: 98px;
}

.message.has-message-controls .message-delete-x {
  top: 8px;
  right: 8px;
}

.message-reaction-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 2px solid rgba(20, 20, 20, .88);
  border-radius: 999px;
  background: rgba(255, 248, 216, .94);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .22);
}

.message-reaction-button {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid rgba(20, 20, 20, .86);
  border-radius: 999px;
  background: #fff;
  color: #141414;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, .2);
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.message-reaction-button:hover,
.message-reaction-button.is-active {
  background: var(--yellow);
  color: #111;
  transform: translateY(-1px);
}

.message-reaction-button.is-active {
  box-shadow: 0 0 0 3px rgba(255, 210, 46, .36), 2px 2px 0 rgba(0, 0, 0, .3);
}

.message-owner-stamp {
  right: 12px;
  bottom: 46px;
  height: 58px;
  max-width: min(52%, 190px);
  transform: rotate(-7deg);
}

html[data-theme="retro"] .admin-like-button,
html[data-theme="taxi"] .admin-like-button {
  border-color: var(--ink);
  box-shadow: 2px 2px 0 rgba(0,0,0,.32);
}

html[data-theme="retro"] .message-reaction-actions,
html[data-theme="taxi"] .message-reaction-actions {
  border-color: var(--ink);
  background: rgba(255, 253, 242, .96);
  box-shadow: 2px 2px 0 rgba(0,0,0,.32);
}

html[data-theme="taxi"] .message-reaction-button.is-active {
  background: #ffd22e;
  border-color: #11151c;
  box-shadow: 0 0 0 3px rgba(255, 210, 46, .38), 2px 2px 0 rgba(0, 0, 0, .34);
}

html[data-theme="taxi"] .message-reaction-button,
html[data-theme="taxi"] .thread-view-option,
html[data-theme="taxi"] .game-rank-page-button {
  clip-path: none;
  overflow: visible;
}

.message-list.is-chat-list .message.has-message-controls {
  min-height: 118px;
  padding-right: 42px;
  padding-bottom: 58px;
}

.message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls {
  min-height: 164px;
  padding-right: 44px !important;
  padding-bottom: 56px !important;
}

.message-list.is-chat-list .message-reaction-actions {
  right: 8px;
  bottom: 8px;
}

.message-list.is-chat-list .message-owner-stamp {
  position: absolute;
  right: 10px;
  bottom: 44px;
  height: 46px;
  max-width: min(54%, 142px);
  margin: 0;
}

@media (max-width: 640px) {
  html[data-theme] .message.has-admin-stamp,
  .message.has-admin-stamp {
    padding-bottom: 44px;
  }

  .message-like-stamp {
    right: 6px;
    bottom: 4px;
    height: 40px;
    max-width: 48%;
  }

  .admin-like-button {
    right: 7px;
    bottom: 7px;
    width: 24px;
    height: 24px;
    font-size: 15px;
  }

  .message.has-message-controls {
    min-height: 112px;
    padding-right: 34px;
    padding-bottom: 58px;
  }

  html[data-theme] .message.has-owner-stamp,
  .message.has-owner-stamp {
    padding-bottom: 88px;
  }

  .message-reaction-actions {
    right: 7px;
    bottom: 7px;
    gap: 5px;
    padding: 4px;
  }

  .message-reaction-button {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }

  .message-owner-stamp {
    right: 8px;
    bottom: 41px;
    height: 44px;
    max-width: 56%;
  }
}

html[data-theme] .top-title {
  gap: 20px;
  margin-bottom: 14px;
  padding: 16px 24px;
  border-width: 4px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

html[data-theme] .admin-mode-bar,
html[data-theme] .theme-switcher {
  gap: 8px;
  margin: -2px 0 14px;
  padding: 7px 10px;
  border-width: 4px;
  outline-width: 3px;
  font-size: 13px;
}

html[data-theme] .theme-switcher button,
html[data-theme] .admin-mode-bar a {
  min-height: 28px;
  padding: 4px 8px;
  border-width: 3px;
}

html[data-theme] .ticker {
  --site-ticker-font-size: 18px;
  margin-bottom: 26px;
  padding: 8px 0;
  border-width: 4px;
  outline-width: 3px;
}

html[data-theme] .ticker-track {
  font-size: var(--site-ticker-font-size);
  line-height: var(--site-ticker-line-height);
}

html[data-theme] .ticker,
html[data-theme] .ticker-track,
html[data-theme] .ticker-track * {
  font-size: var(--site-ticker-font-size) !important;
  line-height: var(--site-ticker-line-height) !important;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

html[data-theme] .content-head {
  height: 30px;
  border-bottom-width: 4px;
}

html[data-theme] .iframe-board,
html[data-theme] .portrait-card {
  margin-bottom: 26px;
  border-width: 4px;
}

html[data-theme] .panel {
  margin-bottom: 22px;
  border-width: 4px;
}

html[data-theme] .iframe-title {
  padding: 9px 8px;
  font-size: 26px;
}

html[data-theme] .panel-title {
  padding: 8px 12px;
  font-size: 20px;
}

html[data-theme] .iframe-body {
  min-height: 250px;
  padding: 16px 18px;
}

html[data-theme] .portrait-card {
  padding: 10px;
}

html[data-theme] .hero-image,
html[data-theme] .portrait-frame {
  padding: 6px;
  border-width: 4px;
}

html[data-theme] .portrait-frame {
  aspect-ratio: 19 / 14;
}

html[data-theme] .home-movie-frame {
  aspect-ratio: auto;
}

html[data-theme] .portrait-frame img {
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  html[data-theme] .site-shell {
    padding: 7px 5px 16px;
  }

  html[data-theme] .top-title {
    gap: 2px;
    margin-bottom: 5px;
    padding: 6px;
    border-width: 3px;
    font-size: clamp(15px, 4.9vw, 19px);
    line-height: 1;
  }

  html[data-theme] .admin-mode-bar,
  html[data-theme] .theme-switcher {
    gap: 4px;
    margin: 0 0 5px;
    padding: 3px 5px;
    border-width: 2px;
    outline-width: 2px;
    font-size: 10px;
  }

  html[data-theme] .admin-mode-bar a,
  html[data-theme] .theme-switcher button {
    min-height: 22px;
    padding: 2px 5px;
    border-width: 2px;
  }

  html[data-theme] .ticker {
    --site-ticker-font-size: 12px;
    margin-bottom: 6px;
    padding: 3px 0;
    border-width: 3px;
    outline-width: 2px;
  }

  html[data-theme] .ticker-track {
    font-size: var(--site-ticker-font-size);
    line-height: var(--site-ticker-line-height);
  }

  html[data-theme] .ticker,
  html[data-theme] .ticker-track,
  html[data-theme] .ticker-track * {
    font-size: var(--site-ticker-font-size) !important;
    line-height: var(--site-ticker-line-height) !important;
  }

  html[data-theme] .sidebar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-width: 3px;
    outline-width: 2px;
  }

  html[data-theme] .side-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 0;
    padding: 6px 2px;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 10px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  /* Mobile layout is shared, but visible controls still need theme-specific color passes. */
  html[data-theme="retro"] .side-link {
    background: #fffef8;
    color: #1243a6;
    border-color: #274f9e;
    box-shadow: 3px 3px 0 rgba(39, 79, 158, .34);
    text-shadow: none;
  }

  html[data-theme="retro"] .side-link:hover {
    background: #fff36a;
    color: #1243a6;
  }

  html[data-theme="modern"] .side-link {
    background: #ffffff;
    color: #171b24;
    border-color: #d8dee8;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(20, 24, 32, .1);
    text-shadow: none;
  }

  html[data-theme="modern"] .side-link:hover {
    background: #141820;
    color: #ffffff;
  }

  html[data-theme="elegant"] .side-link {
    background: #fffaf4;
    color: #5a2848;
    border-color: rgba(90, 40, 72, .22);
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(35, 22, 41, .1);
    text-shadow: none;
  }

  html[data-theme="elegant"] .side-link:hover {
    background: #efe3c7;
    color: #231629;
  }

  html[data-theme="cute"] .side-link {
    background: #ffffff;
    color: #3b335c;
    border-color: #f0d7e8;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(155, 83, 130, .12);
    text-shadow: none;
  }

  html[data-theme="cute"] .side-link:hover {
    background: #fff6ba;
    color: #c23d78;
  }

  html[data-theme="taxi"] .side-link {
    background: #11151c;
    color: #ffd22e;
    border-color: #ffd22e;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(17, 21, 28, .18);
    text-shadow: none;
  }

  html[data-theme="taxi"] .side-link:hover {
    background: #ffd22e;
    color: #11151c;
  }

  html[data-theme] .side-icon {
    display: none;
  }

  html[data-theme] .nav-svg {
    display: none;
  }

  html[data-theme] .content-head {
    height: 10px;
    border-bottom-width: 3px;
  }

  html[data-theme] .content-inner {
    padding: 6px 5px 11px;
  }

  html[data-theme] .iframe-board,
  html[data-theme] .portrait-card,
  html[data-theme] .sns-panel {
    margin-bottom: 7px;
  }

  html[data-theme] .panel {
    margin-bottom: 11px;
  }

  html[data-theme] .iframe-board,
  html[data-theme] .panel,
  html[data-theme] .portrait-card {
    border-width: 3px;
  }

  html[data-theme] .iframe-title {
    padding: 4px 6px;
    font-size: 12px;
  }

  html[data-theme] .panel-title {
    padding: 5px 7px;
    font-size: 14px;
  }

  html[data-theme] .iframe-body {
    min-height: 62px;
    padding: 6px;
  }

  html[data-theme] .panel-body {
    padding: 8px;
  }

  html[data-theme] .portrait-card {
    padding: 6px;
  }

  html[data-theme] .hero-image,
  html[data-theme] .portrait-frame {
    padding: 3px;
    border-width: 3px;
  }

  html[data-theme] .portrait-frame {
    aspect-ratio: 19 / 14;
  }

  html[data-theme] .home-movie-frame {
    aspect-ratio: auto;
  }

  html[data-theme] .portrait-frame img {
    height: 100%;
    object-fit: cover;
  }

  html[data-theme] .news-item,
  html[data-theme] .mini-card,
  html[data-theme] .message,
  html[data-theme] .admin-row {
    padding: 6px;
    border-width: 2px;
    font-size: 11px;
  }
}

html[data-theme] .home-movie-frame .homepage-video-poster img,
html[data-theme] .home-movie-frame .homepage-video-player {
  height: auto;
  border: 0;
  filter: none;
  object-fit: cover;
}

html[data-theme="elegant"] .home-movie-frame .homepage-video-play,
html[data-theme="cute"] .home-movie-frame .homepage-video-play,
html[data-theme="taxi"] .home-movie-frame .homepage-video-play {
  display: inline-grid;
  place-items: center;
  width: min(260px, calc(100% - 16px));
  min-height: 38px;
  padding: 8px 16px;
  clip-path: none;
  transform: none;
  box-sizing: border-box;
  line-height: 1;
}

html[data-theme="elegant"] .home-movie-frame .homepage-video-play {
  background: rgba(255, 250, 244, .78);
  color: #4e2342;
  border: 1px solid rgba(216, 183, 94, .78);
  box-shadow: 0 2px 5px rgba(35, 22, 41, .10), 0 1px 0 rgba(255, 255, 255, .86) inset;
}

html[data-theme="elegant"] .home-movie-frame .homepage-video-play:hover {
  background: #5a2848;
  color: #fffaf4;
  border-color: #d8b75e;
}

html[data-theme="cute"] .home-movie-frame .homepage-video-play {
  width: min(252px, calc(100% - 20px));
  min-height: 36px;
  margin: 0 auto;
  padding: 6px 14px;
  background: #fff6ba;
  color: #3b335c;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 0 #ff9fc8, 0 3px 5px rgba(155, 83, 130, .08);
}

html[data-theme="cute"] .home-movie-frame .homepage-video-play:hover {
  background: #ff7fb3;
  color: #ffffff;
  box-shadow: 0 2px 0 #3b335c, 0 3px 5px rgba(255, 127, 179, .12);
}

html[data-theme="taxi"] .home-movie-frame .homepage-video-play {
  width: min(252px, calc(100% - 20px));
  min-height: 36px;
  margin: 0 auto 3px;
  padding: 6px 14px;
  background: #ffd22e;
  color: #0f1219;
  border: 2px solid #0f1219;
  box-shadow: 0 2px 0 rgba(15, 18, 25, .72);
}

html[data-theme="taxi"] .home-movie-frame .homepage-video-play:hover {
  background: #fffdf2;
  color: #0f1219;
  border-color: #0f1219;
}

.gogai-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .48);
  box-sizing: border-box;
}

.gogai-popup-modal.is-entering .gogai-popup-window {
  animation: gogai-drop-in .22s cubic-bezier(.2, .9, .32, 1.18) both;
}

.gogai-popup-modal.is-closing .gogai-popup-window {
  animation: gogai-drop-out .2s ease-in both;
}

@keyframes gogai-drop-in {
  from {
    opacity: 0;
    transform: translateY(-52px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gogai-drop-out {
  to {
    opacity: 0;
    transform: translateY(58px) scale(.985);
  }
}

.gogai-popup-window,
.gogai-editor-window,
.gogai-caution-window {
  width: min(94vw, 880px);
  max-height: min(92vh, 820px);
  overflow: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gogai-popup-window {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.gogai-popup-window [data-gogai-paper-slot] {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 10px 10px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gogai-popup-window [data-gogai-paper-slot]::-webkit-scrollbar {
  display: none;
}

.gogai-popup-window::-webkit-scrollbar,
.gogai-editor-window::-webkit-scrollbar,
.gogai-caution-window::-webkit-scrollbar {
  display: none;
}

.gogai-paper {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 16px;
  border: 4px solid #111;
  background:
    linear-gradient(#111, #111) 0 7px / 100% 4px no-repeat,
    linear-gradient(#111, #111) 0 calc(100% - 7px) / 100% 4px no-repeat,
    #fbfbf4;
  color: #111;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .38);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
}

.gogai-paper-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(108px, .65fr) minmax(190px, 1fr) minmax(108px, .65fr);
  gap: 12px;
  align-items: center;
  min-height: 98px;
  padding: 12px 0;
  border-bottom: 5px double #111;
}

.gogai-kicker {
  border: 3px double #111;
  background: #fff;
  text-align: center;
}

.gogai-kicker span {
  display: block;
  padding: 9px 8px;
  background: #111;
  color: #fff;
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
}

.gogai-kicker small {
  display: block;
  padding: 7px 6px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.gogai-logo {
  min-width: 0;
  text-align: center;
}

.gogai-logo strong {
  display: block;
  font-size: clamp(32px, 7vw, 68px);
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
}

.gogai-logo small {
  display: block;
  margin-top: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.gogai-stamp {
  justify-self: end;
  width: clamp(96px, 18vw, 158px);
  padding: 10px 0;
  transform: rotate(10deg);
  border: 4px solid #111;
  background: #111;
  color: #fff;
  text-align: center;
  font-size: clamp(32px, 8vw, 70px);
  font-weight: 900;
  line-height: 1;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .24);
}

.gogai-main {
  display: grid;
  grid-template-columns: minmax(220px, .86fr) minmax(0, 1.35fr);
  grid-template-areas:
    "image headline"
    "image body";
  gap: 14px 18px;
  padding-top: 16px;
}

.gogai-headline-area {
  grid-area: headline;
  min-width: 0;
  align-self: start;
  border: 5px double #111;
  background: #fff;
  padding: 18px 16px 12px;
  text-align: center;
}

.gogai-headline {
  margin: 0;
  font-size: clamp(34px, 8vw, 70px);
  line-height: 1.12;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.gogai-thread-line {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 2px solid #111;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.gogai-image-frame {
  grid-area: image;
  align-self: stretch;
  min-width: 0;
  border: 5px double #111;
  background: #fff;
  padding: 6px;
}

.gogai-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  filter: grayscale(1);
}

.gogai-body-area {
  grid-area: body;
  min-width: 0;
  align-self: stretch;
  padding: 4px 6px 0;
}

.gogai-body {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: var(--gogai-body-size, 18px);
  font-weight: 700;
  line-height: 1.92;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.gogai-close-dock {
  position: relative;
  bottom: auto;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  padding: 0 0 4px;
  pointer-events: none;
}

.gogai-close-dock.has-pager {
  margin-top: 0;
}

.gogai-close-dock [hidden] {
  display: none !important;
}

.gogai-popup-close-x {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0 0 2px;
  border: 4px solid #111;
  background: #fff;
  color: #111;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .34);
  font: 900 24px/1 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  cursor: pointer;
}

.gogai-popup-close-x:hover {
  background: #111;
  color: #fff;
}

.gogai-close-button {
  width: min(76vw, 340px);
  min-height: 42px;
  padding: 10px 18px;
  border: 4px solid #111;
  background: var(--yellow);
  color: #000;
  box-shadow: 4px 4px 0 #111;
  font: 900 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
  pointer-events: auto;
}

.gogai-close-dock.has-pager .gogai-close-button {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 15px;
}

.gogai-pager {
  display: grid;
  grid-template-columns: 52px minmax(80px, 1fr) 52px;
  align-items: center;
  gap: 8px;
  width: min(76vw, 340px);
  pointer-events: auto;
}

.gogai-page-button {
  min-width: 0;
  width: 52px;
  min-height: 38px;
  padding: 6px 0;
  font-size: 20px;
  line-height: 1;
}

.gogai-page-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 3px solid #111;
  background: rgba(255, 255, 255, .94);
  color: #111;
  font: 900 13px/1 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  letter-spacing: .06em;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .28);
}

.gogai-delete-x {
  right: 12px;
  top: 12px;
}

.gogai-caution-window,
.gogai-editor-window {
  border: 4px solid #111;
  background: #fbfbf4;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .38);
}

.gogai-caution-window {
  width: min(92vw, 660px);
  padding: 18px;
}

.gogai-caution-title {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #111;
  color: #fff;
  font: 900 22px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  text-align: center;
}

.gogai-caution-copy {
  max-height: min(54vh, 430px);
  overflow: auto;
  scrollbar-width: none;
  padding: 4px 2px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.gogai-caution-copy::-webkit-scrollbar {
  display: none;
}

.gogai-editor-window {
  padding: 12px;
}

.gogai-editor-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 3px solid #111;
  background: #fff;
  font: 800 13px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
}

.gogai-countdown {
  padding: 4px 8px;
  background: #111;
  color: #fff;
}

.gogai-paper.is-editor {
  box-shadow: none;
}

.gogai-headline-input,
.gogai-body-input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  color: #111;
  text-align: center;
  outline: 0;
}

.gogai-headline-input {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  min-height: 1.34em;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.12;
}

.gogai-body-input {
  min-height: 230px;
  resize: vertical;
  text-align: left;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
}

.gogai-char-count {
  text-align: right;
}

.gogai-image-button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  padding: 0;
  border: 0;
  background: #111;
  cursor: pointer;
}

.gogai-image-button img {
  min-height: 280px;
}

.gogai-image-button span {
  position: absolute;
  inset: auto 14px 14px;
  padding: 9px 12px;
  border: 3px solid #111;
  background: rgba(255, 255, 255, .9);
  color: #111;
  font: 900 16px/1 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  text-align: center;
}

.gogai-image-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 3px solid #111;
  background: #fff;
}

.gogai-image-picker.is-collapsed {
  display: none;
}

.gogai-image-choice {
  padding: 4px;
  border: 3px solid #999;
  background: #fff;
  cursor: pointer;
}

.gogai-image-choice.active {
  border-color: #d31818;
  box-shadow: 0 0 0 3px rgba(211, 24, 24, .2);
}

.gogai-image-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1);
}

.gogai-policy-note {
  margin: 9px 0;
  font: 800 12px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
}

.gogai-editor-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

.gogai-choice-button,
.gogai-submit-button,
.gogai-editor-secondary-button {
  width: min(78vw, 260px);
}

.gogai-submit-button {
  background: var(--yellow);
}

.gogai-primary-button,
.gogai-submit-button,
.gogai-cancel-action,
.gogai-close-button,
.gogai-page-button {
  background: var(--yellow);
  color: #000;
}

html[data-theme="retro"] .gogai-primary-button,
html[data-theme="retro"] .gogai-submit-button,
html[data-theme="retro"] .gogai-cancel-action,
html[data-theme="retro"] .gogai-close-button,
html[data-theme="retro"] .gogai-page-button {
  background: #fff36a;
  color: #1243a6;
  border-color: #274f9e;
  box-shadow: 4px 4px 0 rgba(39, 79, 158, .34);
}

html[data-theme="modern"] .gogai-primary-button,
html[data-theme="modern"] .gogai-submit-button,
html[data-theme="modern"] .gogai-cancel-action,
html[data-theme="modern"] .gogai-close-button,
html[data-theme="modern"] .gogai-page-button {
  background: #1769e0;
  color: #ffffff;
  border-color: #1769e0;
}

html[data-theme="elegant"] .gogai-primary-button,
html[data-theme="elegant"] .gogai-submit-button,
html[data-theme="elegant"] .gogai-cancel-action,
html[data-theme="elegant"] .gogai-close-button,
html[data-theme="elegant"] .gogai-page-button {
  background: #5a2848;
  color: #fffaf4;
  border-color: #d8b75e;
}

html[data-theme="cute"] .gogai-primary-button,
html[data-theme="cute"] .gogai-submit-button,
html[data-theme="cute"] .gogai-cancel-action,
html[data-theme="cute"] .gogai-close-button,
html[data-theme="cute"] .gogai-page-button {
  background: #ff7fb3;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 0 #3b335c, 0 8px 14px rgba(255, 127, 179, .16);
}

html[data-theme="taxi"] .gogai-primary-button,
html[data-theme="taxi"] .gogai-submit-button,
html[data-theme="taxi"] .gogai-cancel-action,
html[data-theme="taxi"] .gogai-close-button,
html[data-theme="taxi"] .gogai-page-button {
  background: #ffd22e;
  color: #0f1219;
  border-color: #0f1219;
}

.gogai-action[disabled] {
  opacity: .56;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .gogai-modal {
    padding: 11px;
    place-items: center;
  }

  .gogai-popup-window {
    width: clamp(190px, 60vw, 320px);
    max-height: min(60vh, 520px);
  }

  .gogai-editor-window,
  .gogai-caution-window {
    width: min(96vw, 430px);
    max-height: 94vh;
  }

  .gogai-popup-window [data-gogai-paper-slot] {
    padding: 0 5px 9px 0;
  }

  .gogai-paper {
    padding: 7px;
    border-width: 3px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .38);
  }

  .gogai-paper-head {
    grid-template-columns: 48px minmax(0, 1fr) 46px;
    gap: 5px;
    min-height: 52px;
    padding: 6px 0;
    border-bottom-width: 3px;
  }

  .gogai-kicker {
    border-width: 2px;
  }

  .gogai-kicker span {
    padding: 5px 3px;
    font-size: 16px;
  }

  .gogai-kicker small {
    padding: 3px 2px;
    font-size: 7px;
  }

  .gogai-logo strong {
    font-size: clamp(17px, 5.3vw, 24px);
  }

  .gogai-logo small {
    margin-top: 3px;
    font-size: clamp(7px, 2vw, 9px);
  }

  .gogai-stamp {
    width: 46px;
    padding: 6px 0;
    border-width: 3px;
    font-size: 19px;
  }

  .gogai-popup-window .gogai-stamp {
    visibility: hidden;
  }

  .gogai-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "headline"
      "image"
      "body";
    gap: 7px;
    padding-top: 7px;
  }

  .gogai-headline-area {
    padding: 9px 7px 7px;
    border-width: 3px;
  }

.gogai-headline,
.gogai-headline-input {
    min-height: 1.3em;
    font-size: clamp(18px, 5.6vw, 25px);
  }

  .gogai-thread-line {
    margin-top: 5px;
    padding-top: 5px;
    font-size: 9px;
  }

  .gogai-image-frame {
    border-width: 3px;
    padding: 3px;
  }

  .gogai-image-frame img,
  .gogai-image-button,
  .gogai-image-button img {
    min-height: 0;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .gogai-body-area {
    padding: 0 1px;
  }

  .gogai-body {
    font-size: min(var(--gogai-body-size, 14px), 14px);
    line-height: 1.58;
  }

  .gogai-body-input {
    min-height: 180px;
    font-size: 16px;
  }

  .gogai-close-dock {
    bottom: auto;
    margin-top: 0;
    padding: 0 0 3px;
  }

  .gogai-close-dock.has-pager {
    margin-top: 0;
    gap: 6px;
  }

  .gogai-close-button {
    width: min(60vw, 260px);
    min-height: 34px;
    padding: 8px 12px;
    border-width: 3px;
    font-size: 14px;
  }

  .gogai-close-dock.has-pager .gogai-close-button {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
  }

  .gogai-popup-close-x {
    right: 7px;
    top: 7px;
    width: 32px;
    height: 32px;
    padding-bottom: 2px;
    border-width: 3px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, .34);
    font-size: 21px;
  }

  .gogai-delete-x {
    left: 7px;
    right: auto;
    top: 7px;
  }

  .gogai-pager {
    grid-template-columns: 38px minmax(60px, 1fr) 38px;
    width: min(60vw, 260px);
    gap: 5px;
  }

  .gogai-page-button {
    width: 38px;
    min-height: 31px;
    font-size: 16px;
  }

  .gogai-page-status {
    min-height: 29px;
    border-width: 2px;
    font-size: 11px;
  }

  .gogai-choice-button,
  .gogai-submit-button,
  .gogai-editor-secondary-button {
    width: min(82vw, 240px);
  }
}

html[data-theme] .setting-body .theme-switcher {
  position: static;
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  align-items: center;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme] .setting-body .theme-switcher span {
  display: none;
}

html[data-theme] .setting-body .theme-switcher button {
  min-height: 34px;
  padding: 5px 10px;
}

@media (max-width: 640px) {
  html[data-theme] .setting-body .theme-switcher {
    gap: 6px;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    border: 0;
    outline: 0;
  }

  html[data-theme] .setting-body .theme-switcher button {
    min-height: 26px;
    padding: 3px 7px;
  }
}

/* Local-lab points screens: keep layout common, let each theme own the color. */
body[data-page="setting"] .setting-grid,
body[data-page="status"] .status-dashboard {
  max-width: 980px;
}

body[data-page="setting"] .setting-panel,
body[data-page="status"] .status-hero > div,
body[data-page="status"] .status-card-item,
body[data-page="status"] .status-record-list li,
body[data-page="status"] .status-bbs-row {
  border-width: 3px;
  box-shadow: none;
}

body[data-page="setting"] .setting-title,
body[data-page="status"] .panel-title {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.1;
}

body[data-page="setting"] .setting-body {
  display: grid;
  gap: 12px;
}

body[data-page="setting"] .setting-body .theme-switcher {
  justify-content: flex-start !important;
  gap: 7px;
}

body[data-page="setting"] .setting-body .theme-switcher button {
  min-height: 32px;
  padding: 5px 10px;
}

body[data-page="setting"] .point-passphrase-login {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(560px, 100%);
  max-width: none;
}

body[data-page="setting"] .point-passphrase-login button,
body[data-page="setting"] .point-passphrase-login .point-passphrase-message {
  grid-column: 1 / -1;
}

body[data-page="setting"] .point-passphrase-create-link {
  justify-self: start;
}

body[data-page="setting"] .point-passphrase-form input,
body[data-page="setting"] .point-passphrase-form button,
body[data-page="setting"] .passphrase-modal__window,
body[data-page="setting"] .passphrase-modal__close,
body[data-page="setting"] .hio-confirm-modal__window,
body[data-page="setting"] .hio-confirm-modal__button {
  border-width: 2px;
}

body[data-page="status"] .status-hero {
  gap: 8px;
}

body[data-page="status"] .status-hero > div {
  min-height: 68px;
  padding: 10px 12px;
}

body[data-page="status"] .status-hero span {
  margin-bottom: 6px;
}

body[data-page="status"] .status-hero strong {
  font-size: clamp(15px, 2.5vw, 21px);
}

html[data-theme="retro"] body[data-page="setting"] .setting-panel,
html[data-theme="retro"] body[data-page="setting"] .passphrase-modal__window,
html[data-theme="retro"] body[data-page="status"] .status-hero > div,
html[data-theme="retro"] body[data-page="status"] .status-card-item,
html[data-theme="retro"] body[data-page="status"] .status-record-list li,
html[data-theme="retro"] body[data-page="status"] .status-bbs-row {
  border-color: #274f9e;
  background: #fffdf0;
  color: #21386f;
}

html[data-theme="retro"] body[data-page="setting"] .setting-title,
html[data-theme="retro"] body[data-page="status"] .panel-title,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-form button {
  background: #274f9e;
  color: #fffdf0;
}

html[data-theme="retro"] body[data-page="setting"] .point-passphrase-form input,
html[data-theme="retro"] body[data-page="setting"] .passphrase-modal__close,
html[data-theme="retro"] body[data-page="status"] .status-card-item img,
html[data-theme="retro"] body[data-page="status"] .status-card-item a {
  border-color: #274f9e;
}

html[data-theme="retro"] body[data-page="status"] .status-card-item a {
  background: #e84b39;
  color: #fffdf0;
}

html[data-theme="mono"] body[data-page="setting"] .setting-panel,
html[data-theme="mono"] body[data-page="setting"] .passphrase-modal__window,
html[data-theme="mono"] body[data-page="status"] .status-hero > div,
html[data-theme="mono"] body[data-page="status"] .status-card-item,
html[data-theme="mono"] body[data-page="status"] .status-record-list li,
html[data-theme="mono"] body[data-page="status"] .status-bbs-row {
  border-color: #262626;
  background: #f3f3ef;
  color: #151515;
}

html[data-theme="mono"] body[data-page="setting"] .setting-title,
html[data-theme="mono"] body[data-page="status"] .panel-title,
html[data-theme="mono"] body[data-page="setting"] .point-passphrase-form button {
  background: #262626;
  color: #f7f7f4;
}

html[data-theme="taxi"] body[data-page="setting"] .setting-panel,
html[data-theme="taxi"] body[data-page="setting"] .passphrase-modal__window,
html[data-theme="taxi"] body[data-page="status"] .status-hero > div,
html[data-theme="taxi"] body[data-page="status"] .status-card-item,
html[data-theme="taxi"] body[data-page="status"] .status-record-list li,
html[data-theme="taxi"] body[data-page="status"] .status-bbs-row {
  border-color: #111;
  background: #fff;
  color: #161616;
}

html[data-theme="taxi"] body[data-page="setting"] .setting-title,
html[data-theme="taxi"] body[data-page="status"] .panel-title,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="taxi"] body[data-page="status"] .status-card-item a {
  background: #f7bf28;
  color: #111;
}

html[data-theme="modern"] body[data-page="setting"] .setting-panel,
html[data-theme="modern"] body[data-page="setting"] .passphrase-modal__window,
html[data-theme="modern"] body[data-page="status"] .status-hero > div,
html[data-theme="modern"] body[data-page="status"] .status-card-item,
html[data-theme="modern"] body[data-page="status"] .status-record-list li,
html[data-theme="modern"] body[data-page="status"] .status-bbs-row {
  border-color: #23406f;
  background: #f8fbff;
  color: #173052;
}

html[data-theme="modern"] body[data-page="setting"] .setting-title,
html[data-theme="modern"] body[data-page="status"] .panel-title,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-form button {
  background: #23406f;
  color: #f8fbff;
}

html[data-theme="elegant"] body[data-page="setting"] .setting-panel,
html[data-theme="elegant"] body[data-page="setting"] .passphrase-modal__window,
html[data-theme="elegant"] body[data-page="status"] .status-hero > div,
html[data-theme="elegant"] body[data-page="status"] .status-card-item,
html[data-theme="elegant"] body[data-page="status"] .status-record-list li,
html[data-theme="elegant"] body[data-page="status"] .status-bbs-row {
  border-color: #8d6a22;
  background: #fffaf0;
  color: #3b2712;
}

html[data-theme="elegant"] body[data-page="setting"] .setting-title,
html[data-theme="elegant"] body[data-page="status"] .panel-title,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-form button {
  background: #8d6a22;
  color: #fffaf0;
}

html[data-theme="cute"] body[data-page="setting"] .setting-panel,
html[data-theme="cute"] body[data-page="setting"] .passphrase-modal__window,
html[data-theme="cute"] body[data-page="status"] .status-hero > div,
html[data-theme="cute"] body[data-page="status"] .status-card-item,
html[data-theme="cute"] body[data-page="status"] .status-record-list li,
html[data-theme="cute"] body[data-page="status"] .status-bbs-row {
  border-color: #d45273;
  background: #fff8fb;
  color: #62213a;
}

html[data-theme="cute"] body[data-page="setting"] .setting-title,
html[data-theme="cute"] body[data-page="status"] .panel-title,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-form button {
  background: #d45273;
  color: #fff8fb;
}

/* Local-lab MY PAGE rebuild. */
html[data-theme] .nav-svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 4.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: inherit;
}

html[data-theme] .nav-svg circle {
  fill: none !important;
  stroke: currentColor !important;
}

body[data-page="setting"] .content-inner {
  display: grid;
  gap: 18px;
}

body[data-page="setting"] .my-page-section {
  display: grid;
  gap: 12px;
  max-width: 980px;
}

body[data-page="setting"] .my-page-section-title {
  margin: 0;
  padding: 7px 11px;
  border: 3px solid currentColor;
  font-size: clamp(16px, 2.1vw, 19px);
  line-height: 1.1;
  letter-spacing: 0;
}

body[data-page="setting"] .status-dashboard {
  gap: 14px;
}

body[data-page="setting"] .my-page-setting-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

body[data-page="setting"] .my-page-setting-grid .setting-panel-wide {
  grid-column: auto;
}

body[data-page="setting"] .my-page-status-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

body[data-page="setting"] .my-page-status-details {
  display: grid;
  gap: 14px;
}

body[data-page="setting"] .status-summary-panel,
body[data-page="setting"] .status-card-folder-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
}

body[data-page="setting"] .status-hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  height: 100%;
}

body[data-page="setting"] .status-hero > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 74px;
  padding: 12px 14px;
}

body[data-page="setting"] .status-hero span {
  margin-bottom: 6px;
}

body[data-page="setting"] .status-hero strong {
  font-size: clamp(17px, 2.4vw, 24px);
  white-space: nowrap;
}

body[data-page="setting"] .status-card-folder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

body[data-page="setting"] .status-card-folder-row button {
  min-height: 40px;
  width: min(240px, 100%);
  padding: 0 18px;
  border: 3px solid var(--my-page-accent);
  background: var(--my-page-action);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

body[data-page="setting"] .status-card-grid {
  display: block;
  overflow: visible;
}

body[data-page="setting"] .point-passphrase-logged-in {
  width: 100%;
}

body[data-page="setting"] .point-passphrase-create-form {
  gap: 10px;
}

body[data-page="setting"] .point-passphrase-logout {
  border-width: 2px;
  background: #c91828;
  color: #fff;
}

html[data-theme="retro"] body[data-page="setting"] {
  --my-page-accent: #274f9e;
  --my-page-accent-text: #fffdf0;
  --my-page-surface: #fffdf0;
  --my-page-text: #21386f;
  --my-page-action: #e84b39;
}

html[data-theme="modern"] body[data-page="setting"] {
  --my-page-accent: #23406f;
  --my-page-accent-text: #f8fbff;
  --my-page-surface: #f8fbff;
  --my-page-text: #173052;
  --my-page-action: #c91828;
}

html[data-theme="elegant"] body[data-page="setting"] {
  --my-page-accent: #8d6a22;
  --my-page-accent-text: #fffaf0;
  --my-page-surface: #fffaf0;
  --my-page-text: #3b2712;
  --my-page-action: #9f1f35;
}

html[data-theme="cute"] body[data-page="setting"] {
  --my-page-accent: #d45273;
  --my-page-accent-text: #fff8fb;
  --my-page-surface: #fff8fb;
  --my-page-text: #62213a;
  --my-page-action: #c91842;
}

html[data-theme="taxi"] body[data-page="setting"] {
  --my-page-accent: #111;
  --my-page-accent-text: #f7bf28;
  --my-page-surface: #fff;
  --my-page-text: #161616;
  --my-page-action: #b60018;
}

body[data-page="setting"] .my-page-section-title,
body[data-page="setting"] .setting-panel,
body[data-page="setting"] .passphrase-modal__window,
body[data-page="setting"] .hio-confirm-modal__window,
body[data-page="setting"] .point-passphrase-logged-in,
body[data-page="setting"] .status-hero > div,
body[data-page="setting"] .status-card-item,
body[data-page="setting"] .status-record-list li,
body[data-page="setting"] .status-bbs-row {
  border-color: var(--my-page-accent);
  background: var(--my-page-surface);
  color: var(--my-page-text);
}

body[data-page="setting"] .my-page-section-title,
body[data-page="setting"] .setting-title,
body[data-page="setting"] .panel-title,
body[data-page="setting"] .point-passphrase-form button {
  background: var(--my-page-accent);
  color: var(--my-page-accent-text);
}

body[data-page="setting"] .point-passphrase-form input,
body[data-page="setting"] .passphrase-modal__close,
body[data-page="setting"] .hio-confirm-modal__button,
body[data-page="setting"] .status-card-folder-row button,
body[data-page="setting"] .point-passphrase-account-name,
body[data-page="setting"] .status-card-item img,
body[data-page="setting"] .status-card-item a {
  border-color: var(--my-page-accent);
}

body[data-page="setting"] .status-card-item a,
body[data-page="setting"] .hio-confirm-modal.is-danger .hio-confirm-modal__button.is-confirm,
body[data-page="setting"] .status-card-folder-row button,
body[data-page="setting"] .point-passphrase-logout {
  background: var(--my-page-action);
  color: #fff;
}

@media (max-width: 640px) {
  body[data-page="setting"] .point-passphrase-login {
    grid-template-columns: 1fr;
  }
}

html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="taxi"] body[data-page="setting"] .status-card-folder-row button,
html[data-theme="taxi"] body[data-page="setting"] .status-card-item a {
  background: #c91828;
  color: #fff;
}

html[data-theme="taxi"] .side-icon {
  color: #11151c;
}

.setting-card-folder-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: space-between;
  min-width: 0;
  height: 100%;
}

.setting-card-folder-link div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.setting-card-folder-link b {
  font-size: 18px;
  line-height: 1.2;
}

.setting-card-folder-link span {
  max-width: 22em;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0.74;
}

.setting-card-folder-link button {
  min-height: 42px;
  width: 100%;
  padding: 0 18px;
  border: 3px solid var(--my-page-accent);
  background: var(--my-page-action);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  body[data-page="setting"] .my-page-section {
    gap: 10px;
  }

  body[data-page="setting"] .status-card-folder-row {
    grid-template-columns: 1fr;
  }

  .setting-card-folder-link {
    grid-template-columns: 1fr;
  }
}

body[data-page="setting"] {
  --my-page-line: 2px;
  --my-page-panel-gap: 12px;
  --my-page-panel-pad: 12px;
}

body[data-page="setting"] .my-page-section {
  gap: var(--my-page-panel-gap);
}

body[data-page="setting"] .my-page-section-title,
body[data-page="setting"] .setting-panel,
body[data-page="setting"] .status-section {
  border: var(--my-page-line) solid var(--my-page-accent);
  border-radius: 6px;
  background: var(--my-page-surface);
  color: var(--my-page-text);
  box-shadow: none;
  overflow: hidden;
}

body[data-page="setting"] .my-page-section-title,
body[data-page="setting"] .setting-title,
body[data-page="setting"] .panel-title {
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  background: var(--my-page-accent);
  color: var(--my-page-accent-text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

body[data-page="setting"] .my-page-section-title {
  border-radius: 0;
}

body[data-page="setting"] .setting-body,
body[data-page="setting"] .panel-body {
  padding: var(--my-page-panel-pad);
}

body[data-page="setting"] .setting-grid,
body[data-page="setting"] .my-page-status-overview,
body[data-page="setting"] .my-page-status-details,
body[data-page="setting"] .status-dashboard,
body[data-page="setting"] .status-hero,
body[data-page="setting"] .status-record-list,
body[data-page="setting"] .status-bbs-list {
  gap: var(--my-page-panel-gap);
}

body[data-page="setting"] .status-hero > div,
body[data-page="setting"] .point-passphrase-logged-in,
body[data-page="setting"] .status-record-list li,
body[data-page="setting"] .status-bbs-row {
  min-height: 0;
  padding: 11px 12px;
  border: var(--my-page-line) solid var(--my-page-accent);
  background: var(--my-page-surface);
  color: var(--my-page-text);
  box-shadow: none;
}

body[data-page="setting"] .point-passphrase-logged-in {
  display: grid;
  gap: 10px;
  max-width: none;
  width: 100%;
}

body[data-page="setting"] .status-bbs-row {
  grid-template-columns: minmax(9rem, 0.42fr) minmax(0, 1fr);
  align-items: start;
}

body[data-page="setting"] .point-passphrase-logged-in > strong,
body[data-page="setting"] .status-record-list b,
body[data-page="setting"] .status-bbs-row b {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
}

body[data-page="setting"] .point-passphrase-logged-in > p,
body[data-page="setting"] .status-record-list span,
body[data-page="setting"] .status-record-list em,
body[data-page="setting"] .status-record-list small,
body[data-page="setting"] .status-bbs-row span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  body[data-page="setting"] .status-bbs-row {
    grid-template-columns: 1fr;
  }
}

body[data-page="setting"] .point-passphrase-account-name {
  width: fit-content;
  margin: 0;
  padding: 6px 8px;
  border: var(--my-page-line) solid var(--my-page-accent);
  background: color-mix(in srgb, var(--my-page-surface) 84%, #fff);
  color: var(--my-page-text);
}

body[data-page="setting"] .setting-body .theme-switcher {
  gap: 8px;
}

body[data-page="setting"] .setting-body .theme-switcher button,
body[data-page="setting"] .point-passphrase-create-link,
body[data-page="setting"] .point-passphrase-form button,
body[data-page="setting"] .point-passphrase-logout,
body[data-page="setting"] .status-card-folder-row button {
  min-height: 38px;
  border: var(--my-page-line) solid var(--my-page-accent);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

body[data-page="setting"] .setting-body .theme-switcher button {
  padding: 0 12px;
  background: var(--my-page-surface);
  color: var(--my-page-text);
}

html[data-theme] body[data-page="setting"] .setting-body .theme-switcher button {
  min-height: 38px;
  padding: 0 12px;
  border: var(--my-page-line) solid var(--my-page-accent);
  border-radius: 0;
  background: var(--my-page-surface);
  color: var(--my-page-text);
  box-shadow: none;
  clip-path: none;
  font-family: inherit;
  font-weight: 900;
  text-transform: uppercase;
  backdrop-filter: none;
}

body[data-page="setting"] .setting-body .theme-switcher button.active,
body[data-page="setting"] .setting-body .theme-switcher button[aria-pressed="true"],
html[data-theme] body[data-page="setting"] .setting-body .theme-switcher button.active,
html[data-theme] body[data-page="setting"] .setting-body .theme-switcher button[aria-pressed="true"] {
  background: var(--my-page-accent);
  color: var(--my-page-accent-text);
}

body[data-page="setting"] .point-passphrase-form input {
  min-height: 38px;
  border: var(--my-page-line) solid var(--my-page-accent);
  background: var(--my-page-surface);
  color: var(--my-page-text);
  box-shadow: none;
}

body[data-page="setting"] .status-hero span {
  margin-bottom: 6px;
  color: color-mix(in srgb, var(--my-page-text) 64%, transparent);
}

body[data-page="setting"] .status-hero strong {
  font-size: clamp(18px, 2.5vw, 24px);
}

body[data-page="setting"] .status-card-folder-row button {
  width: min(220px, 100%);
}

/* MY PAGE should feel like the active site theme, not a separate utility page. */
body[data-page="setting"] .setting-panel.panel,
body[data-page="setting"] .status-section.panel {
  margin-bottom: 0;
}

html[data-theme="retro"] body[data-page="setting"] {
  --my-page-accent: #274f9e;
  --my-page-accent-text: #fff;
  --my-page-surface: #fffef0;
  --my-page-text: #21386f;
  --my-page-action: #e84b39;
}

html[data-theme="retro"] body[data-page="setting"] .my-page-section-title,
html[data-theme="retro"] body[data-page="setting"] .setting-panel.panel,
html[data-theme="retro"] body[data-page="setting"] .status-section.panel {
  border: 3px solid #274f9e;
  border-radius: 0;
  outline: 2px solid #fff;
  background: #fffef0;
  box-shadow: 3px 3px 0 rgba(39, 79, 158, .28);
}

html[data-theme="retro"] body[data-page="setting"] .my-page-section-title,
html[data-theme="retro"] body[data-page="setting"] .setting-title,
html[data-theme="retro"] body[data-page="setting"] .panel-title {
  background: linear-gradient(90deg, #2467d8, #87e7ff);
  color: #fff;
  border-color: #274f9e;
  text-shadow: 1px 1px 0 #152c7a;
}

html[data-theme="retro"] body[data-page="setting"] .status-hero > div,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-logged-in,
html[data-theme="retro"] body[data-page="setting"] .status-record-list li,
html[data-theme="retro"] body[data-page="setting"] .status-bbs-row,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-account-name {
  border: 3px solid #274f9e;
  border-radius: 0;
  background: #fffef0;
  box-shadow: 2px 2px 0 rgba(39, 79, 158, .2);
}

html[data-theme="retro"] body[data-page="setting"] .setting-body .theme-switcher button,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-create-link,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="retro"] body[data-page="setting"] .status-card-folder-row button {
  min-height: 34px;
  border: 3px outset #274f9e;
  border-radius: 0;
  background: linear-gradient(#fff, #ffe7a3);
  color: #063d94;
  box-shadow: 2px 2px 0 rgba(39, 79, 158, .35);
  clip-path: none;
  text-shadow: none;
}

html[data-theme="retro"] body[data-page="setting"] .setting-body .theme-switcher button.active,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="retro"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="retro"] body[data-page="setting"] .status-card-folder-row button {
  background: linear-gradient(#fffca8, #ff9fd2);
  color: #46105e;
}

html[data-theme="modern"] body[data-page="setting"] {
  --my-page-accent: #141820;
  --my-page-accent-text: #ffffff;
  --my-page-surface: rgba(255, 255, 255, .94);
  --my-page-text: #171b24;
  --my-page-action: #141820;
}

html[data-theme="modern"] body[data-page="setting"] .my-page-section-title,
html[data-theme="modern"] body[data-page="setting"] .setting-panel.panel,
html[data-theme="modern"] body[data-page="setting"] .status-section.panel {
  border: 3px solid rgba(20, 24, 32, .12);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(20, 24, 32, .1);
}

html[data-theme="modern"] body[data-page="setting"] .my-page-section-title,
html[data-theme="modern"] body[data-page="setting"] .setting-title,
html[data-theme="modern"] body[data-page="setting"] .panel-title {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
  border-style: solid;
  text-shadow: none;
}

html[data-theme="modern"] body[data-page="setting"] .status-hero > div,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-logged-in,
html[data-theme="modern"] body[data-page="setting"] .status-record-list li,
html[data-theme="modern"] body[data-page="setting"] .status-bbs-row,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-account-name {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

html[data-theme="modern"] body[data-page="setting"] .setting-body .theme-switcher button,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-create-link,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="modern"] body[data-page="setting"] .status-card-folder-row button {
  min-height: 34px;
  border: 2px solid #d8dee8;
  border-radius: 8px;
  background: #f7f9fc;
  color: #171b24;
  box-shadow: none;
  clip-path: none;
  text-shadow: none;
}

html[data-theme="modern"] body[data-page="setting"] .setting-body .theme-switcher button.active,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="modern"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="modern"] body[data-page="setting"] .status-card-folder-row button {
  background: #141820;
  color: #ffffff;
  border-color: #141820;
}

html[data-theme="elegant"] body[data-page="setting"] .setting-body .theme-switcher button,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-create-link,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="elegant"] body[data-page="setting"] .status-card-folder-row button {
  border: 1px solid rgba(90, 40, 72, .22);
  border-radius: 0;
  background: rgba(255, 250, 244, .38);
  color: #2b2132;
  box-shadow: 0 8px 22px rgba(35, 22, 41, .08), 0 1px 0 rgba(255, 255, 255, .8) inset;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
}

html[data-theme="elegant"] body[data-page="setting"] .setting-body .theme-switcher button.active,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="elegant"] body[data-page="setting"] .status-card-folder-row button {
  background: rgba(90, 40, 72, .86);
  border-color: rgba(231, 207, 145, .72);
  color: #fffaf4;
}

html[data-theme="cute"] body[data-page="setting"] .setting-body .theme-switcher button,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-create-link,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="cute"] body[data-page="setting"] .status-card-folder-row button {
  border: 3px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  color: #3b335c;
  box-shadow: 0 5px 0 #d9c7ff, 0 10px 18px rgba(155, 83, 130, .12);
  clip-path: none;
}

html[data-theme="cute"] body[data-page="setting"] .setting-body .theme-switcher button:nth-of-type(odd) {
  transform: rotate(-1deg);
}

html[data-theme="cute"] body[data-page="setting"] .setting-body .theme-switcher button:nth-of-type(even) {
  transform: rotate(1deg);
}

html[data-theme="cute"] body[data-page="setting"] .setting-body .theme-switcher button.active,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="cute"] body[data-page="setting"] .status-card-folder-row button {
  background: #ff7fb3;
  color: #ffffff;
}

html[data-theme="taxi"] body[data-page="setting"] .setting-body .theme-switcher button,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-create-link,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="taxi"] body[data-page="setting"] .status-card-folder-row button {
  border: 2px solid #0f1219;
  border-radius: 0;
  background: #fffdf2;
  color: #11151c;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .22);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

html[data-theme="taxi"] body[data-page="setting"] .setting-body .theme-switcher button.active,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-form button,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-logout,
html[data-theme="taxi"] body[data-page="setting"] .status-card-folder-row button {
  background: #ffd22e;
  color: #0f1219;
}

html[data-theme="elegant"] body[data-page="setting"] {
  --my-page-accent: #5a2848;
  --my-page-accent-text: #fffaf4;
  --my-page-surface: rgba(255, 250, 244, .95);
  --my-page-text: #231629;
  --my-page-action: #5a2848;
}

html[data-theme="elegant"] body[data-page="setting"] .my-page-section-title,
html[data-theme="elegant"] body[data-page="setting"] .setting-panel.panel,
html[data-theme="elegant"] body[data-page="setting"] .status-section.panel {
  border: 3px solid rgba(83, 56, 73, .18);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 250, 244, .95);
  box-shadow: 0 16px 36px rgba(35, 22, 41, .12);
}

html[data-theme="elegant"] body[data-page="setting"] .my-page-section-title,
html[data-theme="elegant"] body[data-page="setting"] .setting-title,
html[data-theme="elegant"] body[data-page="setting"] .panel-title {
  background: linear-gradient(90deg, #231629, #5a2848);
  color: #fffaf4;
  border-color: #d8b75e;
  text-shadow: none;
}

html[data-theme="elegant"] body[data-page="setting"] .status-hero > div,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-logged-in,
html[data-theme="elegant"] body[data-page="setting"] .status-record-list li,
html[data-theme="elegant"] body[data-page="setting"] .status-bbs-row,
html[data-theme="elegant"] body[data-page="setting"] .point-passphrase-account-name {
  border: 2px solid rgba(90, 40, 72, .22);
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: none;
}

html[data-theme="cute"] body[data-page="setting"] {
  --my-page-accent: #ff7fb3;
  --my-page-accent-text: #3b335c;
  --my-page-surface: rgba(255, 249, 253, .95);
  --my-page-text: #3b335c;
  --my-page-action: #ff7fb3;
}

html[data-theme="cute"] body[data-page="setting"] .my-page-section-title,
html[data-theme="cute"] body[data-page="setting"] .setting-panel.panel,
html[data-theme="cute"] body[data-page="setting"] .status-section.panel {
  border: 3px solid rgba(151, 92, 134, .15);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 249, 253, .95);
  box-shadow: 0 14px 34px rgba(155, 83, 130, .12);
}

html[data-theme="cute"] body[data-page="setting"] .my-page-section-title,
html[data-theme="cute"] body[data-page="setting"] .setting-title,
html[data-theme="cute"] body[data-page="setting"] .panel-title {
  background: linear-gradient(90deg, #ff9fc8, #d9c7ff);
  color: #3b335c;
  border-color: #ffffff;
  text-shadow: none;
}

html[data-theme="cute"] body[data-page="setting"] .status-hero > div,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-logged-in,
html[data-theme="cute"] body[data-page="setting"] .status-record-list li,
html[data-theme="cute"] body[data-page="setting"] .status-bbs-row,
html[data-theme="cute"] body[data-page="setting"] .point-passphrase-account-name {
  border: 2px solid #f0d7e8;
  border-radius: 8px;
  background: #fff9fd;
  box-shadow: none;
}

html[data-theme="taxi"] body[data-page="setting"] {
  --my-page-accent: #11151c;
  --my-page-accent-text: #ffd22e;
  --my-page-surface: #fffdf2;
  --my-page-text: #11151c;
  --my-page-action: #ffd22e;
}

html[data-theme="taxi"] body[data-page="setting"] .my-page-section-title,
html[data-theme="taxi"] body[data-page="setting"] .setting-panel.panel,
html[data-theme="taxi"] body[data-page="setting"] .status-section.panel {
  border: 3px solid rgba(17, 21, 28, .18);
  border-radius: 8px;
  outline: 0;
  background: #fffdf2;
  box-shadow: 0 16px 34px rgba(17, 21, 28, .14);
}

html[data-theme="taxi"] body[data-page="setting"] .my-page-section-title,
html[data-theme="taxi"] body[data-page="setting"] .setting-title,
html[data-theme="taxi"] body[data-page="setting"] .panel-title {
  background: #11151c;
  color: #ffd22e;
  border-color: #11151c;
  box-shadow: none;
  text-shadow: none;
}

html[data-theme="taxi"] body[data-page="setting"] .status-hero > div,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-logged-in,
html[data-theme="taxi"] body[data-page="setting"] .status-record-list li,
html[data-theme="taxi"] body[data-page="setting"] .status-bbs-row,
html[data-theme="taxi"] body[data-page="setting"] .point-passphrase-account-name {
  border: 2px solid rgba(17, 21, 28, .28);
  border-radius: 8px;
  background: #fffdf2;
  box-shadow: none;
}

@media (max-width: 640px) {
  html[data-theme] body[data-page="setting"] .setting-body .theme-switcher {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  html[data-theme] body[data-page="setting"] .setting-body .theme-switcher button {
    width: 100%;
    min-width: 0;
    padding-inline: 2px;
    font-size: clamp(7.5px, 2.35vw, 10.5px);
    white-space: nowrap;
  }
}

body[data-page="cards"],
body[data-page="setting"],
body.has-floating-card-folder {
  --card-folder-accent: #274f9e;
  --card-folder-accent-text: #fffdf0;
  --card-folder-surface: #fffdf0;
  --card-folder-text: #21386f;
  --card-folder-action: #e84b39;
  --card-folder-shell: #18245c;
  --card-folder-shell-2: #0b163f;
  --card-folder-shell-text: #fffdf0;
  --card-folder-shell-border: rgba(255, 255, 255, .34);
  --card-folder-page-surface: #fffdf0;
  --card-folder-page-surface-2: #e8f1ff;
  --card-folder-pocket-surface: rgba(255, 255, 255, .76);
  --card-folder-pocket-border: rgba(39, 79, 158, .24);
}

html[data-theme="modern"] body[data-page="cards"],
html[data-theme="modern"] body[data-page="setting"],
html[data-theme="modern"] body.has-floating-card-folder {
  --card-folder-accent: #23406f;
  --card-folder-accent-text: #f8fbff;
  --card-folder-surface: #f8fbff;
  --card-folder-text: #173052;
  --card-folder-action: #c91828;
  --card-folder-shell: #141820;
  --card-folder-shell-2: #242c3a;
  --card-folder-shell-text: #f8fbff;
  --card-folder-shell-border: rgba(216, 222, 232, .36);
  --card-folder-page-surface: #f8fafc;
  --card-folder-page-surface-2: #e8edf5;
  --card-folder-pocket-surface: rgba(255, 255, 255, .72);
  --card-folder-pocket-border: rgba(20, 24, 32, .12);
}

html[data-theme="elegant"] body[data-page="cards"],
html[data-theme="elegant"] body[data-page="setting"],
html[data-theme="elegant"] body.has-floating-card-folder {
  --card-folder-accent: #8d6a22;
  --card-folder-accent-text: #fffaf0;
  --card-folder-surface: #fffaf0;
  --card-folder-text: #3b2712;
  --card-folder-action: #9f1f35;
  --card-folder-shell: #231629;
  --card-folder-shell-2: #5a2848;
  --card-folder-shell-text: #fffaf4;
  --card-folder-shell-border: rgba(216, 183, 94, .52);
  --card-folder-page-surface: #fffaf4;
  --card-folder-page-surface-2: #efe3c7;
  --card-folder-pocket-surface: rgba(255, 250, 244, .74);
  --card-folder-pocket-border: rgba(216, 183, 94, .38);
}

html[data-theme="cute"] body[data-page="cards"],
html[data-theme="cute"] body[data-page="setting"],
html[data-theme="cute"] body.has-floating-card-folder {
  --card-folder-accent: #d45273;
  --card-folder-accent-text: #fff8fb;
  --card-folder-surface: #fff8fb;
  --card-folder-text: #62213a;
  --card-folder-action: #c91842;
  --card-folder-shell: #3b335c;
  --card-folder-shell-2: #ff7fb3;
  --card-folder-shell-text: #fff9fd;
  --card-folder-shell-border: rgba(255, 255, 255, .64);
  --card-folder-page-surface: #fff9fd;
  --card-folder-page-surface-2: #f2edff;
  --card-folder-pocket-surface: rgba(255, 255, 255, .78);
  --card-folder-pocket-border: rgba(255, 159, 200, .34);
}

html[data-theme="taxi"] body[data-page="cards"],
html[data-theme="taxi"] body[data-page="setting"],
html[data-theme="taxi"] body.has-floating-card-folder {
  --card-folder-accent: #111;
  --card-folder-accent-text: #f7bf28;
  --card-folder-surface: #fff;
  --card-folder-text: #161616;
  --card-folder-action: #c91828;
  --card-folder-shell: #11151c;
  --card-folder-shell-2: #302914;
  --card-folder-shell-text: #ffd22e;
  --card-folder-shell-border: rgba(255, 210, 46, .48);
  --card-folder-page-surface: #fffdf2;
  --card-folder-page-surface-2: #fff4bd;
  --card-folder-pocket-surface: rgba(255, 253, 242, .78);
  --card-folder-pocket-border: rgba(17, 21, 28, .2);
}

html[data-theme="mono"] body[data-page="cards"],
html[data-theme="mono"] body[data-page="setting"],
html[data-theme="mono"] body.has-floating-card-folder {
  --card-folder-accent: #101010;
  --card-folder-accent-text: #f7f7f7;
  --card-folder-surface: #f7f7f7;
  --card-folder-text: #101010;
  --card-folder-action: #555;
  --card-folder-shell: #101010;
  --card-folder-shell-2: #2d2d2d;
  --card-folder-shell-text: #f7f7f7;
  --card-folder-shell-border: rgba(255, 255, 255, .34);
  --card-folder-page-surface: #f7f7f7;
  --card-folder-page-surface-2: #dcdcdc;
  --card-folder-pocket-surface: rgba(255, 255, 255, .72);
  --card-folder-pocket-border: rgba(16, 16, 16, .18);
}

body[data-page="cards"] .content-inner {
  display: grid;
  gap: 18px;
}

.card-folder-page {
  display: grid;
  gap: 14px;
  max-width: 1040px;
  min-width: 0;
  color: var(--card-folder-text);
}

.card-folder-page-head {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
}

.card-folder-page-head p {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.75;
}

.card-folder-page-head h1 {
  margin: 0;
  font-size: clamp(24px, 4.6vw, 42px);
  line-height: 1;
  letter-spacing: 0;
}

.card-folder-page-head strong {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 3px solid var(--card-folder-accent);
  background: var(--card-folder-surface);
  color: var(--card-folder-text);
  font-size: 13px;
  line-height: 1;
}

.card-folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-folder-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 3px solid var(--card-folder-accent);
  background: var(--card-folder-surface);
  color: var(--card-folder-text);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.card-folder-tab.is-active {
  background: var(--card-folder-accent);
  color: var(--card-folder-accent-text);
}

.card-folder-shelf {
  display: grid;
  min-height: 0;
  border: 4px solid var(--card-folder-accent);
  background: color-mix(in srgb, var(--card-folder-surface) 86%, transparent);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.16);
}

.card-folder-shelf-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 3px solid var(--card-folder-accent);
  background: var(--card-folder-accent);
  color: var(--card-folder-accent-text);
}

.card-folder-shelf-head b {
  font-size: 14px;
  line-height: 1;
}

.card-folder-shelf-head span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.card-folder-scroll {
  max-height: min(76svh, 820px);
  overflow: auto;
  padding: 14px;
  scrollbar-width: none;
}

.card-folder-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.card-folder-grid {
  min-width: 0;
}

.card-folder-grid .status-card-note {
  border-color: var(--card-folder-accent);
  background: rgba(255, 255, 255, 0.7);
}

.card-folder-grid .status-card-group-title {
  background: var(--card-folder-accent);
  color: var(--card-folder-accent-text);
}

.card-folder-grid .status-card-grid-inner {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  justify-content: stretch;
}

.card-folder-grid .status-card-item {
  border-color: var(--card-folder-accent);
  background: var(--card-folder-surface);
  color: var(--card-folder-text);
}

body[data-page="cards"] .status-card-modal__stage {
  overflow: hidden;
}

@media (max-width: 920px) {
  .card-folder-grid .status-card-grid-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .card-folder-page-head,
  .card-folder-shelf-head {
    display: grid;
    align-items: start;
  }

  .card-folder-grid .status-card-grid-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body[data-page="cards"] .content-inner {
  min-height: 54svh;
}

.card-folder-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 4px solid var(--card-folder-accent);
  background: var(--card-folder-surface);
  color: var(--card-folder-text);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.18);
}

.card-folder-launch p,
.card-folder-binder-head p {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.72;
}

.card-folder-launch h1 {
  margin: 0;
  font-size: clamp(24px, 4.6vw, 42px);
  line-height: 1;
  letter-spacing: 0;
}

.card-folder-launch span {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.card-folder-launch button {
  min-height: 44px;
  padding: 0 18px;
  border: 3px solid var(--card-folder-accent);
  background: var(--card-folder-action);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.floating-card-folder {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 170;
  pointer-events: none;
  animation: floatingCardFolderIdle 5.2s ease-in-out infinite;
  will-change: transform;
}

.floating-card-folder.is-positioning,
.floating-card-folder.is-dragging {
  animation: none;
  transform: none;
}

.floating-card-folder[hidden] {
  display: none;
}

body.has-floating-card-folder.is-card-folder-open .floating-card-folder {
  z-index: 9000;
}

.floating-card-folder-button {
  --floating-card-folder-closed-shift-x: 16px;
  --floating-card-folder-closed-shift-y: 7px;
  appearance: none;
  display: grid;
  width: 142px;
  height: 108px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--card-folder-shell-text);
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: none;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}

.floating-card-folder-icon {
  grid-area: 1 / 1;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter:
    drop-shadow(0 5px 6px rgba(0, 0, 0, .28))
    drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
  pointer-events: none;
  transition: opacity .2s ease, transform .24s ease;
}

@keyframes floatingCardFolderIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.floating-card-folder-icon.is-closed {
  width: 68px;
  height: 86px;
  background-image: url("/assets/binder-closed.webp?v=20260710-binder-light-1");
  opacity: 1;
  transform: translate(var(--floating-card-folder-closed-shift-x), var(--floating-card-folder-closed-shift-y)) rotate(-4deg) scale(1);
}

.floating-card-folder-icon.is-open {
  width: 132px;
  height: 94px;
  background-image: url("/assets/binder-open.webp?v=20260710-binder-light-1");
  opacity: 0;
  transform: rotate(-4deg) scale(.84);
}

body.has-floating-card-folder.is-card-folder-open .floating-card-folder-icon.is-closed {
  opacity: 0;
  transform: translate(var(--floating-card-folder-closed-shift-x), var(--floating-card-folder-closed-shift-y)) rotate(-4deg) scale(.84);
}

body.has-floating-card-folder.is-card-folder-open .floating-card-folder-icon.is-open {
  opacity: 1;
  transform: rotate(-4deg) scale(1);
}

.floating-card-folder-button:hover,
.floating-card-folder-button:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.floating-card-folder-button:focus-visible {
  outline: none;
}

.floating-card-folder-button:active {
  transform: translateY(1px) scale(.96);
}

.floating-card-folder.is-dragging .floating-card-folder-button {
  cursor: pointer;
  transform: none;
  transition: none;
}

@media (max-width: 640px) {
  .floating-card-folder {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .floating-card-folder-button {
    --floating-card-folder-closed-shift-x: 14px;
    --floating-card-folder-closed-shift-y: 6px;
    width: 132px;
    height: 100px;
    padding: 0;
    border-radius: 0;
  }

  .floating-card-folder-icon.is-closed {
    width: 64px;
    height: 81px;
  }

  .floating-card-folder-icon.is-open {
    width: 124px;
    height: 88px;
  }
}

.card-folder-binder-modal {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--card-folder-accent) 26%, transparent), transparent 34%),
    linear-gradient(color-mix(in srgb, var(--card-folder-shell) 78%, transparent), color-mix(in srgb, var(--card-folder-shell-2) 84%, transparent));
  overflow: hidden;
  backdrop-filter: blur(7px);
}

.card-folder-binder-modal[data-floating-card-folder-modal] {
  --card-folder-accent: #a88b69;
  --card-folder-accent-text: #fffaf1;
  --card-folder-surface: rgba(244, 236, 224, .78);
  --card-folder-text: #332c27;
  --card-folder-action: #8f5945;
  --card-folder-shell: #302e2d;
  --card-folder-shell-2: #18191a;
  --card-folder-shell-text: #f3f0eb;
  --card-folder-shell-border: rgba(218, 198, 174, .3);
  --card-folder-page-surface: rgba(246, 243, 238, .72);
  --card-folder-page-surface-2: rgba(203, 199, 191, .62);
  --card-folder-pocket-surface: rgba(255, 255, 255, .38);
  --card-folder-pocket-border: rgba(98, 86, 73, .18);
  background: transparent;
  backdrop-filter: none;
}

body.is-card-folder-open {
  overflow: hidden;
}

.card-folder-binder-modal[hidden] {
  display: none;
}

.card-folder-binder-window {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(8px, 1.2vw, 12px);
  width: min(1080px, calc(100vw - 24px));
  max-height: calc(100dvh - 28px);
  padding: clamp(12px, 1.8vw, 20px);
  border: 1px solid var(--card-folder-shell-border);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--card-folder-shell) 96%, #fff), var(--card-folder-shell-2));
  color: var(--card-folder-shell-text);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 color-mix(in srgb, var(--card-folder-shell-border) 68%, transparent);
  overflow: hidden;
}

.card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-binder-window {
  --floating-card-folder-x: 0px;
  --floating-card-folder-y: 0px;
  width: min(736px, 80vw);
  max-height: 80dvh;
  border-color: var(--card-folder-shell-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), transparent 30%),
    linear-gradient(180deg, rgba(47, 45, 44, .64), rgba(18, 19, 20, .76));
  box-shadow:
    0 24px 60px rgba(12, 12, 12, .28),
    inset 0 1px 0 rgba(255, 245, 228, .18);
  backdrop-filter: blur(22px) saturate(.96);
  -webkit-backdrop-filter: blur(22px) saturate(.96);
  transform-origin: center;
  will-change: transform, opacity, filter;
}

.card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-spread {
  height: min(37dvh, 376px);
  border-color: rgba(255, 248, 237, .34);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .16), transparent 9%),
    linear-gradient(180deg, rgba(248, 246, 241, .72), rgba(207, 202, 194, .64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .58),
    inset 16px 0 24px rgba(66, 53, 41, .08),
    0 14px 28px rgba(16, 13, 11, .18);
  backdrop-filter: blur(12px) saturate(.9);
  -webkit-backdrop-filter: blur(12px) saturate(.9);
}

.card-folder-binder-modal[data-floating-card-folder-modal].is-preparing-open .card-folder-binder-window {
  opacity: 0;
  filter: blur(3px);
  transform: translate(var(--floating-card-folder-x), var(--floating-card-folder-y)) scale(.08);
}

.card-folder-binder-modal[data-floating-card-folder-modal].is-opening .card-folder-binder-window {
  animation: floatingCardFolderOpen .5s cubic-bezier(.18, .82, .24, 1) both;
}

.card-folder-binder-modal[data-floating-card-folder-modal].is-closing .card-folder-binder-window {
  animation: floatingCardFolderClose .42s cubic-bezier(.56, 0, .82, .24) both;
}

@keyframes floatingCardFolderOpen {
  0% {
    opacity: 0;
    filter: blur(3px);
    transform: translate(var(--floating-card-folder-x), var(--floating-card-folder-y)) scale(.08);
  }
  72% {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) scale(1.025);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) scale(1);
  }
}

@keyframes floatingCardFolderClose {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) scale(1);
  }
  22% {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) scale(1.012);
  }
  100% {
    opacity: 0;
    filter: blur(3px);
    transform: translate(var(--floating-card-folder-x), var(--floating-card-folder-y)) scale(.08);
  }
}

@media (max-width: 440px) {
  .card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-binder-window {
    width: 80vw;
    max-height: 80dvh;
  }

  .card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-spread {
    height: min(35dvh, 288px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-card-folder {
    animation: none;
  }

  .floating-card-folder-button {
    transition: none;
  }

  .card-folder-binder-modal[data-floating-card-folder-modal] .card-folder-binder-window {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.card-folder-binder-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--card-folder-shell-text);
  font: inherit;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.card-folder-binder-close::before,
.card-folder-binder-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.card-folder-binder-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.card-folder-binder-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.card-folder-binder-close:hover,
.card-folder-binder-close:focus-visible {
  background: var(--card-folder-action);
}

.card-folder-binder-head,
.card-folder-binder-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 52px 0 4px;
  color: var(--card-folder-shell-text);
}

.card-folder-page-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.card-folder-page-controls button {
  min-width: 76px;
  max-width: 42vw;
  padding: 7px 10px;
  border: 1px solid rgba(114, 85, 38, .72);
  border-radius: 999px;
  background: rgba(255, 250, 229, .88);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.card-folder-page-controls button:disabled {
  opacity: .42;
  cursor: default;
}

.card-folder-binder-head h2 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 0.95;
  letter-spacing: 0;
}

.card-folder-binder-head strong,
.card-folder-binder-foot span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: color-mix(in srgb, var(--card-folder-shell-text) 86%, transparent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.card-folder-binder-head p {
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--card-folder-accent) 60%, #fff);
  letter-spacing: 0;
  opacity: 1;
}

.card-folder-binder-window .card-folder-tabs {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  width: 100%;
  max-width: calc(100% - 14px);
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.card-folder-binder-window .card-folder-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.card-folder-binder-window .card-folder-tab {
  min-width: 0;
  min-height: 27px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--card-folder-shell-text) 72%, transparent);
  font-size: clamp(8px, 1.45vw, 10px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.card-folder-binder-window .card-folder-tab.is-active {
  background: color-mix(in srgb, var(--card-folder-accent) 86%, #fff);
  color: var(--card-folder-accent-text);
  box-shadow: 0 5px 15px color-mix(in srgb, var(--card-folder-accent) 26%, transparent);
}

.card-folder-binder-window .card-folder-tab:hover,
.card-folder-binder-window .card-folder-tab:focus-visible {
  color: var(--card-folder-shell-text);
  transform: translateY(-1px);
}

.card-folder-book {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  min-height: 0;
}

.card-folder-spread {
  position: relative;
  display: grid;
  min-height: 0;
  height: min(62dvh, 570px);
  padding: clamp(10px, 1.8vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 9%),
    linear-gradient(180deg, color-mix(in srgb, var(--card-folder-page-surface) 96%, #fff), color-mix(in srgb, var(--card-folder-page-surface-2) 94%, #fff));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 16px 0 24px rgba(19, 24, 30, 0.12),
    0 16px 34px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.card-folder-spread::before {
  content: none;
}

.card-folder-spread::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.38), transparent 24% 74%, rgba(255, 255, 255, 0.26));
  opacity: 0.42;
  pointer-events: none;
}

.card-folder-scroll-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  max-width: min(86%, 340px);
  padding: 10px 13px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(16, 19, 26, 0.82);
  color: #fff;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.card-folder-scroll-hint[hidden] {
  display: none;
}

.card-folder-scroll-hint.is-visible {
  animation: card-folder-hint-auto-dismiss 5.2s ease forwards;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-folder-scroll-hint__gesture {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 34px;
  place-items: center;
}

.card-folder-scroll-hint__track {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76), transparent);
}

.card-folder-scroll-hint__finger {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 11px 11px 8px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 235, 244, 0.86));
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
  animation: card-folder-hint-swipe 1.6s ease-in-out infinite;
}

.card-folder-scroll-hint__finger::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(17, 22, 30, 0.42);
  transform: translateX(-50%);
}

.card-folder-scroll-hint__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.card-folder-scroll-hint__text b {
  font-size: clamp(11px, 2.7vw, 13px);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.card-folder-scroll-hint__text small {
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(9px, 2.2vw, 11px);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

@keyframes card-folder-hint-swipe {
  0%,
  100% {
    transform: translateX(-10px) rotate(-5deg);
  }
  50% {
    transform: translateX(10px) rotate(5deg);
  }
}

@keyframes card-folder-hint-auto-dismiss {
  0%,
  78% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-folder-scroll-hint__finger {
    animation: none;
  }
}

.card-folder-binder-window .card-folder-grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.card-folder-binder-window .card-folder-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.card-folder-spread-sheet {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 1.3vw, 14px);
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  scroll-snap-align: start;
}

.card-folder-pocket {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(3px, 0.8vw, 6px) !important;
  align-content: start;
  min-height: 0;
  padding: clamp(4px, 1vw, 8px) !important;
  border: 1px solid var(--card-folder-pocket-border) !important;
  border-radius: 18px;
  background:
    linear-gradient(145deg, var(--card-folder-pocket-surface), color-mix(in srgb, var(--card-folder-page-surface) 28%, transparent)) !important;
  color: #121721 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.36),
    0 9px 18px rgba(26, 32, 38, 0.16);
  overflow: hidden;
}

.card-folder-pocket::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.34), transparent 42%);
  pointer-events: none;
}

.card-folder-pocket:hover,
.card-folder-pocket:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 13px 24px rgba(26, 32, 38, 0.2);
}

.card-folder-pocket.is-empty {
  display: block;
  min-height: 0;
  border: 1px dashed rgba(43, 55, 68, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.26);
}

.card-folder-pocket.is-favorite-empty {
  display: grid !important;
  place-items: center;
  padding: 0 !important;
  border-color: color-mix(in srgb, var(--card-folder-accent) 42%, rgba(43, 55, 68, 0.22)) !important;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--card-folder-accent) 12%, transparent), transparent 56%),
    rgba(255, 255, 255, 0.22) !important;
  cursor: pointer;
}

.card-folder-pocket.is-favorite-empty:hover,
.card-folder-pocket.is-favorite-empty:focus-visible {
  border-style: solid !important;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--card-folder-accent) 24%, transparent), transparent 60%),
    rgba(255, 255, 255, 0.34) !important;
}

.card-folder-favorite-plus {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(38px, 8vw, 58px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--card-folder-accent) 58%, #fff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-folder-accent) 18%, rgba(255, 255, 255, 0.72));
  box-shadow:
    0 7px 18px rgba(26, 32, 38, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.card-folder-favorite-plus::before,
.card-folder-favorite-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-folder-action) 78%, #352b25);
  transform: translate(-50%, -50%);
}

.card-folder-favorite-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.card-folder-pocket.is-favorite-card {
  touch-action: pan-x pan-y;
  -webkit-touch-callout: none;
  user-select: none;
}

.card-folder-pocket.is-picker-card {
  cursor: pointer;
}

.card-folder-pocket.is-picker-card:disabled {
  cursor: default;
  filter: grayscale(.45);
  opacity: .62;
}

.card-folder-picker-badge {
  position: absolute;
  z-index: 3;
  right: 7px;
  top: 7px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-folder-action) 86%, #211b19);
  color: #fff;
  font-size: clamp(7px, 1.45vw, 9px);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
  pointer-events: none;
}

.card-folder-pocket.is-already-favorite .card-folder-picker-badge {
  background: rgba(38, 40, 43, .82);
}

.card-folder-pocket .status-card-copy {
  position: relative;
  z-index: 1;
  display: grid !important;
  gap: 2px;
  padding: 0 2px 2px;
  min-width: 0;
}

.card-folder-pocket .status-card-copy span {
  display: none;
}

.card-folder-pocket .status-card-copy b {
  overflow: hidden;
  color: #151a22;
  font-size: clamp(7px, 1.35vw, 11px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-folder-pocket .status-card-grid-inner .status-card-item small,
.card-folder-pocket small {
  color: rgba(21, 26, 34, 0.62);
  font-size: clamp(7px, 1.25vw, 10px);
  line-height: 1;
}

.card-folder-binder-window .status-card-grid-inner .status-card-item img,
.card-folder-binder-window .status-card-thumb,
.card-folder-pocket img {
  display: block !important;
  align-self: center;
  justify-self: center;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  aspect-ratio: 9 / 13;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  object-fit: contain;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.card-folder-pocket .status-card-image-retry {
  position: relative;
  z-index: 4;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .card-folder-binder-window {
    padding: 10px;
    border-radius: 24px;
  }

  .card-folder-spread {
    height: min(58dvh, 500px);
  }

  .card-folder-binder-head,
  .card-folder-binder-foot {
    display: grid;
    padding-right: 52px;
  }
}

@media (max-width: 440px) {
  .card-folder-binder-window {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 22px;
  }

  .card-folder-spread {
    height: min(54dvh, 430px);
    border-radius: 20px;
    padding-right: 8px;
  }

  .card-folder-scroll-hint {
    gap: 7px;
    padding: 8px 10px;
  }

  .card-folder-binder-window .card-folder-tab {
    min-height: 25px;
    padding: 0 4px;
    font-size: clamp(8px, 2.2vw, 9px);
  }
}

body[data-page="setting"] .status-card-note,
body[data-page="status"] .status-card-note {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.status-card-group {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

.status-card-group-title {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 2px solid currentColor;
  background: var(--my-page-accent, #111);
  color: var(--my-page-accent-text, #fff);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.status-card-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 136px));
  gap: 12px;
  align-items: start;
  justify-content: start;
  min-width: 0;
}

.status-card-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.status-card-grid-inner .status-card-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-content: start;
  min-width: 0;
  min-height: 0;
  padding: 7px;
}

.status-card-button:hover,
.status-card-button:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.16);
}

.status-card-button:focus-visible {
  outline: 3px solid var(--my-page-action, #c91828);
  outline-offset: 2px;
}

.status-card-art {
  display: grid !important;
  width: 100%;
  aspect-ratio: 9 / 13;
  place-items: center;
  margin: 0 !important;
  border: 2px solid currentColor;
  background: repeating-linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.05) 0 7px,
    rgba(255, 255, 255, 0.72) 7px 14px
  );
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1.1 !important;
  text-align: center;
}

.status-card-grid-inner .status-card-item img,
.status-card-thumb {
  display: grid !important;
  width: 100%;
  aspect-ratio: 9 / 13;
  place-items: center;
  margin: 0 !important;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  object-fit: contain;
  overflow: hidden;
}

.status-card-thumb.is-loading {
  background: repeating-linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.05) 0 8px,
    rgba(255, 255, 255, 0.8) 8px 16px
  );
}

.status-card-thumb > span {
  margin: 0 !important;
  padding: 6px;
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1.2 !important;
  text-align: center;
}

.status-card-thumb-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.status-card-copy {
  margin: 0 !important;
}

.status-card-grid-inner .status-card-copy {
  display: grid !important;
  gap: 3px;
  min-width: 0;
}

.status-card-grid-inner .status-card-item b,
.status-card-grid-inner .status-card-item span,
.status-card-grid-inner .status-card-item small {
  margin: 0;
}

.status-card-grid-inner .status-card-item b {
  font-size: 12px;
}

.status-card-grid-inner .status-card-item small {
  font-size: 9px;
}

.status-card-modal {
  --status-card-preview-accent: #a88b69;
  --status-card-preview-text: #f3f0eb;
  --status-card-preview-paper: #f5f2ec;
  --status-card-preview-ink: #332f2c;
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(12, 13, 14, .3);
  backdrop-filter: blur(8px) saturate(.9);
  -webkit-backdrop-filter: blur(8px) saturate(.9);
}

.status-card-modal[hidden] {
  display: none;
}

.status-card-modal__window {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  width: min(100%, 440px);
  max-height: min(92svh, 760px);
  padding: 18px;
  border: 1px solid rgba(218, 198, 174, .34);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), transparent 30%),
    linear-gradient(180deg, rgba(47, 45, 44, .68), rgba(18, 19, 20, .8));
  color: var(--status-card-preview-text);
  box-shadow:
    0 28px 70px rgba(8, 9, 10, .38),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  backdrop-filter: blur(22px) saturate(.96);
  -webkit-backdrop-filter: blur(22px) saturate(.96);
  overflow: hidden;
}

.status-card-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--status-card-preview-text);
  font: inherit;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
  transition: background-color .16s ease, transform .16s ease;
}

.status-card-modal__close:hover,
.status-card-modal__close:focus-visible {
  background: rgba(168, 139, 105, .72);
  transform: translateY(-1px);
}

.status-card-modal__head {
  display: grid;
  gap: 5px;
  padding: 2px 48px 0 2px;
}

.status-card-modal__head b {
  color: var(--status-card-preview-text);
  font-size: 18px;
  line-height: 1.15;
}

.status-card-modal__head span {
  color: color-mix(in srgb, var(--status-card-preview-text) 76%, transparent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 1;
}

.status-card-modal__stage {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .2), transparent 30%),
    linear-gradient(180deg, rgba(248, 246, 241, .78), rgba(207, 202, 194, .68));
  color: var(--status-card-preview-ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .62),
    0 14px 30px rgba(8, 9, 10, .18);
  backdrop-filter: blur(12px) saturate(.9);
  -webkit-backdrop-filter: blur(12px) saturate(.9);
}

.status-card-preview-image,
.status-card-preview-canvas {
  display: block;
  width: min(100%, 330px);
  height: auto;
  max-height: 66svh;
  border-radius: 16px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(24, 20, 17, .2));
}

.status-card-preview-image {
  pointer-events: auto;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
  -webkit-user-drag: auto;
}

.status-card-modal__note {
  min-height: 1.35em;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  color: color-mix(in srgb, var(--status-card-preview-text) 74%, transparent);
  opacity: 1;
}

.status-card-modal__note:empty {
  display: none;
}

.status-card-modal__download {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 244, 226, .3);
  border-radius: 14px;
  background: rgba(168, 139, 105, .74);
  color: #fffaf1 !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow:
    0 10px 22px rgba(8, 9, 10, .18),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: background-color .16s ease, transform .16s ease;
}

.status-card-modal__download:link,
.status-card-modal__download:visited {
  color: #fffaf1 !important;
}

.status-card-modal__download:hover,
.status-card-modal__download:focus-visible {
  background: rgba(183, 153, 116, .9);
  transform: translateY(-1px);
}

.status-card-modal__download[hidden] {
  display: none;
}

@media (max-width: 460px) {
  .status-card-grid-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-card-modal__window {
    padding: 14px;
    border-radius: 24px;
  }

  .status-card-modal__stage {
    padding: 8px;
    border-radius: 18px;
  }

  .status-card-preview-image,
  .status-card-preview-canvas {
    width: min(100%, 300px);
  }
}

/* TAXI theme: operational buttons must keep full rectangular hit/paint area. */
html[data-theme="taxi"] :is(
  .pixel-button,
  .mini-button,
  .district-tabs button,
  .slot-tabs button,
  .icon-picker button,
  .character-option,
  .sticker-option,
  .thread-view-option,
  .game-rank-page-button,
  .message-reaction-button,
  .bbs-new-thread-button
) {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  mask: none !important;
  -webkit-mask: none !important;
  overflow: visible !important;
}

html[data-theme="taxi"] :is(
  .pixel-button,
  .mini-button,
  .district-tabs button,
  .slot-tabs button,
  .icon-picker button,
  .character-option,
  .sticker-option,
  .thread-view-option,
  .game-rank-page-button,
  .message-reaction-button,
  .bbs-new-thread-button
)::before,
html[data-theme="taxi"] :is(
  .pixel-button,
  .mini-button,
  .district-tabs button,
  .slot-tabs button,
  .icon-picker button,
  .character-option,
  .sticker-option,
  .thread-view-option,
  .game-rank-page-button,
  .message-reaction-button,
  .bbs-new-thread-button
)::after {
  clip-path: none !important;
  -webkit-clip-path: none !important;
  mask: none !important;
  -webkit-mask: none !important;
}

/* Thread-owner reactions: keep controls clean, inside the message frame. */
.message.has-message-controls {
  position: relative;
  min-width: min(100%, 280px);
  min-height: 118px;
  padding-top: 42px !important;
  padding-right: 46px !important;
  padding-bottom: 70px !important;
}

.message.has-message-controls.has-owner-stamp,
.message.has-message-controls.has-admin-stamp {
  padding-bottom: 128px !important;
}

.message.has-message-controls .message-delete-x {
  top: 10px !important;
  right: 10px !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
}

.message-reaction-actions,
.message-list.is-chat-list .message-reaction-actions {
  right: 12px !important;
  bottom: 12px !important;
  gap: 8px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.message.has-owner-stamp .message-reaction-actions,
.message.has-admin-stamp .message-reaction-actions,
.message-list.is-chat-list .message.has-owner-stamp .message-reaction-actions,
.message-list.is-chat-list .message.has-admin-stamp .message-reaction-actions {
  bottom: 82px !important;
}

.message-like-stamp,
.message-owner-stamp,
.message-list.is-chat-list .message-like-stamp,
.message-list.is-chat-list .message-owner-stamp {
  position: absolute !important;
  right: 12px !important;
  bottom: 10px !important;
  height: 62px !important;
  max-width: min(52%, 190px) !important;
  margin: 0 !important;
  transform: rotate(-8deg);
}

.message-owner-stamp.is-nantekottai {
  transform: rotate(-5deg);
}

.message-list.is-chat-list .message.has-message-controls,
.message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls {
  min-width: min(82%, 300px);
  min-height: 128px;
  padding-top: 42px !important;
  padding-right: 46px !important;
  padding-bottom: 70px !important;
}

.message-list.is-chat-list .message.has-message-controls.has-owner-stamp,
.message-list.is-chat-list .message.has-message-controls.has-admin-stamp,
.message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls.has-owner-stamp,
.message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls.has-admin-stamp {
  padding-bottom: 128px !important;
}

@media (max-width: 640px) {
  .message.has-message-controls,
  .message-list.is-chat-list .message.has-message-controls,
  .message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls {
    min-width: min(100%, 236px);
    min-height: 112px;
    padding-top: 39px !important;
    padding-right: 38px !important;
    padding-bottom: 64px !important;
  }

  .message.has-message-controls.has-owner-stamp,
  .message.has-message-controls.has-admin-stamp,
  .message-list.is-chat-list .message.has-message-controls.has-owner-stamp,
  .message-list.is-chat-list .message.has-message-controls.has-admin-stamp {
    padding-bottom: 112px !important;
  }

  .message-reaction-actions,
  .message-list.is-chat-list .message-reaction-actions {
    right: 9px !important;
    bottom: 9px !important;
    gap: 6px;
  }

  .message.has-owner-stamp .message-reaction-actions,
  .message.has-admin-stamp .message-reaction-actions,
  .message-list.is-chat-list .message.has-owner-stamp .message-reaction-actions,
  .message-list.is-chat-list .message.has-admin-stamp .message-reaction-actions {
    bottom: 67px !important;
  }

  .message-like-stamp,
  .message-owner-stamp,
  .message-list.is-chat-list .message-like-stamp,
  .message-list.is-chat-list .message-owner-stamp {
    right: 9px !important;
    bottom: 8px !important;
    height: 50px !important;
    max-width: min(58%, 142px) !important;
  }
}

/* When a thread-owner stamp is present, keep reaction buttons below the stamp. */
.message.has-message-controls.has-owner-stamp,
.message.has-message-controls.has-admin-stamp {
  padding-bottom: 128px !important;
}

.message.has-owner-stamp .message-reaction-actions,
.message.has-admin-stamp .message-reaction-actions,
.message-list.is-chat-list .message.has-owner-stamp .message-reaction-actions,
.message-list.is-chat-list .message.has-admin-stamp .message-reaction-actions {
  bottom: 12px !important;
}

.message.has-owner-stamp .message-like-stamp,
.message.has-owner-stamp .message-owner-stamp,
.message.has-admin-stamp .message-like-stamp,
.message.has-admin-stamp .message-owner-stamp,
.message-list.is-chat-list .message.has-owner-stamp .message-like-stamp,
.message-list.is-chat-list .message.has-owner-stamp .message-owner-stamp,
.message-list.is-chat-list .message.has-admin-stamp .message-like-stamp,
.message-list.is-chat-list .message.has-admin-stamp .message-owner-stamp {
  bottom: 54px !important;
}

@media (max-width: 640px) {
  .message.has-message-controls.has-owner-stamp,
  .message.has-message-controls.has-admin-stamp,
  .message-list.is-chat-list .message.has-owner-stamp,
  .message-list.is-chat-list .message.has-admin-stamp {
    padding-bottom: 112px !important;
  }

  .message.has-owner-stamp .message-reaction-actions,
  .message.has-admin-stamp .message-reaction-actions,
  .message-list.is-chat-list .message.has-owner-stamp .message-reaction-actions,
  .message-list.is-chat-list .message.has-admin-stamp .message-reaction-actions {
    bottom: 9px !important;
  }

  .message.has-owner-stamp .message-like-stamp,
  .message.has-owner-stamp .message-owner-stamp,
  .message.has-admin-stamp .message-like-stamp,
  .message.has-admin-stamp .message-owner-stamp,
  .message-list.is-chat-list .message.has-owner-stamp .message-like-stamp,
  .message-list.is-chat-list .message.has-owner-stamp .message-owner-stamp,
  .message-list.is-chat-list .message.has-admin-stamp .message-like-stamp,
  .message-list.is-chat-list .message.has-admin-stamp .message-owner-stamp {
    bottom: 49px !important;
  }
}

/* Public viewers should not reserve action-button space. */
.message.has-owner-stamp:not(.has-message-controls),
.message.has-admin-stamp:not(.has-message-controls),
.message-list.is-chat-list .message.has-owner-stamp:not(.has-message-controls),
.message-list.is-chat-list .message.has-admin-stamp:not(.has-message-controls) {
  min-height: 0 !important;
  min-width: 0 !important;
  padding-top: 12px !important;
  padding-right: 12px !important;
  padding-bottom: 12px !important;
}

.message.has-owner-stamp:not(.has-message-controls) .message-like-stamp,
.message.has-owner-stamp:not(.has-message-controls) .message-owner-stamp,
.message.has-admin-stamp:not(.has-message-controls) .message-like-stamp,
.message.has-admin-stamp:not(.has-message-controls) .message-owner-stamp,
.message-list.is-chat-list .message.has-owner-stamp:not(.has-message-controls) .message-like-stamp,
.message-list.is-chat-list .message.has-owner-stamp:not(.has-message-controls) .message-owner-stamp,
.message-list.is-chat-list .message.has-admin-stamp:not(.has-message-controls) .message-like-stamp,
.message-list.is-chat-list .message.has-admin-stamp:not(.has-message-controls) .message-owner-stamp {
  right: 8px !important;
  bottom: 5px !important;
  height: 44px !important;
  max-width: min(38%, 128px) !important;
}

.message.has-owner-stamp:not(.has-message-controls) .message-body,
.message.has-admin-stamp:not(.has-message-controls) .message-body {
  padding-right: min(38%, 132px);
}

@media (max-width: 640px) {
  .message.has-owner-stamp:not(.has-message-controls),
  .message.has-admin-stamp:not(.has-message-controls),
  .message-list.is-chat-list .message.has-owner-stamp:not(.has-message-controls),
  .message-list.is-chat-list .message.has-admin-stamp:not(.has-message-controls) {
    padding-top: 10px !important;
    padding-right: 10px !important;
    padding-bottom: 10px !important;
  }

  .message.has-owner-stamp:not(.has-message-controls) .message-like-stamp,
  .message.has-owner-stamp:not(.has-message-controls) .message-owner-stamp,
  .message.has-admin-stamp:not(.has-message-controls) .message-like-stamp,
  .message.has-admin-stamp:not(.has-message-controls) .message-owner-stamp,
  .message-list.is-chat-list .message.has-owner-stamp:not(.has-message-controls) .message-like-stamp,
  .message-list.is-chat-list .message.has-owner-stamp:not(.has-message-controls) .message-owner-stamp,
  .message-list.is-chat-list .message.has-admin-stamp:not(.has-message-controls) .message-like-stamp,
  .message-list.is-chat-list .message.has-admin-stamp:not(.has-message-controls) .message-owner-stamp {
    right: 7px !important;
    bottom: 4px !important;
    height: 36px !important;
    max-width: min(42%, 104px) !important;
  }

  .message.has-owner-stamp:not(.has-message-controls) .message-body,
  .message.has-admin-stamp:not(.has-message-controls) .message-body {
    padding-right: min(42%, 108px);
  }

  .message.has-reply-action.has-owner-stamp:not(.has-message-controls),
  .message.has-reply-action.has-admin-stamp:not(.has-message-controls) {
    min-height: 88px;
    padding-bottom: 60px !important;
  }

  .message.has-reply-action.has-owner-stamp:not(.has-message-controls) .message-body,
  .message.has-reply-action.has-admin-stamp:not(.has-message-controls) .message-body {
    padding-right: min(44%, 100px);
  }
}

/* Personal news: one shared feature for MY PAGE history and per-person popups. */
.personal-news-list,
.personal-news-popup-list {
  list-style: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.personal-news-list {
  display: grid;
  gap: 8px;
}

.personal-news-item,
body[data-page="setting"] .personal-news-item {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.personal-news-item > a,
.personal-news-item > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.personal-news-item b,
.personal-news-item span,
.personal-news-item small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.personal-news-item b {
  line-height: 1.25;
}

.personal-news-kicker {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  border: 2px solid currentColor;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .03em;
}

.personal-news-actions,
.personal-news-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.personal-news-actions button,
.personal-news-popup-actions button {
  min-height: 38px;
  min-width: 0;
  padding: 0 14px;
  border: 2px solid var(--my-page-accent, #111);
  background: var(--my-page-action, #c91828);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
  cursor: pointer;
}

body[data-page="setting"] .personal-news-actions button {
  border-color: var(--my-page-accent);
  background: var(--my-page-action);
  color: var(--my-page-accent-text);
  box-shadow: none;
}

html[data-theme="taxi"] body[data-page="setting"] .personal-news-actions button {
  background: #ffd22e;
  color: #11151c;
}

.personal-news-modal {
  --personal-news-accent: #111;
  --personal-news-accent-text: #fff;
  --personal-news-surface: #fff;
  --personal-news-text: #111;
  --personal-news-action: #c91828;
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--personal-news-text);
}

.personal-news-modal[hidden] {
  display: none;
}

.personal-news-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .48);
}

.personal-news-window {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, calc(100vw - 28px));
  max-height: min(82vh, 720px);
  min-width: 0;
  overflow: hidden;
  border: 4px solid var(--personal-news-accent);
  background: var(--personal-news-surface);
  color: var(--personal-news-text);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .28);
  animation: personal-news-pop .22s cubic-bezier(.2, 1.35, .35, 1);
}

.personal-news-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid var(--personal-news-accent);
  background: var(--personal-news-surface);
  color: var(--personal-news-text);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.personal-news-head {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 16px 54px 13px 16px;
  border-bottom: 4px solid var(--personal-news-accent);
  background: var(--personal-news-accent);
  color: var(--personal-news-accent-text);
}

.personal-news-head span,
.personal-news-head h2,
.personal-news-head p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.personal-news-head span {
  font-size: 11px;
  letter-spacing: .08em;
}

.personal-news-head h2 {
  font-size: clamp(19px, 4.7vw, 30px);
  line-height: 1.05;
}

.personal-news-head p {
  font-size: 12px;
  opacity: .86;
}

.personal-news-popup-list {
  display: grid;
  gap: 9px;
  min-height: 0;
  max-height: min(54vh, 430px);
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.personal-news-popup-list::-webkit-scrollbar {
  display: none;
}

.personal-news-popup-list .personal-news-item,
.personal-news-popup-list .personal-news-item > a,
.personal-news-popup-list .personal-news-item > div {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  white-space: normal;
}

.personal-news-popup-list .personal-news-item b,
.personal-news-popup-list .personal-news-item span,
.personal-news-popup-list .personal-news-item small {
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.35;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: clip;
  white-space: normal;
}

.personal-news-popup-list .personal-news-item small {
  line-height: 1.45;
}

.personal-news-popup-list .personal-news-item,
body[data-page="setting"] .personal-news-popup-list .personal-news-item {
  padding: 10px 11px;
  border: 2px solid var(--personal-news-accent);
  background: color-mix(in srgb, var(--personal-news-surface) 92%, #fff);
}

.personal-news-popup-list .personal-news-kicker {
  color: var(--personal-news-action);
}

.personal-news-popup-actions {
  min-width: 0;
  margin: 0;
  padding: 0 12px 12px;
}

.personal-news-popup-actions button {
  width: 100%;
  border-color: var(--personal-news-accent);
  background: var(--personal-news-action);
  color: #fff;
}

.personal-news-item.is-game .personal-news-kicker {
  color: #146c43;
}

.personal-news-item.is-reaction .personal-news-kicker {
  color: #c91842;
}

.personal-news-item.is-system .personal-news-kicker {
  color: var(--personal-news-action, var(--my-page-action, #c91828));
}

html[data-theme="retro"] .personal-news-modal {
  --personal-news-accent: #274f9e;
  --personal-news-accent-text: #fff;
  --personal-news-surface: #fffdf0;
  --personal-news-text: #21386f;
  --personal-news-action: #e84b39;
}

html[data-theme="modern"] .personal-news-modal {
  --personal-news-accent: #23406f;
  --personal-news-accent-text: #f8fbff;
  --personal-news-surface: #f8fbff;
  --personal-news-text: #173052;
  --personal-news-action: #c91828;
}

html[data-theme="elegant"] .personal-news-modal {
  --personal-news-accent: #5a2848;
  --personal-news-accent-text: #fffaf4;
  --personal-news-surface: #fffaf4;
  --personal-news-text: #231629;
  --personal-news-action: #8d6a22;
}

html[data-theme="cute"] .personal-news-modal {
  --personal-news-accent: #ff7fb3;
  --personal-news-accent-text: #3b335c;
  --personal-news-surface: #fff9fd;
  --personal-news-text: #3b335c;
  --personal-news-action: #d45273;
}

html[data-theme="taxi"] .personal-news-modal {
  --personal-news-accent: #11151c;
  --personal-news-accent-text: #ffd22e;
  --personal-news-surface: #fffdf2;
  --personal-news-text: #11151c;
  --personal-news-action: #c91828;
}

html[data-theme="taxi"] .personal-news-window,
html[data-theme="taxi"] .personal-news-close,
html[data-theme="taxi"] .personal-news-popup-actions button {
  clip-path: none !important;
  -webkit-clip-path: none !important;
}

html[data-theme="taxi"] .personal-news-popup-actions button {
  background: #ffd22e;
  color: #11151c;
}

@keyframes personal-news-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .personal-news-modal {
    padding: 12px;
  }

  .personal-news-window {
    width: min(100%, calc(100vw - 18px));
    max-height: 86vh;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, .28);
  }

  .personal-news-head {
    padding: 14px 50px 12px 13px;
  }

  .personal-news-popup-list {
    max-height: 54vh;
    padding: 10px;
  }

  .personal-news-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .personal-news-actions button {
    width: 100%;
  }
}

body[data-page="setting"] .point-passphrase-account-actions {
  align-items: center;
}

body[data-page="setting"] .point-passphrase-rename {
  min-height: 38px;
  border: var(--my-page-line, 2px) solid var(--my-page-accent, #274f9e);
  background: var(--my-page-accent, #274f9e);
  color: var(--my-page-accent-text, #fff);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

html[data-theme] body[data-page="setting"] .point-passphrase-form .point-name-suggestions button {
  min-height: 30px;
  padding: 5px 8px;
  border: var(--my-page-line, 2px) solid var(--my-page-accent, #274f9e);
  border-radius: 4px;
  background: var(--my-page-surface, #fff);
  color: var(--my-page-text, #000);
  box-shadow: none;
  clip-path: none;
  -webkit-clip-path: none;
  font-size: 12px;
  line-height: 1;
  text-shadow: none;
}

.gilda-map-marker {
  z-index: 8;
}

.gilda-map-marker.is-dragging {
  z-index: 24;
  filter: drop-shadow(0 0 10px #b783ff);
}

.gilda-map-marker .gilda-thread-bubble,
html[data-theme="retro"] .gilda-map-marker .gilda-thread-bubble,
html[data-theme="modern"] .gilda-map-marker .gilda-thread-bubble {
  background: #fff8ff;
  color: #6f2dbd;
  border-color: #6f2dbd;
  box-shadow: var(--map-bubble-shadow) var(--map-bubble-shadow) 0 rgba(111, 45, 189, .34);
}

.gilda-map-marker .gilda-thread-bubble::after,
html[data-theme="retro"] .gilda-map-marker .gilda-thread-bubble::after,
html[data-theme="modern"] .gilda-map-marker .gilda-thread-bubble::after {
  background: #fff8ff;
  border-color: #6f2dbd;
}

.thread-avatar.gilda-map-avatar {
  width: var(--map-avatar-width);
  height: var(--map-avatar-width);
  object-fit: contain;
  object-position: center bottom;
  padding: 0;
  background: transparent;
  border: 0;
  image-rendering: pixelated;
}

.gilda-owner-name {
  text-shadow: none;
}

.gilda-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 6, 13, .68);
}

.gilda-modal-window {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: hidden;
  background: #110916;
  color: #fff7dc;
  border: 4px solid #d2a64c;
  box-shadow: 8px 8px 0 #050308;
}

.gilda-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #fff0a8;
  color: #1a1020;
  border: 3px solid #000;
  font: inherit;
  font-weight: 900;
}

.gilda-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 56px 18px 24px;
  background: #301744;
  border-bottom: 3px solid #0a0610;
}

.gilda-modal-avatar {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: pixelated;
}

.gilda-modal-head h2 {
  margin: 0;
  color: #ffe58d;
  font-size: 1.7rem;
  line-height: 1;
}

.gilda-modal-head p {
  margin: 8px 0 0;
  color: #e8d7ff;
  font-size: .92rem;
}

.gilda-chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 22px;
  overflow: auto;
  background: linear-gradient(180deg, #100817, #09050d);
}

.gilda-chat-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 78%;
}

.gilda-chat-message.is-user {
  align-self: flex-end;
}

.gilda-chat-avatar {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}

.gilda-chat-bubble {
  min-width: 0;
  padding: 14px 16px;
  background: #2d173d;
  border: 2px solid #60436f;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .35);
}

.gilda-chat-message.is-user .gilda-chat-bubble {
  background: #4a3972;
  border-color: #8871b3;
}

.gilda-chat-name {
  margin-bottom: 8px;
  color: #ffe58d;
  font-size: .8rem;
  font-weight: 800;
}

.gilda-chat-text {
  white-space: pre-wrap;
  line-height: 1.65;
}

.gilda-chat-form {
  padding: 14px 18px 18px;
  background: #21102d;
  border-top: 3px solid #0a0610;
}

.gilda-chat-form label {
  display: block;
  margin-bottom: 8px;
  color: #e8d7ff;
  font-size: .85rem;
}

.gilda-chat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.gilda-chat-row input {
  min-width: 0;
  padding: 12px 14px;
  background: #0b0610;
  color: #fff7dc;
  border: 3px solid #d2a64c;
  font: inherit;
}

/* The fixed bug-report BBS thread reuses each active theme's message/admin UI. */
.bug-report-action-button {
  border-color: currentColor;
  font-size: 1.05rem;
}

.bug-report-action-button.is-active,
.bug-report-action-button:disabled {
  opacity: .72;
}

.bug-report-action-button:disabled {
  cursor: default;
}

.message.has-bug-report {
  scroll-margin-top: 16px;
  min-height: 124px;
  padding-bottom: 112px !important;
}

.message.has-message-controls.has-bug-report,
.message-list.is-chat-list .message.has-message-controls.has-bug-report,
.message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls.has-bug-report {
  padding-bottom: 118px !important;
}

.message-bug-report-stamp {
  position: absolute;
  right: 12px;
  bottom: 9px;
  z-index: 8;
  display: block;
  width: 92px;
  height: 92px;
  border: 0;
  object-fit: contain;
  image-rendering: auto;
  opacity: .9;
  transform: rotate(-7deg);
  pointer-events: none;
}

.message.has-bug-report-action .message-bug-report-stamp {
  right: 55px;
}

.message-bug-report-status-stamp {
  position: absolute;
  right: 12px;
  bottom: 14px;
  z-index: 8;
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  min-height: 44px;
  padding: 7px 13px;
  border: 3px double currentColor;
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: .08em;
  transform: rotate(-4deg);
  pointer-events: none;
}

.message.has-bug-report-action .message-bug-report-status-stamp {
  right: 55px;
}

.message.has-bug-report-action .message-reaction-actions.is-bug-report-action,
.message-list.is-chat-list .message.has-bug-report-action .message-reaction-actions.is-bug-report-action {
  right: 10px !important;
  bottom: 10px !important;
}

.bug-report-resolution-card {
  position: relative;
  margin: -4px 12px 20px 32px;
  padding: 14px 16px;
  border: 2px solid currentColor;
  border-left-width: 8px;
  border-radius: 4px;
  box-shadow: 3px 4px 0 rgb(0 0 0 / 14%);
}

.bug-report-resolution-card::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 24px;
  width: 18px;
  height: 18px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: inherit;
  transform: rotate(45deg);
}

.bug-report-resolution-head {
  margin-bottom: 7px;
  font-weight: 900;
}

.bug-report-resolution-body,
.admin-bug-report-resolved-comment {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.7;
}

.bug-report-resolution-meta {
  margin-top: 8px;
  font-size: .78rem;
  opacity: .72;
}

.admin-bug-report-summary {
  margin: 0 0 12px;
  font-weight: 900;
}

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

.admin-bug-report-row {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border: 3px solid currentColor;
}

.admin-bug-report-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .8rem;
}

.admin-bug-report-source {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 10px;
  border: 2px solid currentColor;
  background: rgb(255 255 255 / 48%);
  text-decoration: none;
}

.admin-bug-report-source strong,
.admin-bug-report-source span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-bug-report-source span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

.admin-bug-report-resolution-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  font-weight: 900;
}

.admin-bug-report-resolution-field textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
}

.admin-bug-report-resolved-comment {
  padding: 10px;
  border-left: 5px solid currentColor;
  background: rgb(255 255 255 / 58%);
}

html[data-theme="retro"] .message.has-bug-report,
html[data-theme="retro"] .admin-bug-report-row.is-open {
  border-color: #d34f78;
}

html[data-theme="retro"] .bug-report-action-button {
  background: #fff6a4;
  color: #993451;
}

html[data-theme="retro"] .message-bug-report-status-stamp,
html[data-theme="retro"] .bug-report-resolution-card,
html[data-theme="retro"] .admin-bug-report-row.is-resolved {
  border-color: #267653;
  background: #effff1;
  color: #174d35;
}

html[data-theme="retro"] .admin-bug-report-row.is-open {
  background: #fffdf0;
  color: #21386f;
}

html[data-theme="modern"] .message.has-bug-report,
html[data-theme="modern"] .admin-bug-report-row.is-open {
  border-color: #e05a47;
}

html[data-theme="modern"] .bug-report-action-button {
  background: #141820;
  color: #f4c542;
}

html[data-theme="modern"] .message-bug-report-status-stamp,
html[data-theme="modern"] .bug-report-resolution-card,
html[data-theme="modern"] .admin-bug-report-row.is-resolved {
  border-color: #347154;
  background: #f1faf5;
  color: #244c3a;
}

html[data-theme="modern"] .admin-bug-report-row.is-open {
  border-radius: 8px;
  background: #fff;
  color: #141820;
}

html[data-theme="modern"] .admin-bug-report-row.is-resolved,
html[data-theme="modern"] .bug-report-resolution-card {
  border-radius: 8px;
}

html[data-theme="elegant"] .message.has-bug-report,
html[data-theme="elegant"] .admin-bug-report-row.is-open {
  border-color: #a14c72;
}

html[data-theme="elegant"] .bug-report-action-button {
  background: #fffaf4;
  color: #6d3151;
}

html[data-theme="elegant"] .message-bug-report-status-stamp,
html[data-theme="elegant"] .bug-report-resolution-card,
html[data-theme="elegant"] .admin-bug-report-row.is-resolved {
  border-color: #62816e;
  background: #f7fbf5;
  color: #34503e;
}

html[data-theme="elegant"] .admin-bug-report-row.is-open {
  background: #fffaf4;
  color: #4c2b3f;
}

html[data-theme="cute"] .message.has-bug-report,
html[data-theme="cute"] .admin-bug-report-row.is-open {
  border-color: #ff7fb3;
}

html[data-theme="cute"] .bug-report-action-button {
  background: #fff7fc;
  color: #a44275;
}

html[data-theme="cute"] .message-bug-report-status-stamp,
html[data-theme="cute"] .bug-report-resolution-card,
html[data-theme="cute"] .admin-bug-report-row.is-resolved {
  border-color: #72a98a;
  background: #f5fff8;
  color: #3d7454;
}

html[data-theme="cute"] .admin-bug-report-row.is-open {
  border-radius: 8px;
  background: #fff7fc;
  color: #5b2144;
}

html[data-theme="cute"] .admin-bug-report-row.is-resolved,
html[data-theme="cute"] .bug-report-resolution-card {
  border-radius: 8px;
}

html[data-theme="taxi"] .message.has-bug-report,
html[data-theme="taxi"] .admin-bug-report-row.is-open {
  border-color: #ffd22e;
}

html[data-theme="taxi"] .bug-report-action-button {
  background: #ffd22e;
  color: #11151c;
}

html[data-theme="taxi"] .message-bug-report-status-stamp,
html[data-theme="taxi"] .bug-report-resolution-card,
html[data-theme="taxi"] .admin-bug-report-row.is-resolved {
  border-color: #80b99a;
  background: #131d19;
  color: #dff8e8;
}

html[data-theme="taxi"] .admin-bug-report-row.is-open {
  border-radius: 8px;
  background: #11151c;
  color: #fffdf2;
}

html[data-theme="taxi"] .admin-bug-report-row.is-resolved,
html[data-theme="taxi"] .bug-report-resolution-card {
  border-radius: 8px;
}

html[data-theme="taxi"] .admin-bug-report-source,
html[data-theme="taxi"] .admin-bug-report-resolved-comment {
  background: rgb(255 255 255 / 8%);
}

@media (max-width: 640px) {
  .message.has-bug-report,
  .message.has-message-controls.has-bug-report,
  .message-list.is-chat-list .message.has-message-controls.has-bug-report,
  .message-list.is-chat-list .message.is-chat-sticker-message.has-message-controls.has-bug-report {
    min-height: 108px;
    padding-bottom: 98px !important;
  }

  .message-bug-report-stamp {
    width: 74px;
    height: 74px;
  }

  .message.has-bug-report-action .message-bug-report-stamp,
  .message.has-bug-report-action .message-bug-report-status-stamp {
    right: 48px;
  }

  .message-bug-report-status-stamp {
    min-width: 76px;
    min-height: 38px;
    padding: 5px 9px;
    font-size: .78rem;
  }

  .bug-report-resolution-card {
    margin-right: 4px;
    margin-left: 16px;
    padding: 12px;
  }

  .admin-bug-report-row {
    gap: 8px;
    padding: 10px;
  }

  .admin-bug-report-row-head {
    align-items: flex-start;
  }
}
