:root {
  --theme-base: #ce6029;
  --theme-image: url("fondo-naranja-v2.webp");
  --theme-position: center;
  --theme-veil: #f7dabb26;
  --theme-edge: #e68b4b;
  --theme-soft: #fff0e4;
  --theme-surface: #fff5e9ed;
  --theme-card: #fffaf2;
  --theme-muted: #654437;
  --theme-button: #963b1f;
  --theme-button-ink: #fff;
  --theme-hero: #f7e3d1;
}
:root[data-portal-theme="graphite"] body:has([data-portal-home]) {
  color-scheme: dark;
  --portal-ink: #f4eef0;
  --portal-accent: #ffbad4;
  --portal-paper: #241f23;
  --portal-line: #625361;
  --theme-base: #161419;
  --theme-image: url("fondo-grafito-v2.webp");
  --theme-position: 38% center;
  --theme-veil: #201b2924;
  --theme-edge: #534657;
  --theme-soft: #403340;
  --theme-surface: #2b252ded;
  --theme-card: #35303a;
  --theme-muted: #d8cad6;
  --theme-button: #f4b7d3;
  --theme-button-ink: #27202a;
  --theme-hero: #352c38;
}
:root[data-portal-theme="purple"] body:has([data-portal-home]) {
  --portal-ink: #302244;
  --portal-accent: #683d87;
  --portal-paper: #fffaff;
  --portal-line: #cbb7db;
  --theme-base: #76618f;
  --theme-image: url("fondo-morado-v2.webp");
  --theme-position: center;
  --theme-veil: #e3d2ee33;
  --theme-edge: #b894d2;
  --theme-soft: #efe2f8;
  --theme-surface: #f5ebfbef;
  --theme-card: #fffaff;
  --theme-muted: #584665;
  --theme-button: #683d87;
  --theme-hero: #e8d8f0;
}
:root[data-portal-theme="lagoon"] body:has([data-portal-home]) {
  --portal-ink: #15383c;
  --portal-accent: #095c62;
  --portal-paper: #f3fbf8;
  --portal-line: #a5cfc3;
  --theme-base: #317b8a;
  --theme-image: url("fondo-laguna-v2.webp");
  --theme-position: 58% center;
  --theme-veil: #e0efe633;
  --theme-edge: #74b695;
  --theme-soft: #ddf1e7;
  --theme-surface: #e9f8f0ee;
  --theme-card: #f7fffb;
  --theme-muted: #365652;
  --theme-button: #095c62;
  --theme-hero: #d5ebe3;
}
:root[data-portal-theme="sorbet"] body:has([data-portal-home]) {
  --portal-ink: #4d2c37;
  --portal-accent: #8b3457;
  --portal-paper: #fffbef;
  --portal-line: #dfb7aa;
  --theme-base: #f0c67b;
  --theme-image: url("fondo-sorbete-v2.webp");
  --theme-position: 62% center;
  --theme-veil: #fff0d037;
  --theme-edge: #df9aab;
  --theme-soft: #fce1e6;
  --theme-surface: #fff3ddef;
  --theme-card: #fffaf1;
  --theme-muted: #684752;
  --theme-button: #8b3457;
  --theme-hero: #f8dfcf;
}
body:has([data-portal-home]) {
  isolation: isolate;
  color: var(--portal-ink);
  background: var(--theme-base);
}
body:has([data-portal-home])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(var(--theme-veil), var(--theme-veil)), var(--theme-image);
  background-position: var(--theme-position);
  background-size: cover;
  background-repeat: no-repeat;
}
[data-portal-home] .portal-masthead,
.portal-site-footer {
  background: var(--portal-paper);
  color: var(--portal-ink);
}
[data-portal-home] .portal-masthead { border-bottom: 3px solid var(--theme-edge); }
.portal-site-footer { border-top: 3px solid var(--theme-edge); }
[data-portal-home] .portal-nav-icon { color: currentColor; }

:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-search button { background: var(--theme-button); color: var(--theme-button-ink); }
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-search button:hover { filter: brightness(.9); background: var(--theme-button); }
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-community small { color: var(--theme-muted); }
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-search input { color: var(--portal-ink); background: var(--theme-card); border-color: var(--portal-line); }
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-discover,
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-guide {
  color: var(--portal-ink);
  background: var(--theme-surface);
  border-color: var(--portal-line);
}
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-stories article,
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-guide article {
  background: var(--theme-card);
  border-color: var(--portal-line);
}
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-stories p,
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-guide p,
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-feature p,
:root[data-portal-theme]:not([data-portal-theme="orange"]) .portal-home-discover header p { color: var(--theme-muted); }
[data-portal-theme]:not([data-portal-theme="orange"]) .portal-columns:has(.portal-home-cover) :is(.portal-home-feature, .portal-home-shortcuts) {
  border-color: transparent;
  background: linear-gradient(var(--theme-surface), var(--theme-surface)) padding-box,
              linear-gradient(#ffffff23, #ffffff10) border-box;
  box-shadow: inset 0 0 0 1px var(--portal-line);
}

[data-portal-home] .portal-masthead > .portal-width,
[data-portal-home] .portal-masthead .portal-navigation,
.portal-site-footer > .portal-width,
.portal-site-footer .portal-navigation { background-color: inherit; }
/* Extend the shared frame from the masthead rule to the footer. */
body:has([data-portal-home]) > .portal-frame {
  --portal-frame-top-gap: 22px;
  flex: 1 0 auto;
  margin-block-start: var(--portal-frame-top-gap);
  position: relative;
  isolation: isolate;
}
body:has([data-portal-home]) > .portal-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--portal-frame-top-gap)) -14px -9px;
  border: 1px solid color-mix(in srgb, var(--portal-ink) 23%, var(--theme-card) 61%);
  border-top: 0;
  border-radius: 0 0 42px 58px / 0 0 38px 51px;
  background-color: color-mix(in srgb, var(--theme-card) 34%, transparent);
  pointer-events: none;
}
@media (max-width: 680px) {
  body:has([data-portal-home]) > .portal-frame { --portal-frame-top-gap: 12px; }
  body:has([data-portal-home]) > .portal-frame::before {
    inset: calc(-1 * var(--portal-frame-top-gap)) -5px -7px;
    border-radius: 0 0 30px 34px / 0 0 25px 29px;
  }
}

.portal-site-footer .portal-navigation { align-items: center; gap: 8px 12px; }
.portal-site-footer .portal-navigation a,
.portal-site-footer .portal-navigation select {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--portal-ink);
  font: 500 16px/1.5 "TikTok Sans", system-ui, sans-serif;
  transition: background-color 150ms ease, color 150ms ease;
}
.portal-site-footer .portal-navigation a + a::before { content: none; }
.portal-theme-control { display: inline-flex; align-items: center; gap: 5px; }
.portal-site-footer .portal-navigation select {
  border: 1px solid var(--portal-line);
  background: transparent;
  cursor: pointer;
}
[data-portal-home] .portal-masthead .portal-navigation :is(a, .portal-language-button):is(:hover, :focus-visible),
.portal-site-footer .portal-navigation :is(a, select):is(:hover, :focus-visible) {
  background-color: var(--theme-soft);
  color: var(--portal-accent);
}
.portal-theme-loading {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: var(--portal-paper);
  color: var(--portal-ink);
  text-align: center;
}
.portal-theme-loading[open] { display: grid; place-content: center; justify-items: center; }
.portal-theme-loading p { margin: 10px 0 0; }
.portal-theme-loading img { object-fit: contain; animation: portal-theme-float 700ms ease-in-out infinite alternate; }
@keyframes portal-theme-float { to { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) {
  .portal-theme-loading img { animation: none; }
  .portal-site-footer .portal-navigation :is(a, select) { transition: none; }
}

/* Keep document and directory controls on the same type and color scale. */
.portal-frame {
  font-family: "TikTok Sans", system-ui, sans-serif;
}
.portal-frame > main > .portal-panel,
.portal-frame > main > .portal-columns:not(:has(.portal-home-cover)) .portal-panel {
  background: var(--theme-surface);
  border-color: var(--portal-line);
}
/* The shared frame carries the transparency. Reading and form cards are opaque. */
.portal-frame > main > .portal-panel:is(.portal-document, .portal-access) {
  background: var(--theme-card);
  background: rgb(from var(--theme-surface) r g b / 1);
}
.portal-frame :is(.portal-document-heading, .portal-home-title) h1 {
  margin-block: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}
.portal-directory-search { gap: 8px 12px; }
.portal-directory-search :is(input, select, button) {
  min-height: 40px;
  padding: 7px 11px;
  background: var(--theme-card);
}
.portal-directory-search button {
  background: var(--theme-button);
  border-color: transparent;
  color: var(--theme-button-ink);
}
.portal-directory-search button:hover { filter: brightness(.9); }
.portal-home-entries article { background: var(--theme-card); border-color: var(--portal-line); }
.portal-home-entries article a:hover,
.portal-home-links a:hover { background: var(--theme-soft); color: var(--portal-accent); }

body:has([data-portal-home]) {
  display: flex;
  flex-direction: column;
}
body:has([data-portal-home]) > [data-portal-footer] { margin-block-start: auto; }

.portal-room-table {
  width: 100%;
  table-layout: fixed;
  border: 1px solid var(--portal-line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
.portal-room-table .portal-room-count { width: 44px; }
.portal-room-table .portal-room-name { width: 25%; }
.portal-room-table .portal-room-status { width: 30px; }
.portal-room-table .portal-room-language { width: 19%; }
.portal-room-table :is(th, td) {
  padding: 7px 9px;
  text-align: start;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.portal-room-table th { background: var(--theme-soft); font-weight: 650; }
.portal-room-table td { background: var(--theme-card); border-top: 1px solid var(--portal-line); }
.portal-room-table tbody tr:nth-child(even) td {
  background-color: color-mix(in srgb, var(--theme-card), var(--portal-accent) 8%);
}
.portal-room-table td:first-child,
.portal-room-table th:first-child { text-align: center; }
.portal-room-table td:first-child { font-variant-numeric: tabular-nums; }
.portal-room-table th img { display: block; margin-inline: auto; }
.portal-room-status-cell img { display: block; object-fit: contain; margin-inline: auto; }
.portal-room-table a { color: var(--portal-ink); text-decoration: none; font-weight: 650; }
.portal-room-table a:hover { color: var(--portal-accent); text-decoration: underline; }
.portal-directory-empty { padding: 12px; border: 1px solid var(--portal-line); border-radius: 8px; }

@media (max-width: 480px) {
  .portal-room-table .portal-room-count { width: 30px; }
  .portal-room-table .portal-room-status { width: 27px; }
  .portal-room-table .portal-room-name { width: 27%; }
  .portal-room-table .portal-room-language { width: 18%; }
  .portal-room-table { font-size: 13px; }
  .portal-room-table :is(th, td) { padding: 6px 4px; }
  .portal-room-table th img { width: 18px; }
}

.portal-help > .portal-home-title {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--portal-line);
}
.portal-help .portal-document-body > :is(section, nav) {
  margin-block: 12px;
  padding: 14px 16px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  background: var(--theme-card);
}
.portal-help h2 { margin-block: 0 8px; font-size: 20px; }
.portal-help p { margin-block: 6px 10px; }
.portal-help :is(input, textarea, select) {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-block: 4px 10px;
  padding: 8px 10px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-paper);
  color: var(--portal-ink);
}
.portal-help button {
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--theme-button);
  color: var(--theme-button-ink);
  cursor: pointer;
}
.portal-help button:hover { filter: brightness(.9); }

.portal-directory-heading {
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.portal-directory-heading .portal-pages {
  justify-content: flex-end;
  gap: 4px;
  margin: 0 0 0 auto;
  font-size: 14px;
  font-weight: 600;
}
.portal-directory-heading .portal-pages :is(a, span) {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  padding-inline: 7px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  background: var(--theme-card);
  color: var(--portal-ink);
  text-decoration: none;
}
.portal-directory-heading .portal-pages a:hover { background: var(--theme-soft); }
.portal-directory-heading .portal-pages [aria-current] {
  border-color: transparent;
  background: var(--theme-button);
  color: var(--theme-button-ink);
}

.portal-access { width: min(100%, 500px); margin-inline: auto; }
.portal-access h1 { margin: 0; font-size: clamp(26px, 4vw, 36px); line-height: 1.15; }
.portal-access p { margin: 8px 0 14px; color: var(--theme-muted); }
.portal-access-form { display: grid; gap: 7px; }
.portal-access-form label { font-weight: 600; }
.portal-access-form :is(input:not([type="hidden"], [type="checkbox"]), textarea) {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin-bottom: 5px;
  padding: 7px 10px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--theme-card);
  color: var(--portal-ink);
}
.portal-access-form button {
  min-height: 40px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--theme-button);
  color: var(--theme-button-ink);
  cursor: pointer;
}
.portal-access-form button:hover { filter: brightness(.9); }
.portal-access-form button:disabled { opacity: .65; cursor: wait; }
.portal-access .portal-access-note { padding: 9px 11px; border-radius: 8px; background: var(--theme-soft); color: var(--portal-ink); }
.portal-access-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.portal-access-links a { font-weight: 600; }

.portal-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 16px;
}
.portal-recovery-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--theme-card);
  color: var(--portal-ink);
  text-decoration: none;
  font-weight: 600;
}
.portal-recovery-actions a:first-child {
  border-color: transparent;
  background: var(--theme-button);
  color: var(--theme-button-ink);
}
.portal-recovery-actions a:hover { filter: brightness(.93); }

.portal-access-form textarea { font: inherit; resize: vertical; }

.portal-signup { width: min(100%, 740px); margin-inline: auto; }
.portal-signup > .portal-panel,
.portal-signup form > .portal-panel {
  background: var(--theme-card);
  background: rgb(from var(--theme-surface) r g b / 1);
}
.portal-signup form { display: grid; gap: 14px; margin-top: 14px; }
.portal-signup form > .portal-panel { margin: 0; }
.portal-signup h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.portal-signup p { margin: 8px 0 0; color: var(--theme-muted); }
.portal-signup fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.portal-signup legend { padding: 0; margin-bottom: 8px; font-size: 20px; font-weight: 700; }
.portal-signup label:not(.check) { display: block; margin-block: 8px 4px; font-weight: 600; }
.portal-signup small { display: block; margin-block: 4px 6px; color: var(--theme-muted); }
.portal-signup :is(input:not([type=checkbox], [type=hidden]), select, textarea) {
  width: 100%; min-width: 0; min-height: 40px; padding: 7px 10px;
  border: 1px solid var(--portal-line); border-radius: 8px;
  background: var(--theme-card); color: var(--portal-ink); font: inherit;
}
.portal-signup textarea { resize: vertical; }
.portal-signup .sn-registration-profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.portal-signup .sn-profile-field:has(textarea) { grid-column: 1 / -1; }
.portal-signup .check { display: block; margin-block: 10px; }
.portal-signup .check input { accent-color: var(--portal-accent); }
.portal-signup .captcha-row, .portal-signup .profile-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.portal-signup .profile-preview, .portal-signup .registration-errors { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--theme-soft); }
.portal-signup .captcha-row img { max-width: 100%; height: auto; }
.portal-signup .signin-link { margin-inline-start: 10px; }
.portal-signup button { cursor: pointer; font: inherit; min-height: 40px; padding: 7px 12px; border: 1px solid var(--portal-line); border-radius: 8px; background: var(--theme-card); color: var(--portal-ink); }
.portal-signup button[type=submit] { border-color: transparent; background: var(--theme-button); color: var(--theme-button-ink); }
.portal-signup button:disabled { opacity: .65; cursor: default; }
@media (max-width: 550px) { .portal-signup .sn-registration-profile { grid-template-columns: minmax(0, 1fr); } }

.portal-signin {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  width: min(100%, 760px);
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}
.portal-signin-art {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
}
.portal-signin-content { min-width: 0; }
.portal-signin-submit { display: flex; gap: 9px; align-items: center; justify-content: center; }
.portal-signin-submit:disabled::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: portal-signin-spin .65s linear infinite;
}
@keyframes portal-signin-spin { to { transform: rotate(1turn); } }
@media (max-width: 560px) {
  .portal-signin { grid-template-columns: minmax(0, 1fr); width: min(100%, 430px); }
  .portal-signin-art { aspect-ratio: 2 / 1; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-signin-submit:disabled::before { animation: none; }
}

.portal-access-form .portal-signin-remember { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.portal-signin-remember input { accent-color: var(--portal-accent); }

.portal-arcade { display: grid; gap: 16px; }
.portal-arcade .portal-panel { margin: 0; background: var(--theme-card); }
.portal-arcade .portal-home-title {
  background: var(--theme-card);
  background: rgb(from var(--theme-surface) r g b / 1);
}
.portal-arcade p { margin: 7px 0 0; color: var(--theme-muted); }
.portal-arcade-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.portal-arcade .portal-arcade-card { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.portal-arcade-card img { display: block; width: 100%; height: auto; }
.portal-arcade-card > div { display: flex; flex-direction: column; align-items: flex-start; padding: 14px; }
.portal-arcade h2 { margin: 4px 0 0; font-size: 20px; line-height: 1.2; }
.portal-arcade .portal-arcade-genre { margin: 0; font-size: 14px; }
.portal-arcade-card p:last-of-type { margin-bottom: 14px; }
.portal-arcade-play, .portal-arcade-upload button {
  display: inline-flex; align-items: center; min-height: 40px; margin-top: auto; padding: 7px 12px;
  border: 0; border-radius: 8px; font: inherit; font-weight: 600;
  background: var(--theme-button); color: var(--theme-button-ink); text-decoration: none;
}
.portal-arcade-play:hover { color: var(--theme-button-ink); filter: brightness(.9); }
.portal-arcade-upload button { margin-top: 10px; opacity: .65; }
@media (max-width: 720px) { .portal-arcade-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .portal-arcade-catalog { grid-template-columns: minmax(0, 1fr); } }

.portal-game { min-width: 0; }
.portal-game .sn-games-back { display: inline-flex; margin-bottom: 10px; }
.portal-game .sn-game-intro {
  display: grid; grid-template-columns: minmax(120px, 195px) minmax(0, 1fr);
  align-items: center; gap: 16px; margin-bottom: 14px;
  background: var(--theme-card); background: rgb(from var(--theme-surface) r g b / 1);
}
.portal-game .sn-game-intro img { display: block; width: 100%; height: auto; border-radius: 10px; }
.portal-game h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.portal-game h2 { margin: 0 0 8px; font-size: 20px; }
.portal-game p { margin: 0 0 10px; }
.portal-game .sn-game-layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(190px, 1fr); gap: 14px; align-items: start; }
.portal-game .sn-game-layout > .portal-panel { margin: 0; background: var(--theme-card); }
.portal-game .sn-game-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.portal-game :is(button:not(.sn-tile, .sn-square), select) { min-height: 36px; padding: 5px 9px; border: 1px solid var(--portal-line); border-radius: 8px; color: var(--portal-ink); background: var(--theme-soft); font: inherit; }
.portal-game button:not(:disabled):hover { cursor: pointer; filter: brightness(.94); }
.portal-game button:disabled:not(.sn-square) { opacity: .65; }
.portal-game .sn-game-ranking table { width: 100%; border-collapse: collapse; text-align: left; }
.portal-game .sn-game-ranking :is(th, td) { padding: 7px 4px; border-bottom: 1px solid var(--portal-line); overflow-wrap: anywhere; }
.portal-game .sn-game-ranking :is(th, td):last-child { text-align: right; }
.portal-game .sn-duel details, .portal-game #sn-duel-leave { margin-top: 10px; }
.portal-game #sn-duel-status { font-weight: 700; }
.portal-game #sn-duel-board:empty { display: none; }
.portal-game .sn-checkerboard .sn-square { min-height: 0; }
@media (max-width: 720px) { .portal-game .sn-game-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) { .portal-game .sn-game-intro { grid-template-columns: minmax(0, 1fr); } }

.sn-pairs, .sn-numbers, .sn-sequence { display: grid; gap: 8px; }
.sn-pairs { grid-template-columns: repeat(4, 1fr); }
.sn-numbers, .sn-sequence { grid-template-columns: repeat(2, 1fr); }
.sn-numbers h3, .sn-numbers p { grid-column: 1 / -1; }
.sn-numbers h3 { font-size: 26px; }
.sn-tile {
  min-height: 53px; line-height: 1.1; font-family: inherit;
  font-size: 23px; font-weight: 700; border: 1px solid #a7ced8; border-radius: 10px;
  background: #e5f5f8; color: #155568; cursor: pointer;
}
.sn-tile:not(:disabled):hover { border-color: #086680; box-shadow: inset 0 0 0 2px #ffffffa0; }
.sn-tile:focus-visible { outline: 3px solid #0f6782; outline-offset: 2px; }
.sn-tile[data-face="0"], .sn-pad-0 { background: #ffd2e3; color: #862653; }
.sn-tile[data-face="1"], .sn-pad-1 { background: #b9eee4; color: #176557; }
.sn-tile[data-face="2"], .sn-pad-2 { background: #ffd5bb; color: #883916; }
.sn-tile[data-face="3"], .sn-pad-3 { background: #e9d9ff; color: #5b4185; }
.sn-tile[data-face="4"] { background: #fff1ba; color: #745421; }
.sn-tile[data-face="5"] { background: #cce7ff; color: #2e578e; }
.sn-pad { min-height: 68px; }
.sn-pad.sn-lit { box-shadow: inset 0 0 0 4px currentColor; }
.sn-checkerboard {
  display: grid;
  grid-template-columns: repeat(8,minmax(0,1fr));
  width: 100%;
  border: 5px solid #174b60;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 4px 12px #0b334528;
}
.sn-checkerboard .sn-square {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  padding: 0;
  opacity: 1;
  background: #e6f2f2;
}
.sn-checkerboard .sn-dark { background: #34728a; }
.sn-checkerboard .sn-square-active { box-shadow: inset 0 0 0 3px #ffe396; }
.sn-destination::after {
  content: "";
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe396;
}
.sn-checker-piece {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  width: 78%;
  aspect-ratio: 1;
  border: 1px solid var(--checker-edge);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 24%, var(--checker-light), var(--checker-face) 63%, var(--checker-edge));
  color: var(--checker-ink);
  font: 700 clamp(14px, 3vw, 33px)/1 sans-serif;
  box-shadow: inset 0 1px 2px #fff9, inset 0 -3px 4px #0004, 0 3px 0 var(--checker-edge), 0 5px 5px #00213188;
}
.sn-checker-piece::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid var(--checker-edge);
  border-radius: 50%;
  box-shadow: 0 1px 1px #fff7, inset 0 1px 1px #0002;
}
.sn-coral-piece { --checker-light:#ffe0e3; --checker-face:#f58a9a; --checker-edge:#a44661; --checker-ink:#69253f; }
.sn-teal-piece { --checker-light:#d4fff1; --checker-face:#6bcdb9; --checker-edge:#26786d; --checker-ink:#174f50; }
.sn-domino-chain, .sn-domino-hand { display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 0; }
.sn-domino-chain { background: #eaf6f4; border-radius: 9px; padding: 12px; margin-bottom: 12px; }
.sn-domino-tile {
  display: inline-flex; background: #fff7e7; color: #20475a; border: 1px solid #bcb39e;
  border-radius: 5px; font-weight: 700; overflow: hidden;
}
.sn-domino-tile > span { min-width: 20px; padding: 5px 4px; text-align: center; }
.sn-domino-tile > span + span { border-left: 1px solid #bcb39e; }
.sn-domino-hand > div { display: flex; flex-direction: column; gap: 4px; }

.portal-saved-list { padding: 0; list-style: none; border: 1px solid var(--portal-line); border-radius: 12px; overflow: hidden; }
.portal-saved-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; padding: 12px; background: var(--theme-card); }
.portal-saved-list li + li { border-top: 1px solid var(--portal-line); }
.portal-saved-room { min-width: 0; overflow-wrap: anywhere; }
.portal-saved-room a { font-weight: 650; }
.portal-saved-room img { vertical-align: middle; margin-inline-start: 4px; }
.portal-saved-room p { margin: 4px 0 0; color: var(--theme-muted); }
.portal-saved-list button { min-height: 36px; padding: 6px 10px; border: 1px solid var(--portal-line); border-radius: 8px; font: inherit; color: var(--portal-ink); background: var(--theme-soft); cursor: pointer; }
.portal-saved-list button:hover { color: var(--portal-accent); filter: brightness(.95); }
@media (max-width: 480px) {
  .portal-saved-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .portal-saved-room { grid-column: 1 / -1; }
}

.portal-create { width: min(100%, 700px); margin-inline: auto; }
.portal-create h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.portal-create form { display: grid; gap: 14px; margin-top: 18px; }
.portal-create label { display: block; margin-bottom: 4px; font-weight: 600; }
.portal-create label span, .portal-create small { color: var(--theme-muted); font-weight: 400; }
.portal-create small { display: block; margin-top: 4px; }
.portal-create :is(input:not([type=hidden]), select, textarea) {
  width: 100%; min-width: 0; min-height: 40px; padding: 7px 10px;
  border: 1px solid var(--portal-line); border-radius: 8px;
  background: var(--theme-card); color: var(--portal-ink); font: inherit;
}
.portal-create textarea { resize: vertical; }
.portal-create .shateamos-room-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.portal-create .shateamos-create-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.portal-create button { min-height: 40px; padding: 6px 12px; border: 0; border-radius: 8px; font: inherit; cursor: pointer; background: var(--theme-button); color: var(--theme-button-ink); }
.portal-create button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 520px) { .portal-create .shateamos-room-pair { grid-template-columns: minmax(0, 1fr); } }

.portal-profile { display: grid; gap: 14px; min-width: 0; }
.portal-profile .sn-account-content { min-width: 0; display: grid; gap: 14px; }
.portal-profile .portal-profile-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-profile-tabs a, .portal-profile-action {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px;
  border: 1px solid var(--portal-line); border-radius: 8px;
  background: var(--theme-card); color: var(--portal-ink); text-decoration: none;
}
.portal-profile-tabs a:hover { background: var(--theme-soft); color: var(--portal-accent); }
.portal-profile-tabs a[aria-current=page], .portal-profile-action {
  background: var(--theme-button); color: var(--theme-button-ink); border-color: transparent;
}
.portal-profile .shateamos-policy-card {
  min-width: 0; margin: 0; border: 1px solid var(--portal-line);
  border-radius: 18px; padding: clamp(14px, 3vw, 22px); background: var(--theme-card);
}
.portal-profile .portal-home-title { background: var(--theme-card); }
.portal-profile .sn-profile-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.portal-profile .sn-profile-avatar img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.portal-profile .sn-chat-profile-details { margin: 14px 0 0; }
.portal-profile .sn-chat-profile-details dd { margin: 0 0 10px; }
.portal-profile .sn-profile-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 14px; }
.portal-profile :is(img, video, audio, iframe, textarea) { max-width: 100%; }

.portal-profile .sn-profile-identity {
  --profile-tone: #103851;
  padding: 15px;
  border-radius: 14px;
  color: #fff;
}
.portal-profile .sn-profile-identity :is(p,h1) { color: inherit; margin: 0; }
.portal-profile .sn-profile-identity[data-color=berry] { --profile-tone: #76284a; }
.portal-profile .sn-profile-identity[data-color=forest] { --profile-tone: #195444; }
.portal-profile .sn-profile-identity[data-color=violet] { --profile-tone: #543571; }
.portal-profile .sn-profile-identity[data-frame=ribbon] img { outline: 4px solid #fb9ec8; }
.portal-profile .sn-profile-identity[data-frame=gold] img { outline: 4px solid #f8cc72; }
.portal-profile .sn-profile-identity[data-frame=aqua] img { outline: 4px solid #6de4dc; }

.portal-profile .sn-profile-identity {
  position: relative;
  isolation: isolate;
  min-height: 104px;
  overflow: hidden;
  background: var(--profile-tone);
}
.portal-profile .sn-profile-identity::before {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: min(100%, 375px);
  z-index: -1;
  background: url('/images/scn-public-profile-cover.jpg') right center / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, #000 65%);
}
@media(max-width:480px) {
  .portal-profile .sn-profile-identity::before { opacity: .45; }
}

.portal-guest { align-items: start; }
@media (min-width: 561px) {
  .portal-guest > .portal-signin-art {
    align-self: stretch;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-position: center 65%;
  }
}
.portal-guest-hints { margin-top: 16px; padding: 12px; border: 1px solid var(--portal-line); border-radius: 10px; background: var(--theme-card); }
.portal-guest-hints h2 { margin: 0 0 6px; font-size: 17px; }
.portal-guest-hints ul { margin: 0; padding-inline-start: 19px; color: var(--theme-muted); }
.portal-guest-hints li + li { margin-top: 5px; }
@media (max-width: 560px) {
  .portal-guest .portal-signin-art {
    order: 1;
    width: min(100%, 240px);
    justify-self: center;
    aspect-ratio: 4 / 5;
  }
}

.portal-account { display: grid; grid-template-columns: minmax(155px, 205px) minmax(0, 1fr); gap: 14px; align-items: start; }
.portal-account .sn-account-sidebar { background: var(--theme-card); padding: 8px; }
.portal-account .sn-account-sidebar a { display: block; padding: 7px 9px; border-radius: 7px; color: var(--portal-ink); text-decoration: none; }
.portal-account .sn-account-sidebar a:hover { background: var(--theme-soft); color: var(--portal-accent); }
.portal-account .sn-account-sidebar a[aria-current=page] { background: var(--theme-soft); color: var(--portal-accent); font-weight: 700; }
.portal-account .sn-account-page { min-width: 0; }
.portal-account .portal-home-title { margin-bottom: 14px; background: var(--theme-card); background: rgb(from var(--theme-surface) r g b / 1); }
.portal-account .portal-home-title p { margin: 7px 0 0; color: var(--theme-muted); }
.portal-account-settings { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal-account-settings .portal-panel { margin: 0; background: var(--theme-card); }
.portal-account-settings h2 { margin: 0 0 8px; font-size: 20px; }
.portal-account-settings ul { margin: 0; padding-inline-start: 20px; }
.portal-account-settings li + li { margin-top: 6px; }
@media (max-width: 660px) {
  .portal-account, .portal-account-settings { grid-template-columns: minmax(0, 1fr); }
  .portal-account .sn-account-sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
}

.portal-account-menu { position: relative; min-width: 0; }
.portal-account-menu summary {
  display: flex; align-items: center; gap: 7px; padding: 5px 8px; line-height: 1.2;
  border-radius: 8px; cursor: pointer; list-style: none; font-weight: 600;
}
.portal-account-menu summary::-webkit-details-marker { display: none; }
.portal-account-menu summary:hover, .portal-account-menu[open] summary { background: var(--theme-soft); }
.portal-account-name { max-width: min(180px, 40vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-account-icon {
  display: inline-grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center;
  border-radius: 9px; color: var(--portal-ink); background: color-mix(in srgb, currentColor 8%, transparent);
}
.portal-account-menu .portal-account-icon svg { display: block; width: 17px; height: 17px; margin: 0; }
.portal-account-chevron {
  width: 7px; height: 7px; border-inline-end: 1.5px solid; border-block-end: 1.5px solid;
  transform: translateY(-2px) rotate(45deg);
}
.portal-account-menu ul {
  position: absolute; z-index: 15; inset: calc(100% + 5px) 0 auto auto; min-width: min(215px, 75vw);
  padding: 6px; margin: 0; list-style: none; border: 1px solid var(--portal-line); border-radius: 12px;
  background: var(--theme-card); box-shadow: 0 8px 22px #19100f22;
}
.portal-masthead .portal-account-menu li a { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; }
.portal-account-menu li:last-child { border-top: 1px solid var(--portal-line); margin-top: 5px; padding-top: 5px; }
@media (max-width: 560px) { .portal-account-menu ul { inset-inline: 0 auto; } }

.portal-account .portal-nickname { display: grid; gap: 14px; background: var(--theme-card); }
.portal-nickname :is(h2, p) { margin: 0; }
.portal-nickname h2 { font-size: 20px; line-height: 1.25; }
.portal-nickname .portal-access-form { max-width: 420px; }
.portal-nickname .sn-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-nickname .sn-profile-actions button {
  padding-inline: 12px; border: 1px solid var(--portal-line);
  color: var(--portal-ink); background: var(--theme-soft);
}

.portal-favorites { background: var(--theme-card); overflow-wrap: anywhere; }
.portal-favorites h2 { margin: 0 0 8px; font-size: 20px; }
.portal-favorites .portal-access-form { max-width: 400px; margin-block: 14px; }
.portal-favorites .portal-access-form:last-child { margin-bottom: 0; }
.portal-favorites-list, .portal-favorites-items { list-style: none; padding: 0; }
.portal-favorites-list { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-favorites-list a { display: block; border: 1px solid var(--portal-line); border-radius: 8px; padding: 7px 10px; text-decoration: none; }
.portal-favorites-list a:is(:hover,[aria-current=page]) { background: var(--theme-soft); color: var(--portal-accent); }
.portal-favorites-items li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-block: 7px; border-bottom: 1px solid var(--portal-line); }
.portal-favorites-items .portal-access-form { margin: 0; }
.portal-favorites-items button { padding-inline: 10px; }

.portal-album-photos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr));
  gap: 10px; list-style: none; padding: 0;
}
.portal-album-photos li { min-width: 0; padding: 8px; border: 1px solid var(--portal-line); border-radius: 10px; }
.portal-album-photos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

.portal-account .portal-blog { display: grid; gap: 14px; }
.portal-blog > .portal-panel { margin: 0; background: var(--theme-card); overflow-wrap: anywhere; }
.portal-blog .portal-blog-intro { background: var(--theme-card); background: rgb(from var(--theme-surface) r g b / 1); }
.portal-blog h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.portal-blog p { margin: 7px 0 10px; }
.portal-blog .portal-access-form { max-width: 540px; }
.portal-blog .portal-access-form textarea { width: 100%; min-height: 96px; }
.portal-blog .sn-blog-posts article + article { border-top: 1px solid var(--portal-line); padding-top: 12px; }
.portal-blog .sn-blog-posts nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.portal-account .portal-my-profile { display: grid; gap: 14px; min-width: 0; }
.portal-my-profile .portal-panel { margin: 0; background: var(--theme-card); overflow-wrap: anywhere; }
.portal-my-profile .sn-profile-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portal-my-profile h2 { margin: 0 0 8px; font-size: 20px; }
.portal-my-profile dl { margin: 0; }
.portal-my-profile dt { font-weight: 650; }
.portal-my-profile dd { margin: 0 0 8px; color: var(--theme-muted); }
.portal-my-profile .sn-profile-hero {
  --profile-tone: var(--theme-surface);
  position: relative; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--profile-tone); color: var(--portal-ink);
}
.portal-my-profile .sn-profile-hero:is([data-color=berry], [data-color=forest], [data-color=violet]) { color: white; }
.portal-my-profile .sn-profile-hero[data-color=berry] { --profile-tone: #76284a; }
.portal-my-profile .sn-profile-hero[data-color=forest] { --profile-tone: #195444; }
.portal-my-profile .sn-profile-hero[data-color=violet] { --profile-tone: #543571; }
.portal-my-profile .sn-profile-hero img { border-radius: 12px; object-fit: cover; }
.portal-my-profile .sn-profile-hero[data-frame=ribbon] img { outline: 3px solid #fb9ec8; }
.portal-my-profile .sn-profile-hero[data-frame=gold] img { outline: 3px solid #f8cc72; }
.portal-my-profile .sn-profile-hero[data-frame=aqua] img { outline: 3px solid #6de4dc; }
.portal-my-profile .sn-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-my-profile .sn-profile-actions a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 5px 9px; border-radius: 8px;
  background: var(--theme-card); color: var(--portal-ink); text-decoration: none;
}
.portal-my-profile .sn-profile-actions a:hover { background: var(--theme-soft); }
.portal-my-profile .portal-access-form { max-width: 460px; }
.portal-my-profile select { display: block; width: 100%; min-width: 0; min-height: 40px; margin-top: 4px; border: 1px solid var(--portal-line); border-radius: 8px; padding: 6px 8px; font: inherit; color: var(--portal-ink); background: var(--theme-card); }
.portal-my-profile :is(audio, img) { max-width: 100%; }
@media (max-width: 680px) { .portal-my-profile .sn-profile-cards { grid-template-columns: minmax(0, 1fr); } }
.portal-my-profile .sn-profile-hero { overflow: hidden; }
.portal-my-profile .sn-profile-hero::before {
  content: ""; position: absolute; inset: 0 0 0 auto; z-index: -1; width: 55%;
  background: url('/images/scn-my-profile-cover.jpg') right center / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, #000 80%);
  opacity: .55;
}
@media (max-width: 480px) { .portal-my-profile .sn-profile-hero::before { opacity: .25; } }

.portal-account .portal-password { background: var(--theme-card); }
.portal-password .portal-access-form { max-width: 460px; }
.portal-password .portal-access-form p { margin: 0 0 8px; color: var(--theme-muted); }
.portal-password .portal-access-note { margin: 0 0 14px; padding: 9px 11px; border-radius: 8px; background: var(--theme-soft); }
.portal-account .portal-password {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .8fr);
  gap: 14px; align-items: stretch;
}
.portal-password > [role=alert] { grid-column: 1 / -1; margin-block: 0; }
.portal-password::after {
  content: ""; min-height: 155px; border-radius: 10px;
  background: var(--theme-soft) url('/images/scn-password-illustration.jpg') center / cover no-repeat;
}
@media (max-width: 620px) {
  .portal-account .portal-password { grid-template-columns: minmax(0, 1fr); }
  .portal-password::after { aspect-ratio: 2 / 1; }
}

.portal-account .portal-tickets { background: var(--theme-card); min-width: 0; overflow-wrap: anywhere; }
.portal-tickets :is(p,h2) { margin: 0 0 10px; }
.portal-tickets .sn-ticket {
  margin-top: 10px; border: 1px solid var(--portal-line); border-radius: 9px;
  padding: 10px 12px; background: var(--theme-card); min-width: 0;
}
.portal-tickets summary { cursor: pointer; font-weight: 650; color: var(--portal-ink); }
.portal-tickets .sn-ticket[open] summary { margin-bottom: 10px; }
.portal-tickets .sn-ticket-message { border-top: 1px solid var(--portal-line); padding-block: 8px; }
.portal-tickets .sn-ticket-user-form { max-width: 650px; }
.portal-tickets textarea { min-height: 96px; }
.portal-tickets .sn-ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-tickets .sn-ticket-actions button { padding-inline: 12px; }
.portal-tickets .sn-ticket-actions button[value=close] { background: var(--theme-soft); color: var(--portal-ink); border: 1px solid var(--portal-line); }

.portal-help .portal-ticket-entry .portal-access-form { max-width: 570px; }
.portal-help .portal-ticket-entry textarea { min-height: 120px; }
.portal-help .portal-ticket-entry .portal-access-note { background: var(--theme-soft); border-radius: 8px; color: var(--portal-ink); padding: 9px 11px; margin: 4px 0; }
.portal-help .portal-ticket-entry .portal-signin-submit { justify-self: start; padding-inline: 14px; }

.portal-profile-editor { background: var(--theme-card); overflow-wrap: anywhere; }
.portal-profile-editor h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.portal-profile-editor .sn-profile-account,
.portal-profile-editor .sn-profile-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portal-profile-editor .sn-profile-account { padding: 12px; background: var(--theme-soft); border-radius: 10px; margin-bottom: 14px; }
.portal-profile-editor .sn-profile-field { min-width: 0; }
.portal-profile-editor .sn-profile-field:has(textarea), .portal-profile-editor .sn-profile-picture { grid-column: 1 / -1; }
.portal-profile-editor .sn-profile-field > label { display: block; margin-bottom: 5px; }
.portal-profile-editor .sn-profile-field :is(select, textarea) {
  width: 100%; min-width: 0; min-height: 40px; border: 1px solid var(--portal-line);
  border-radius: 8px; padding: 7px 10px; color: var(--portal-ink); background: var(--theme-card); font: inherit;
}
.portal-profile-editor .group-profile-photo { display: block; width: 86px; height: 86px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.portal-profile-editor .group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 12px; }
.portal-profile-editor .group-actions button { padding-inline: 14px; }
.portal-profile-editor small { color: var(--theme-muted); }
@media (max-width: 760px) {
  .portal-profile-editor :is(.sn-profile-account, .sn-profile-editor-grid) { grid-template-columns: minmax(0, 1fr); }
}

.portal-navigation-progress {
  position: fixed; z-index: 30; inset: 12px 12px auto auto;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px);
  padding: 8px 12px; background: var(--theme-card); color: var(--portal-ink);
  border: 1px solid var(--portal-line); border-radius: 8px;
  box-shadow: 0 3px 16px #0002; animation: portal-progress-reveal .16s .14s both;
}
.portal-navigation-progress::before {
  content: ""; width: 14px; height: 14px; flex: 0 0 14px;
  border: 2px solid currentColor; border-inline-end-color: transparent;
  border-radius: 50%; animation: portal-signin-spin .65s linear infinite;
}
@keyframes portal-progress-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .portal-navigation-progress, .portal-navigation-progress::before { animation: none; }
}

.portal-mail-actions { background: var(--theme-soft); border-bottom: 1px solid var(--portal-line); }
.portal-mail-actions .portal-width { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-block: 6px; }
.portal-mail-actions a { padding: 5px 8px; border-radius: 7px; color: var(--portal-ink); text-decoration: none; font-weight: 600; }
.portal-mail-actions a:hover { background: var(--theme-card); }
.portal-mailbox { display: grid; grid-template-columns: minmax(150px, 205px) minmax(0, 1fr); gap: 14px; align-items: start; }
.portal-mailbox > .portal-panel { margin: 0; background: var(--theme-card); min-width: 0; overflow-wrap: anywhere; }
.portal-mailbox .mail-sidebar { padding: 8px; }
.portal-mailbox .mail-sidebar h2 { font-size: 16px; margin: 5px 8px; }
.portal-mailbox .mail-sidebar nav { display: grid; gap: 3px; }
.portal-mailbox .mail-sidebar nav a { padding: 6px 8px; border-radius: 7px; color: var(--portal-ink); text-decoration: none; }
.portal-mailbox .mail-sidebar nav a:is(:hover,[aria-current=page]) { background: var(--theme-soft); color: var(--portal-accent); }
.portal-mailbox .mail-sidebar nav a[aria-current=page] { font-weight: 700; }
.portal-mailbox .mail-side-note { margin: 8px; color: var(--theme-muted); font-size: 13px; }
.portal-mailbox .mail-main h1 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.portal-mailbox .mail-main h2 { font-size: 20px; }
.portal-mailbox .mail-main img { max-width: 100%; height: auto; }
.portal-mailbox .mail-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.portal-mailbox .mail-search label { flex-basis: 100%; }
.portal-mailbox .mail-search input:not([type=hidden]) { flex: 1 1 150px; min-width: 0; min-height: 40px; padding: 7px 10px; border: 1px solid var(--portal-line); border-radius: 8px; background: var(--theme-card); color: var(--portal-ink); }
.portal-mailbox .mail-main button:not(.mail-link) { min-height: 38px; padding: 6px 10px; border: 0; border-radius: 8px; background: var(--theme-button); color: var(--theme-button-ink); cursor: pointer; }
.portal-mailbox .mail-main button:disabled { opacity: .6; cursor: wait; }
.portal-mailbox .mail-link { border: 0; background: none; color: var(--portal-accent); font: inherit; text-align: start; padding: 0; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.portal-mailbox .mail-link:hover { text-decoration: underline; }
.portal-mailbox .mail-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.portal-mailbox .mail-table :is(td,th) { text-align: start; border-bottom: 1px solid var(--portal-line); padding: 7px 5px; overflow-wrap: anywhere; }
.portal-mailbox .mail-table :is(th,td):nth-child(2) { width: 45%; }
.portal-mailbox .mail-table .unread { background: var(--theme-soft); font-weight: 700; }
.portal-mailbox .mail-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.portal-mailbox .scn-mail-loading { display: none; }
@media (max-width: 664px) {
  .portal-mailbox { grid-template-columns: minmax(0, 1fr); }
  .portal-mailbox .mail-sidebar nav { display: flex; flex-wrap: wrap; }
}

.portal-mailbox .mail-main :is(.mail-compose,.scn-mail-signature) {display:grid; gap:10px;}
.portal-mailbox .mail-main :is(input:not([type=hidden],[type=checkbox]),textarea,select,.scn-mail-editable) {font:inherit;color:var(--portal-ink);background:var(--theme-surface);border:1px solid var(--portal-line);border-radius:8px;padding:8px 10px;max-width:100%;min-width:0;box-sizing:border-box;}
.portal-mailbox .mail-main :is(input:not([type=hidden],[type=checkbox]),select) {min-height:40px;}
.portal-mailbox .mail-main :is(.mail-compose input:not([type=hidden],[type=checkbox]),textarea) {width:100%;}
.portal-mailbox .scn-mail-editable {min-height:230px;overflow-wrap:anywhere;}
.portal-mailbox :is(.scn-mail-editor-toolbar,.scn-friend-tabs,.mail-friend-form) {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-block-end:10px;}
.portal-mailbox .mail-main .scn-mail-editor-toolbar button {background:var(--theme-soft);color:var(--portal-ink);}
.portal-mailbox .scn-mail-signature {border:1px solid var(--portal-line);border-radius:10px;padding:12px;margin:0;}
.portal-mailbox .scn-friend-tabs a {color:var(--portal-ink);text-decoration:none;border-radius:8px;padding:8px 10px;}
.portal-mailbox .scn-friend-tabs a:is(:hover,[aria-current=page]) {background:var(--theme-soft);color:var(--portal-accent);}
.portal-mailbox .scn-friend-tabs a[aria-current=page] {font-weight:700;}
.portal-mailbox .scn-friend-panel {border:1px solid var(--portal-line);border-radius:10px;padding:12px;}
.portal-mailbox .mail-friends {list-style:none;padding:0;}
.portal-mailbox .mail-friends li {display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding-block:8px;border-bottom:1px solid var(--portal-line);}
.portal-mailbox .scn-mail-banner-illustration {display:block;max-height:150px;object-fit:contain;}
.portal-mailbox [hidden] {display:none!important;}

.portal-mailbox .support-mail {display:grid;gap:14px;}
.portal-mailbox .support-mail :is(h1,h2,h3,p) {margin-block:0;}
.portal-mailbox .support-ticket-form {display:grid;gap:9px;border:1px solid var(--portal-line);border-radius:12px;padding:clamp(10px,3vw,16px);}
.portal-mailbox .support-ticket-form :is(select,textarea) {width:100%;}
.portal-mailbox .support-ticket-form p {font-size:.9em;color:var(--theme-muted);}
.portal-mailbox :is(.support-ticket-actions,.support-emoji-bar) {display:flex;flex-wrap:wrap;gap:8px;}
.portal-mailbox .support-emoji-bar {max-height:150px;overflow:auto;}
.portal-mailbox .support-mail .support-emoji-bar button {min-height:32px;padding:4px;border:1px solid var(--portal-line);background:var(--theme-card);}
.portal-mailbox .support-ticket-reading,.portal-mailbox .support-ticket-content,.portal-mailbox .support-review-rendered {padding:12px;border:1px solid var(--portal-line);border-radius:10px;background:var(--theme-surface);white-space:pre-wrap;}
.portal-mailbox .support-ticket-reading {white-space:normal;}
.portal-mailbox .support-ticket-sender {display:block;color:var(--theme-muted);}
.portal-mailbox .support-ticket-table :is(td,th):nth-child(2) {width:18%;}
.portal-mailbox .support-ticket-table :is(td,th):nth-child(3) {width:13%;}

.portal-masthead .portal-account-menu .portal-signout {
  display:flex; align-items:center; justify-content:flex-start; gap:9px; width:100%;
  padding:5px 8px; border:0; border-radius:8px; background:transparent;
  color:var(--portal-ink); font:inherit; font-weight:600; text-align:start; cursor:pointer;
}
.portal-masthead .portal-account-menu .portal-signout:is(:hover,:focus-visible) {background:var(--theme-soft);}

.portal-mailbox .scn-mail-welcome {
  display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,.8fr); align-items:center;
  gap:16px; padding:clamp(14px,3vw,24px); border:1px solid var(--portal-line);
  background:var(--theme-soft); border-radius:14px; margin-block-end:14px;
}
.portal-mailbox .scn-mail-welcome-copy {grid-column:1;grid-row:1;}
.portal-mailbox .scn-mail-welcome-art {grid-column:2;grid-row:1;min-width:0;}
.portal-mailbox .scn-mail-welcome-art img {display:block;width:100%;height:auto;border-radius:11px;}
.portal-mailbox :is(.scn-mail-home-actions,.mail-message-actions) {display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.portal-mailbox :is(.scn-mail-home-actions,.mail-message-actions) a {padding:8px 10px;border-radius:8px;background:var(--theme-soft);color:var(--portal-ink);text-decoration:none;font-weight:600;}
.portal-mailbox :is(.scn-mail-home-actions,.mail-message-actions) a:is(:hover,:focus-visible) {background:var(--theme-button);color:var(--theme-button-ink);}
.portal-mailbox .scn-mail-banner {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--portal-line);border-radius:12px;color:var(--portal-ink);background:var(--theme-soft);text-decoration:none;}
.portal-mailbox .scn-mail-banner-illustration {flex:0 1 38%;min-width:0;max-width:38%;border-radius:8px;}
.portal-mailbox .mail-message-header {display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;margin-block:12px;}
.portal-mailbox .mail-message-header dt {font-weight:600;color:var(--theme-muted);}
.portal-mailbox .mail-message-header dd {margin:0;min-width:0;}
.portal-mailbox .sn-mail-reading > .mail-body {padding:14px;border:1px solid var(--portal-line);border-radius:10px;background:var(--theme-surface);margin-block:12px;overflow-wrap:anywhere;overflow:auto;}
@media (max-width:480px) {
 .portal-mailbox .scn-mail-welcome {grid-template-columns:minmax(0,1fr);}
 .portal-mailbox .scn-mail-welcome-art {grid-column:1;grid-row:2;}
 .portal-mailbox .scn-mail-welcome-art img {max-height:140px;object-fit:cover;}
}

.portal-forum {display:grid;gap:14px;overflow-wrap:anywhere;}
.portal-forum :is(.scn-forum-hero,.scn-forum-panel) {margin:0;padding:clamp(14px,3vw,24px);background:var(--theme-card);border:1px solid var(--portal-line);border-radius:14px;min-width:0;}
.portal-forum .scn-forum-hero {display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;}
.portal-forum :is(h1,h2,h3) {margin:0 0 9px;line-height:1.15;}
.portal-forum h1 {font-size:clamp(28px,5vw,44px);}
.portal-forum h2 {font-size:clamp(20px,3vw,26px);}
.portal-forum .scn-forum-grid {display:grid;grid-template-columns:minmax(156px,1fr) minmax(0,2.6fr);gap:14px;align-items:start;}
.portal-forum :is(nav,.scn-forum-search,.scn-forum-moderation) {display:flex;flex-wrap:wrap;align-items:end;gap:8px;}
.portal-forum :is(button,nav a) {display:inline-flex;align-items:center;min-height:40px;padding:7px 12px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;font-weight:650;text-decoration:none;cursor:pointer;}
.portal-forum :is(button,nav a):is(:hover,:focus-visible) {background:var(--theme-soft);color:var(--portal-ink);}
.portal-forum button:disabled {opacity:.6;cursor:wait;}
.portal-forum label,.portal-forum .scn-forum-form {display:grid;gap:8px;min-width:0;}
.portal-forum .scn-forum-form {margin-block-start:16px;padding-block-start:14px;border-top:1px solid var(--portal-line);}
.portal-forum .scn-forum-form button {justify-self:start;}
.portal-forum .scn-forum-search label {flex:1 1 160px;}
.portal-forum :is(input:not([type=hidden]),textarea,select) {width:100%;min-width:0;min-height:40px;padding:8px 10px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}
.portal-forum :is(.scn-forum-topics,.scn-forum-management) {list-style:none;margin:12px 0;padding:0;}
.portal-forum :is(.scn-forum-topics li,.scn-forum-management li,.scn-forum-section) {padding:10px 0;border-top:1px solid var(--portal-line);}
.portal-forum :is(.scn-forum-topics small,.scn-forum-post time,.scn-forum-section p) {color:var(--theme-muted);font-size:.875rem;}
.portal-forum .scn-forum-topics small {display:block;margin-block-start:3px;}
.portal-forum .scn-forum-section .scn-forum-section {margin-inline-start:10px;}
.portal-forum .scn-forum-post {padding:14px;margin-block:12px;border:1px solid var(--portal-line);border-radius:10px;background:var(--theme-surface);}
.portal-forum .scn-forum-post p {white-space:pre-wrap;margin-bottom:0;}
.portal-forum :is(.scn-forum-management li,.scn-forum-post > div) {display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;}
.portal-forum .scn-forum-permissions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.portal-forum .scn-forum-tag {display:inline-block;padding:3px 8px;border-radius:7px;background:var(--theme-soft);}
.portal-forum .scn-forum-error {padding:8px 12px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);}
@media(max-width:640px) {.portal-forum :is(.scn-forum-grid,.scn-forum-permissions){grid-template-columns:minmax(0,1fr);}}

.portal-groups,.portal-groups-content {display:grid;gap:14px;min-width:0;overflow-wrap:anywhere;}
.portal-groups .portal-panel {margin:0;min-width:0;background:var(--theme-card);}
.portal-groups-heading {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;}
.portal-groups h1 {margin:0 0 8px;font-size:clamp(28px,5vw,44px);line-height:1.12;}
.portal-groups h2 {margin:0 0 10px;font-size:clamp(19px,3vw,26px);}
.portal-groups-heading nav,.portal-groups-sort {display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.portal-groups-columns {display:grid;gap:14px;grid-template-columns:minmax(170px,205px) minmax(0,1fr);align-items:start;}
.portal-groups-side nav,.portal-groups-search {display:grid;gap:6px;}
.portal-groups-search {margin-block-end:12px;}
.portal-groups-search input {width:100%;min-width:0;min-height:40px;padding:6px 9px;border-radius:8px;border:1px solid var(--portal-line);font:inherit;color:var(--portal-ink);background:var(--theme-surface);}
.portal-groups-side nav a,.portal-groups-sort a {padding:5px 8px;border-radius:8px;}
.portal-groups :is(nav a,.portal-groups-button) {text-decoration:none;font-weight:650;}
.portal-groups nav a:is(:hover,:focus-visible,[aria-current]) {background:var(--theme-soft);color:var(--portal-ink);}
.portal-groups-button {display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 12px;border:0;border-radius:8px;font:inherit;background:var(--theme-button);color:var(--theme-button-ink);cursor:pointer;}
.portal-groups-button:is(:hover,:focus-visible) {background:var(--theme-soft);color:var(--portal-ink);}
.portal-groups :is(.portal-group-rows,.portal-group-categories) {margin:10px 0;padding:0;list-style:none;}
.portal-group-rows li {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border-bottom:1px solid var(--portal-line);}
.portal-group-rows li:nth-child(odd) {background:var(--theme-surface);}
.portal-group-rows li a {font-weight:700;}
.portal-group-rows p {margin:3px 0 0;color:var(--theme-muted);}
.portal-group-meta {display:flex;flex-wrap:wrap;gap:5px 8px;font-size:.875rem;}
.portal-group-categories {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:8px;}
.portal-group-categories li {border:1px solid var(--portal-line);border-radius:8px;padding:8px;}
@media(max-width:640px) {.portal-groups-columns{grid-template-columns:minmax(0,1fr);} .portal-groups-side nav{display:flex;flex-wrap:wrap;} .portal-group-rows li{flex-direction:column;align-items:flex-start;}}

.portal-group-create {display:grid;gap:12px;overflow-wrap:anywhere;}
.portal-group-create form {display:grid;gap:10px;min-width:0;}
.portal-group-create h1 {margin:0 0 5px;line-height:1.15;font-size:clamp(28px,5vw,42px);}
.portal-group-create :is(input:not([type=hidden],[type=checkbox],[type=radio]),select,textarea) {width:100%;min-width:0;min-height:40px;padding:8px 10px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}
.portal-group-create fieldset {min-width:0;margin:6px 0;padding:12px;border:1px solid var(--portal-line);border-radius:10px;}
.portal-group-create legend {padding-inline:5px;font-weight:650;}
.portal-group-create :is(.helper,small) {display:block;color:var(--theme-muted);}
.portal-group-create :is(.group-address-field,.two-fields) {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:center;}
.portal-group-create .choice {display:flex;align-items:flex-start;gap:8px;margin-block:7px;}
.portal-group-create .group-actions {display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.portal-group-create .group-actions button {padding:8px 14px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;min-height:40px;}
.portal-group-create .group-actions button:disabled {opacity:.55;}
@media(max-width:600px) {.portal-group-create :is(.group-address-field,.two-fields) {grid-template-columns:minmax(0,1fr);}}

.portal-group-interior,.portal-group-interior-content {display:grid;gap:14px;min-width:0;overflow-wrap:anywhere;}
.portal-group-interior .portal-panel {margin:0;background:var(--theme-card);min-width:0;}
.portal-group-heading h1 {margin:6px 0 0;font-size:clamp(28px,5vw,42px);line-height:1.12;}
.portal-group-interior-grid {display:grid;grid-template-columns:minmax(156px,205px) minmax(0,1fr);gap:14px;align-items:start;}
.portal-group-interior .portal-group-menu {padding:8px;}
.portal-group-menu nav {display:grid;gap:3px;}
.portal-group-menu a {display:block;padding:7px 8px;border-radius:7px;color:var(--portal-ink);text-decoration:underline;}
.portal-group-menu a:is(:hover,:focus-visible,[aria-current=page]) {background:var(--theme-soft);color:var(--portal-accent);}
.portal-group-interior .group-home-layout {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:14px;align-items:start;}
.portal-group-interior .group-home-recommend,.portal-group-interior .group-home-welcome {grid-column:1/-1;}
.portal-group-interior .group-home-right {display:grid;gap:14px;min-width:0;}
.portal-group-interior :is(.group-home-recommend,.group-home-welcome,.group-home-messages,.group-home-tools,.group-home-photos) {padding:clamp(12px,2vw,18px);border-radius:12px;border:1px solid var(--portal-line);background:var(--theme-card);min-width:0;}
.portal-group-interior .group-home-recommend {display:flex;align-items:center;gap:7px;}
.portal-group-interior .group-news-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.portal-group-interior h2 {margin:0 0 7px;font-size:clamp(18px,3vw,24px);}
.portal-group-interior :is(.group-home-empty,.group-home-messages time) {color:var(--theme-muted);}
.portal-group-interior .group-home-messages article {padding-block:9px;border-top:1px solid var(--portal-line);}
.portal-group-interior .group-home-photos figure {margin:8px 0;}
.portal-group-interior .group-home-thumbnail {max-width:100%;height:auto;border-radius:8px;}
.portal-group-interior :is(.group-home-nick-icon,.group-news-heading img) {vertical-align:middle;margin-inline-end:4px;}
@media(max-width:720px) {.portal-group-interior .group-home-layout {grid-template-columns:minmax(0,1fr);}}
@media(max-width:640px) {.portal-group-interior-grid {grid-template-columns:minmax(0,1fr);} .portal-group-menu nav {display:flex;flex-wrap:wrap;}}

.portal-group-interior :is(.sn-group-links,.group-members-page) {padding:clamp(12px,3vw,22px);background:var(--theme-card);border:1px solid var(--portal-line);border-radius:13px;min-width:0;}
.portal-group-interior :is(.group-members-heading,.members-pager,.sn-group-link-actions) {display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:space-between;}
.portal-group-interior .group-members-heading form {display:flex;flex-wrap:wrap;gap:7px;align-items:center;}
.portal-group-interior .group-members-heading br {display:none;}
.portal-group-interior .group-members-heading input {width:min(100%,190px);min-height:39px;padding:6px 8px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}
.portal-group-interior .group-members-heading button {min-height:39px;padding:6px 12px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;cursor:pointer;}
.portal-group-interior .sn-members-table-scroll {overflow:auto;}
.portal-group-interior .members-table {width:100%;border-collapse:collapse;min-width:420px;}
.portal-group-interior .members-table :is(th,td) {text-align:start;padding:7px;border-bottom:1px solid var(--portal-line);}
.portal-group-interior .members-table tbody tr:nth-child(odd) {background:var(--theme-surface);}
.portal-group-interior .members-table img {vertical-align:middle;}
.portal-group-interior .members-pager .disabled {opacity:.65;}
.portal-group-interior .sn-group-link-list {list-style:none;margin:0;padding:0;}
.portal-group-interior .sn-group-link-list li {padding:10px 0;border-block-end:1px solid var(--portal-line);}

.portal-group-interior .group-pictures {min-width:0;padding:clamp(13px,3vw,22px);border:1px solid var(--portal-line);border-radius:13px;background:var(--theme-card);}
.portal-group-interior .group-pictures h1 {margin:0 0 9px;font-size:clamp(26px,4vw,38px);line-height:1.15;}
.portal-group-interior :is(.picture-commands,.album-submit-actions) {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-block:10px;}
.portal-group-interior .picture-commands a {padding:8px 10px;border-radius:8px;background:var(--theme-soft);color:var(--portal-ink);text-decoration:none;}
.portal-group-interior .picture-commands img {vertical-align:middle;margin-inline-end:4px;}
.portal-group-interior .album-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr));gap:10px;}
.portal-group-interior .album-grid figure {margin:0;padding:8px;min-width:0;border-radius:10px;border:1px solid var(--portal-line);background:var(--theme-surface);}
.portal-group-interior .album-grid figure a {display:grid;gap:6px;color:var(--portal-ink);text-decoration:none;font-weight:650;}
.portal-group-interior .sn-album-cover {display:grid;place-items:center;height:100px;background:var(--album-accent,var(--theme-soft));border-radius:8px;overflow:hidden;}
.portal-group-interior .sn-album-cover img:not(.sn-album-placeholder),.portal-group-interior .photo-thumb {width:100%;height:100px;object-fit:cover;border-radius:8px;}
.portal-group-interior .picture-full {margin:10px 0;}
.portal-group-interior .picture-full img {max-width:100%;height:auto;border-radius:8px;}
.portal-group-interior .group-pictures form {display:grid;gap:8px;}
.portal-group-interior .group-pictures label {min-width:0;}
.portal-group-interior .group-pictures :is(input:not([type=hidden],[type=radio],[type=checkbox]),textarea) {width:100%;min-width:0;padding:7px 9px;border:1px solid var(--portal-line);border-radius:8px;color:var(--portal-ink);background:var(--theme-surface);font:inherit;}
.portal-group-interior .group-pictures button {min-height:39px;padding:7px 10px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;justify-self:start;}
.portal-group-interior .album-fields {display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 12px;align-items:start;}
.portal-group-interior .album-colors {display:flex;flex-wrap:wrap;gap:5px;min-width:0;}
.portal-group-interior .album-colors label span {display:inline-block;width:15px;height:15px;border-radius:3px;}
@media(max-width:480px) {.portal-group-interior .album-fields {grid-template-columns:minmax(0,1fr);}}

.portal-group-interior .portal-group-chat {display:grid;gap:10px;min-width:0;}
.portal-group-interior .group-chat-frame {display:block;width:100%;height:max(430px,calc(100dvh - 235px));border:1px solid var(--portal-line);border-radius:10px;background:var(--theme-card);}
.portal-group-chat .group-chat-actions {padding:8px 12px;border-radius:8px;}

.portal-group-interior :is(.group-tools-page,.group-request,.group-form,.sn-group-settings) {min-width:0;padding:clamp(12px,3vw,20px);border:1px solid var(--portal-line);border-radius:12px;background:var(--theme-card);}
.portal-group-interior .group-tools-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px;}
.portal-group-interior .group-tools-grid > div {padding:10px;border:1px solid var(--portal-line);border-radius:9px;background:var(--theme-surface);}
.portal-group-interior .group-tools-grid p {margin:5px 0 0;color:var(--theme-muted);}
.portal-group-interior .group-actions {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.portal-group-interior :is(.group-actions button,.group-request button) {min-height:40px;padding:7px 11px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;cursor:pointer;}
.portal-group-interior .group-request textarea {display:block;min-width:0;width:100%;margin-block:6px 10px;padding:8px 10px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}

.portal-group-interior .forum-shell {min-width:0;padding:clamp(12px,3vw,22px);border:1px solid var(--portal-line);border-radius:13px;background:var(--theme-card);}
.portal-group-interior .forum-shell h1 {margin:0 0 8px;font-size:clamp(24px,4vw,36px);line-height:1.16;}
.portal-group-interior :is(.forum-toolbar,.forum-pager,.forum-search,.forum-message-actions,.forum-message-meta) {display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-block:8px;}
.portal-group-interior .forum-toolbar a {padding:6px 8px;border-radius:7px;background:var(--theme-soft);color:var(--portal-ink);text-decoration:none;}
.portal-group-interior .forum-search input {max-width:100%;min-width:0;min-height:38px;padding:6px 8px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}
.portal-group-interior .forum-shell button {min-height:38px;padding:6px 9px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;}
.portal-group-interior .forum-table {width:100%;border-collapse:collapse;margin-block:10px;table-layout:fixed;}
.portal-group-interior .forum-table :is(th,td) {padding:7px 5px;text-align:start;border-bottom:1px solid var(--portal-line);overflow-wrap:anywhere;}
.portal-group-interior .forum-table tbody tr:nth-child(odd) {background:var(--theme-surface);}
.portal-group-interior .forum-threads :is(th,td):first-child {width:40%;}
.portal-group-interior .forum-message {padding:12px;margin-block:12px;border:1px solid var(--portal-line);border-radius:10px;background:var(--theme-surface);}
.portal-group-interior .forum-message-meta {color:var(--theme-muted);font-size:.875rem;}
.portal-group-interior .forum-message-body {overflow:auto;}
.portal-group-interior .forum-message-body img {max-width:100%;height:auto;}

.portal-group-interior :is(.forum-editor,.forum-board-form) {display:grid;gap:10px;min-width:0;}
.portal-group-interior :is(.forum-format-bar,.forum-editor-actions) {display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0;}
.portal-group-interior .forum-format-bar {padding:7px;border:1px solid var(--portal-line);border-radius:9px;background:var(--theme-soft);}
.portal-group-interior .forum-format-bar button {min-height:32px;background:var(--theme-card);color:var(--portal-ink);padding:4px 8px;}
.portal-group-interior .forum-editor-fields {display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px 10px;align-items:center;}
.portal-group-interior :is(.forum-editor,.forum-board-form) :is(input:not([type=hidden],[type=checkbox]),select,textarea,[contenteditable]) {min-width:0;padding:7px 9px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}
.portal-group-interior :is(#forum-rich-body,#forum-body) {min-height:200px;overflow-wrap:anywhere;}
.portal-group-interior :is(.forum-editor,.forum-board-form) [hidden] {display:none!important;}
@media(max-width:480px) {.portal-group-interior .forum-editor-fields {grid-template-columns:minmax(0,1fr);}}

.portal-group-interior .portal-custom-pages {min-width:0;overflow-wrap:anywhere;}
.portal-custom-pages .group-form {padding:0;border:0;background:transparent;}
.portal-custom-pages .group-custom-page {padding:14px;border:1px solid var(--portal-line);border-radius:9px;color:#25212a;overflow:auto;}
.portal-custom-pages .group-custom-page img {max-width:100%;height:auto;}
.portal-custom-pages .group-menu-configure,.portal-custom-pages .group-menu-configure form {display:grid;gap:10px;grid-template-columns:minmax(0,1fr) auto;align-items:start;}
.portal-custom-pages .group-menu-configure div {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.portal-custom-pages :is(input:not([type=hidden]),textarea,select,[contenteditable]) {max-width:100%;min-width:0;padding:8px 10px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);color:var(--portal-ink);font:inherit;}
.portal-custom-pages :is(textarea,[contenteditable],input:not([type=hidden],[type=color])) {width:100%;}
.portal-custom-pages button {min-height:36px;padding:6px 10px;border:0;border-radius:8px;background:var(--theme-button);color:var(--theme-button-ink);font:inherit;}
.portal-custom-pages button:disabled {opacity:.55;}
.portal-custom-pages dialog {max-width:calc(100vw - 32px);border:1px solid var(--portal-line);border-radius:12px;background:var(--theme-card);color:var(--portal-ink);}
@media(max-width:520px){.portal-custom-pages .group-menu-configure,.portal-custom-pages .group-menu-configure form{grid-template-columns:minmax(0,1fr);}}

.portal-group-interior :is(.group-member-profile,.group-transfer-warning) {min-width:0;padding:clamp(13px,3vw,23px);border:1px solid var(--portal-line);border-radius:13px;background:var(--theme-card);}
.portal-group-interior .group-member-profile {display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:14px;}
.portal-group-interior .sn-profile-identity {display:flex;align-items:center;gap:10px;margin-block-end:12px;}
.portal-group-interior .sn-profile-identity :is(h1,p) {margin:0;}
.portal-group-interior .sn-profile-avatar img {display:block;object-fit:cover;border-radius:10px;}
.portal-group-interior .group-profile-details {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:8px;}
.portal-group-interior :is(.group-profile-details > div,.group-member-profile aside) {padding:9px;border:1px solid var(--portal-line);border-radius:8px;background:var(--theme-surface);min-width:0;}
.portal-group-interior .profile-wide {grid-column:1/-1;}
.portal-group-interior :is(.group-member-profile,.group-transfer-warning) form {display:flex;flex-wrap:wrap;align-items:center;gap:7px;}
.portal-group-interior :is(.group-member-profile select,.group-member-profile button,.group-transfer-warning button) {min-width:0;max-width:100%;min-height:38px;padding:6px 9px;border-radius:8px;border:1px solid var(--portal-line);color:var(--portal-ink);background:var(--theme-soft);font:inherit;}
.portal-group-interior :is(.group-member-profile button,.group-transfer-warning button) {background:var(--theme-button);color:var(--theme-button-ink);cursor:pointer;}
@media(max-width:680px){.portal-group-interior .group-member-profile {grid-template-columns:minmax(0,1fr);}}

.portal-groups a { text-decoration: none; }
.portal-group-rows { display: grid; gap: 8px; }
.portal-group-rows li {
  padding: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
}
.portal-group-rows li a:is(:hover,:focus-visible),
.portal-group-categories a:is(:hover,:focus-visible) { color: var(--portal-ink); }
.portal-group-categories li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: .35em;
  min-height: 48px;
}
.portal-group-categories li a { min-width: 0; overflow-wrap: anywhere; }
.portal-groups-illustration {
  position: relative;
  margin: 12px 0 0;
  overflow: hidden;
  border-radius: 12px;
  min-height: 235px;
}
.portal-groups-illustration img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 86% center;
}
@media (min-width: 641px) {
  .portal-groups-side:has(.portal-groups-illustration) {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
  .portal-groups-illustration { flex: 1; }
  .portal-groups-illustration img { position: absolute; inset: 0; }
}
@media (max-width: 640px) {
  .portal-groups-illustration { min-height: 0; }
  .portal-groups-illustration img { max-height: 155px; object-position: center 63%; }
}

.portal-group-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 25%);
  align-items: center;
}
.portal-group-rows li > div { min-width: 0; overflow-wrap: anywhere; }
.portal-group-meta { display: grid; gap: 4px; justify-items: end; text-align: right; }
.portal-group-member-count { font-variant-numeric: tabular-nums; }
.portal-group-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.portal-group-rating {
  display: inline-flex;
  align-items: center;
  position: relative;
  color: var(--portal-accent);
  cursor: help;
}
.portal-group-rating-tip {
  display: none;
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + 5px);
  inset-inline-start: 0;
  width: max-content;
  max-width: 145px;
  padding: 5px 8px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--theme-card);
  color: var(--portal-ink);
  font-size: .8rem;
  text-align: start;
}
.portal-group-rating:is(:hover,:focus) .portal-group-rating-tip { display: block; }
.portal-group-category-count {
  justify-self: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.portal-group-categories li { display: block; padding: 0; }
.portal-group-categories li > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: .5em;
  min-height: 48px;
  height: 100%;
  padding: 8px;
  border-radius: 7px;
  color: var(--portal-ink);
  transition: background-color 150ms ease, color 150ms ease;
}
.portal-group-categories li > a:is(:hover, :focus-visible) {
  background-color: var(--theme-soft);
  color: var(--portal-accent);
}
.portal-group-rating svg { color: inherit; flex: none; }
.portal-group-rating-key { fill: var(--theme-card); }

.portal-groups .portal-group-rating { color: #926012; }
.portal-group-rating svg > path:nth-child(2) { fill: #daa638; stroke: currentColor; stroke-width: .8; }
.portal-group-rating svg .portal-group-rating-key { fill: #593609; }
:root[data-portal-theme="graphite"] .portal-groups .portal-group-rating { color: #f6ce6d; }

.portal-group-activity-rows li {
  grid-template-columns: minmax(0, 1fr) minmax(76px, 22%) 48px;
}
.portal-group-activity { justify-self: end; display: block; }
.portal-group-activity img { display: block; width: 48px; height: 40px; object-fit: contain; }
.portal-group-activity img.inactive { opacity: .5; }
.portal-groups-list-heading, .portal-groups-pages-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.portal-groups-list-heading h2 { margin: 0; }
.portal-groups-pages-bottom { justify-content: flex-end; }
@media (max-width: 480px) {
  .portal-group-activity-rows li { grid-template-columns: minmax(0, 1fr) 76px 36px; gap: 6px; }
  .portal-group-activity img { width: 36px; height: 30px; }
}

.portal-group-interior .sn-members-table-scroll {
  border: 1px solid var(--portal-line);
  border-radius: 13px;
  background: var(--theme-card);
}
.portal-group-interior .members-table thead { background: var(--theme-soft); }
.portal-group-interior .members-table tbody tr:last-child td { border-block-end: 0; }
.portal-group-interior .members-table :is(th,td):first-child { text-align: center; }
.members-table .group-member-presence-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--theme-card);
  color: var(--portal-accent);
}
.members-table .group-member-presence-sort:is(:hover,:focus-visible) {
  background: var(--theme-soft);
}
.group-member-presence-chevron { display: none; }
.group-member-presence-sort[data-sort] .group-member-presence-chevron { display: block; }
.group-member-presence-sort[data-sort="asc"] .group-member-presence-chevron { transform: rotate(180deg); }
.group-member-presence {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 30px;
  height: 25px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--theme-card);
}
.group-member-presence[data-active="0"] img { filter: grayscale(1); opacity: .65; }
.group-member-presence::after {
  content: "";
  position: absolute;
  inset-inline-end: 2px;
  inset-block-end: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--theme-card);
  background: #8c8293;
}
.group-member-presence[data-active="1"]::after { background: #26965c; }

.portal-group-interior a { text-decoration: none; }
.portal-group-interior .portal-group-menu a[aria-current="page"] { font-weight: 700; }

.portal-group-interior :is(.forum-boards,.forum-threads) {
  border: 1px solid var(--portal-line);
  border-radius: 13px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--theme-card);
}
.portal-group-interior :is(.forum-boards,.forum-threads) thead { background: var(--theme-soft); }
.portal-group-interior :is(.forum-boards,.forum-threads) tbody tr:last-child td { border-block-end: 0; }

.scn-group-tools-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 34%);
  align-items: center;
  gap: 1rem;
  margin-block-end: 1rem;
}
.scn-group-tools-header img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
}
@media (max-width: 480px) {
  .scn-group-tools-header { grid-template-columns: minmax(0, 1fr); }
  .scn-group-tools-header img { max-height: 9rem; object-fit: cover; object-position: 50% 53%; }
}

.group-tools-grid .scn-tool-icon {
  display: inline-grid;
  place-items: center;
  position: relative;
  vertical-align: -.35em;
  margin-inline-end: .48em;
  inline-size: 1.65em;
  block-size: 1.65em;
  border-radius: .55em;
  background: #eedffb;
  color: #563477;
}
.scn-tool-icon::before,.scn-tool-icon::after { content: ''; position: absolute; box-sizing: border-box; }
.scn-tool-icon[data-tool-icon=members]::before,.scn-tool-icon[data-tool-icon=profile]::before {
  width: .36em; height: .36em; top: .34em; border-radius: 50%; background: currentColor;
}
.scn-tool-icon[data-tool-icon=members]::before { left: .36em; box-shadow: .56em .08em 0 currentColor; }
.scn-tool-icon[data-tool-icon=members]::after,.scn-tool-icon[data-tool-icon=profile]::after {
  width: .62em; height: .35em; bottom: .38em; background: currentColor; border-radius: .3em .3em .1em .1em;
}
.scn-tool-icon[data-tool-icon=members]::after { left: .23em; box-shadow: .56em .08em 0 currentColor; }
.scn-tool-icon[data-tool-icon=preferences],.scn-tool-icon[data-tool-icon=cover] { background:#fce5d8;color:#813b30; }
.scn-tool-icon[data-tool-icon=preferences]::before,.scn-tool-icon[data-tool-icon=settings]::before {
  width:.88em;height:.11em;background:currentColor;box-shadow:0 -.28em 0 currentColor,0 .28em 0 currentColor;
}
.scn-tool-icon[data-tool-icon=preferences]::after,.scn-tool-icon[data-tool-icon=settings]::after {
  width:.23em;height:.23em;border-radius:50%;background:currentColor;box-shadow:-.23em -.28em 0 currentColor,.23em .28em 0 currentColor;
}
.scn-tool-icon[data-tool-icon=requests],.scn-tool-icon[data-tool-icon=menu] { background:#dff1ee;color:#1b5a56; }
.scn-tool-icon[data-tool-icon=requests]::before,.scn-tool-icon[data-tool-icon=menu]::before,.scn-tool-icon[data-tool-icon=cover]::before {
  width:.9em;height:.72em;border:.1em solid currentColor;border-radius:.15em;
}
.scn-tool-icon[data-tool-icon=requests]::after { width:.42em;height:.42em;top:.43em;border-right:.1em solid currentColor;border-bottom:.1em solid currentColor;transform:rotate(45deg); }
.scn-tool-icon[data-tool-icon=menu]::after { width:.51em;height:.09em;background:currentColor;box-shadow:0 .16em 0 currentColor,0 -.16em 0 currentColor; }
.scn-tool-icon[data-tool-icon=cover]::after { width:.42em;height:.24em;bottom:.54em;left:.64em;transform:rotate(-33deg);border-top:.12em solid currentColor;border-right:.12em solid currentColor; }
.scn-tool-icon[data-tool-icon=leave]::before { width:.44em;height:.8em;left:.37em;border:.1em solid currentColor;border-right:0;border-radius:.12em 0 0 .12em; }
.scn-tool-icon[data-tool-icon=leave]::after { width:.4em;height:.4em;right:.37em;transform:rotate(45deg);border-right:.12em solid currentColor;border-top:.12em solid currentColor; }
.scn-tool-icon[data-tool-icon=settings] { background:#faeac8;color:#705020; }

.portal-group-interior .scn-editor-toolbar {display:grid;gap:2px;padding:4px;border:1px solid var(--portal-line);border-radius:5px 5px 0 0;background:var(--theme-surface);margin:0 0 -11px;}
.scn-editor-toolbar .scn-editor-row {display:flex;gap:2px;align-items:center;flex-wrap:wrap;min-width:0;}
.portal-group-interior .scn-editor-toolbar button.scn-editor-icon {position:relative;display:inline-grid;place-items:center;min-width:25px;width:25px;height:23px;padding:0;color:var(--portal-ink);background:var(--theme-surface);border:1px solid var(--portal-line);border-radius:3px;box-shadow:inset 0 1px 0 color-mix(in srgb,var(--portal-ink) 12%,transparent);font:600 13px/1 Georgia,serif;}
.portal-group-interior .scn-editor-toolbar button:hover {background:color-mix(in srgb,var(--portal-ink) 12%,var(--theme-surface));}
.scn-editor-icon[data-format=i] {font-style:italic!important;}
.scn-editor-icon[data-format=u] {text-decoration:underline;}
.scn-editor-icon[data-format=s] {text-decoration:line-through;font-size:10px!important;}
.scn-editor-toolbar .scn-editor-select {display:inline-flex;align-items:center;gap:4px;padding-inline-end:4px;font-size:12px;font-weight:650;}
.portal-group-interior .scn-editor-toolbar .scn-editor-select select {height:23px;padding:1px 3px;border-radius:3px;font-size:12px;max-width:122px;}
.scn-editor-toolbar [data-format]::before,.scn-editor-toolbar [data-format]::after {position:absolute;box-sizing:border-box;}
.scn-editor-icon:is([data-format=left],[data-format=center],[data-format=right])::before {content:'';height:12px;width:13px;background:linear-gradient(currentColor,currentColor) top/100% 1px,linear-gradient(currentColor,currentColor) var(--scn-align,center) 4px/65% 1px,linear-gradient(currentColor,currentColor) center 8px/100% 1px,linear-gradient(currentColor,currentColor) var(--scn-align,center) bottom/65% 1px;background-repeat:no-repeat;}
.scn-editor-icon[data-format=left] {--scn-align:left;}.scn-editor-icon[data-format=right] {--scn-align:right;}
.scn-editor-icon:is([data-format=ul],[data-format=ol])::before {content:'';height:1px;width:8px;left:10px;background:currentColor;box-shadow:0 -4px,0 4px;}
.scn-editor-icon[data-format=ul]::after {content:'';height:2px;width:2px;left:5px;background:currentColor;box-shadow:0 -4px,0 4px;}
.scn-editor-icon[data-format=ol]::after {content:'1 2';width:4px;left:4px;font:7px/6px system-ui;}
.scn-editor-icon[data-format=table]::before {content:'';width:14px;height:12px;border:1px solid currentColor;background:linear-gradient(currentColor,currentColor) center/1px 100% no-repeat,linear-gradient(currentColor,currentColor) center/100% 1px no-repeat;}
.scn-editor-icon[data-format=hr]::before {content:'';width:13px;border-top:2px solid currentColor;}
.scn-editor-icon[data-format=clear]::before {content:'';width:12px;height:7px;border:1px solid currentColor;border-radius:2px;transform:rotate(-35deg);}
.scn-editor-icon[data-format=a]::before,.scn-editor-icon[data-format=a]::after {content:'';width:9px;height:6px;border:1px solid currentColor;border-radius:4px;transform:rotate(-35deg);}
.scn-editor-icon[data-format=a]::before {margin:-3px -5px 0 0;}.scn-editor-icon[data-format=a]::after {margin:3px 5px 0 0;}
.scn-editor-icon[data-format=image]::before {content:'';width:14px;height:11px;border:1px solid currentColor;border-radius:2px;}
.scn-editor-icon[data-format=image]::after {content:'';width:6px;height:6px;border-left:1px solid currentColor;border-top:1px solid currentColor;transform:rotate(45deg);margin-top:4px;}
.portal-group-interior #forum-rich-body {border-start-start-radius:0;border-start-end-radius:0;}

.portal-group-interior .scn-editor-toolbar {background:#e6e5e2;border-color:#b9b7b2;color:#202124;margin-block-end:0;}
.portal-group-interior .scn-editor-toolbar button.scn-editor-icon {color:#202124;background:linear-gradient(#fff,#e7e6e2);border-color:#b9b7b2;}
.portal-group-interior .scn-editor-toolbar button:hover {background:#dbe9fc;border-color:#789bc9;}
.portal-group-interior .scn-editor-toolbar button:active {background:#afc9ed;box-shadow:inset 0 1px 3px #6c8fbd;}
.portal-group-interior .scn-editor-toolbar .scn-editor-select select {background:#fff;color:#202124;border-color:#b9b7b2;}
.portal-group-interior .scn-editor-toolbar label:has(input[type=color]) {display:inline-flex;align-items:center;gap:3px;height:23px;padding-inline:3px;background:#f4f3ef;border:1px solid #b9b7b2;border-radius:3px;}
.portal-group-interior .scn-editor-toolbar input[type=color] {width:20px;height:17px;min-width:20px;padding:0;border:0;border-radius:0;background:transparent;}
.scn-editor-modes {display:flex;flex-wrap:wrap;gap:6px;}

/* Compact classic formatting controls for Groups. */
.portal-group-interior .scn-editor-toolbar {background:#eee;border-color:#b6b6b6;gap:2px;padding:3px;}
.portal-group-interior .scn-editor-toolbar button.scn-editor-icon {
  width:23px;min-width:23px;height:21px;border-radius:0;
  border-color:#fff #aaa #aaa #fff;background:linear-gradient(#fff,#e6e6e6);
  color:#23364c;
}
.portal-group-interior .scn-editor-toolbar button.scn-editor-icon:hover {background:#dceaff;border-color:#8fb1dd;}
.portal-group-interior .scn-editor-toolbar button.scn-editor-icon:active {background:#c1d8f6;border-color:#789ac5 #fff #fff #789ac5;}
.portal-group-interior .scn-editor-toolbar button.scn-editor-icon:disabled {opacity:.45;}
.portal-group-interior .scn-editor-toolbar .scn-editor-icon::before,
.portal-group-interior .scn-editor-toolbar .scn-editor-icon::after {content:none;}
.scn-editor-art {display:block;width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.15;stroke-linecap:round;stroke-linejoin:round;}
.scn-editor-icon:is([data-format=indent],[data-format=outdent],[data-format=a],[data-format=ol],[data-format=ul]) .scn-editor-art {color:#275ba0;}
.scn-editor-icon[data-format=image] .scn-editor-art {color:#2c7155;}
.portal-group-interior .scn-editor-toolbar .scn-editor-swatch {
  position:relative;display:inline-grid;place-items:center;width:23px;height:21px;padding:0;
  border:1px solid;border-color:#fff #aaa #aaa #fff;border-radius:0;background:#f4f4f4;
}
.scn-editor-swatch::after {content:'';position:absolute;width:13px;height:3px;bottom:1px;background:var(--editor-color);pointer-events:none;}
.portal-group-interior .scn-editor-toolbar .scn-editor-swatch input {
  position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;
}
.scn-editor-swatch:focus-within {outline:2px solid #265a9f;outline-offset:-2px;}
.portal-group-interior .scn-editor-toolbar .scn-editor-select select {height:21px;border-radius:0;}

/* Group menu selection follows the portal theme. */
.portal-custom-pages #group-menu-selection select {
  padding:4px;border-radius:12px;outline-offset:0;
}
.portal-custom-pages #group-menu-selection select:focus-visible {
  outline:none;box-shadow:inset 0 0 0 2px var(--portal-accent, currentColor);
}
.portal-custom-pages #group-menu-selection select option {
  padding:7px 9px;border-radius:6px;
}
.portal-custom-pages #group-menu-selection select option:checked {
  background:var(--theme-soft);color:var(--portal-ink);font-weight:650;
}
.portal-custom-pages :is(#forum-rich-body,#forum-body) {
  min-height:clamp(250px,42vh,420px);
}
@media(max-width:520px){.portal-custom-pages :is(#forum-rich-body,#forum-body){min-height:250px;}}

.portal-group-menu nav a.scn-group-subpage { margin-inline-start:14px; border-inline-start:2px solid var(--portal-line); }
