/* Shockwve — 2004–2007 computer / gadget look. Not a modern dashboard. */

:root {
  --xp-blue: #245edb;
  --xp-blue-dark: #1941a5;
  --xp-title: #0054e3;
  --xp-face: #ece9d8;
  --xp-face-2: #d4d0c8;
  --xp-green: #3c8d0d;
  --ink: #111;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  font-size: 13px;
}

body {
  background:
    linear-gradient(#7eb3e0 0%, #5b9bd5 42%, #87c15a 42%, #3d7c2a 100%);
  background-attachment: fixed;
}

a { color: #003399; }
a:hover { color: #cc0000; }

code, .filename {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

#taskbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  height: auto;
  padding: 0 8px;
  color: #fff;
  background: linear-gradient(#3c81f3, var(--xp-blue) 12%, var(--xp-blue-dark));
  border-bottom: 1px solid #0831d9;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.start-btn {
  background: linear-gradient(#7cc14a, var(--xp-green));
  border: 1px solid #2a6a08;
  border-radius: 0 12px 12px 0;
  padding: 4px 14px 4px 10px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #265a08;
  letter-spacing: 0.5px;
}

.task-nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; min-width: 0; }

.nav-link {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 8px;
  border: 1px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,.12); }
.nav-link.active {
  background: rgba(0,0,0,.2);
  border-color: #89b0ff #003399 #003399 #89b0ff;
}

.tray {
  background: linear-gradient(#22b0d0, #0a7ea3);
  padding: 4px 10px;
  border-left: 1px solid #66d4ee;
  white-space: nowrap;
}

.desktop {
  max-width: 1100px;
  margin: 16px auto 40px;
  padding: 0 12px;
}

.window {
  background: var(--xp-face);
  border: 2px solid #0055ea;
  box-shadow: 4px 4px 0 rgba(0,0,0,.25);
}

.titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 0 #003399;
  background: linear-gradient(90deg, #0a246a, var(--xp-title) 8%, #3f8cff 55%, #0a246a);
}

.win-btns span {
  display: inline-block;
  width: 18px;
  height: 16px;
  margin-left: 3px;
  text-align: center;
  line-height: 14px;
  font-size: 11px;
  background: var(--xp-face);
  color: #000;
  border: 1px solid #fff;
  box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 #404040;
}

.window-body { padding: 10px 12px 14px; }

#status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 10px;
  padding: 6px 8px;
  background: #fff;
  border: 2px inset #fff;
}

.btn {
  font-family: inherit;
  font-size: 12px;
  padding: 3px 12px;
  background: var(--xp-face-2);
  border-width: 2px;
  border-style: solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}
.btn:active { border-color: #404040 #fff #fff #404040; }
.btn.primary {
  background: #3d6dad;
  color: #fff;
  border-color: #9cf #123 #123 #9cf;
}
.btn.danger {
  background: #6b1;
  color: #030;
  font-weight: bold;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hero {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.logo-box {
  background: #111;
  color: #9ff;
  text-align: center;
  padding: 18px 8px;
  border: 3px outset #666;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 2px;
}
.logo-box span { display: block; color: #fc0; font-size: 11px; letter-spacing: 1px; }

/* Logo slot: the site owner's own 600x150 image, shown at ~300x75 on
   desktop (double the old 150x38) and capped by max-width on small
   screens. Never stretched. White bar behind the image (overrides
   .logo-box's #111 since this rule comes later at equal specificity). */
.logo-slot { display: flex; align-items: center; justify-content: center; background: #fff; }
.logo-slot-img { display: block; width: 300px; height: auto; max-width: 100%; }

.icon-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.desk-icon {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 2px outset #fff;
  padding: 10px;
  text-align: center;
}
.desk-icon:hover { background: #d4e4ff; }
.desk-icon .glyph { font-size: 28px; display: block; margin-bottom: 4px; }

.panel {
  background: #fff;
  border: 2px inset #fff;
  padding: 8px;
  margin-top: 10px;
}

.tiny { color: #555; font-size: 11px; }
.hist-note {
  font-size: 10px;
  color: #555;
  background: #fff8c4;
  border: 1px solid #c9b44a;
  padding: 0 4px;
  margin-left: 4px;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #808080;
}
table.grid th {
  text-align: left;
  background: var(--xp-face-2);
  border: 1px solid #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  padding: 4px 6px;
}
table.grid td {
  padding: 4px 6px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px;
  background: var(--xp-face-2);
  border: 1px solid #808080;
}
.toolbar input, .toolbar select {
  font-family: inherit;
  font-size: 12px;
  padding: 3px;
}

@media (max-width: 760px) {
  .pod-stage, .hero { grid-template-columns: 1fr; }
}

/* ShockTunes */
.tunes-app { background: #cfd6de; }

/* LemonWire */
.lemon-skin {
  background: #2a2a20;
  color: #d8d8c0;
}
.lemon-skin .titlebar {
  background: linear-gradient(90deg, #5a5a10, #c8c830);
  color: #111;
  text-shadow: none;
}
.lemon-skin a { color: #ef6; }

/* Welcome / Auth Forms */
.auth-form { text-align: center; }
.auth-form-inner { text-align: left; margin-top: 12px; }
.field-row { margin-bottom: 10px; }
.field-row label { display: block; margin-bottom: 3px; font-weight: bold; font-size: 12px; }
.field-row input[type="email"],
.field-row input[type="password"],
.field-row input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 12px;
  border: 2px inset #fff;
  background: #fff;
}
.field-hint { display: block; font-size: 10px; color: #666; margin-top: 2px; }
.btn-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.auth-links { margin-top: 12px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: #003399; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: #cc0000; }
.error-msg { color: #c00; background: #ffecec; border: 1px solid #fcc; padding: 6px 8px; margin: 8px 0; }
.success-msg { color: #060; background: #e8ffe8; border: 1px solid #cfc; padding: 6px 8px; margin: 8px 0; }
.disclaimer { margin-top: 16px; color: #666; }

.disclaimer {
  margin-top: 12px;
  padding: 8px;
  background: #fff8c4;
  border: 1px solid #aa8;
  font-size: 11px;
}

/* =====================================================================
   BUILD 2 — small animations, mobile support
   Everything below is additive. Nothing above this line was removed.
   ===================================================================== */

/* ---- Small animations --------------------------------------------- */
@keyframes swkfw-flicker { 0% { opacity: .25 } 20% { opacity: 1 } 35% { opacity: .45 } 55% { opacity: 1 } 100% { opacity: 1 } }

@media (prefers-reduced-motion: no-preference) {
  .logo-box { animation: swkfw-flicker .7s steps(2, end) 1; }
  .btn { transition: transform .08s ease; }
  .btn:active:not(:disabled) { transform: translateY(1px); }
  .nav-link { transition: background .12s ease; }
  .start-btn { transition: transform .08s ease; }
  .start-btn:active { transform: translateY(1px); }
}

/* ---- Mobile / iPhone support -------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; overscroll-behavior-y: contain; }
button, a, input, select, .nav-link, .desk-icon, .cw, .swatch { touch-action: manipulation; }

@media (max-width: 640px) {
  .desktop { margin: 10px auto 28px; padding: 0 8px; }
  #taskbar { height: auto; flex-wrap: nowrap; padding: 5px 6px; gap: 6px; }
  .start-btn { padding: 6px 10px; font-size: 12px; }
  .task-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .task-nav::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; padding: 9px 10px; }
  .tray { font-size: 11px; padding: 5px 7px; }
  .titlebar { font-size: 12px; }
  .window-body { padding: 8px 8px 12px; }
  .btn { font-size: 13px; min-height: 34px; padding: 7px 12px; }
  .toolbar input, .toolbar select, #lib-q { font-size: 16px; }
}

/* Stacked "card" tables on phones */
@media (max-width: 640px) {
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid tr { background: #fff; border: 1px solid #808080; margin-bottom: 8px; }
  table.grid td { padding: 4px 6px; }
  table.grid td { border-bottom: 1px dotted #ccc; padding: 6px 8px; }
  table.grid td:last-child { border-bottom: 0; }
  table.grid td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 76px;
    font-weight: bold;
    color: #444;
  }
}

/* =====================================================================
   ShockSpace (social.html) — added alongside the existing XP theme.
   Uses the same panel/button/table vocabulary as the rest of the site so
   ShockSpace reads as part of Shockwve rather than a separate product.
   ===================================================================== */

.ss-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 10px 0;
}
.ss-toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
  font-family: inherit;
  font-size: 14px;
  padding: 6px 8px;
  border: 2px inset #fff;
  background: #fff;
}
.ss-toolbar .btn {
  text-decoration: none;
  white-space: nowrap;
}

.ss-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
  align-items: start;
}
.ss-col { min-width: 0; }

.ss-me-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ss-me-head h3 { margin: 0; }

.ss-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 2px outset #fff;
  background: linear-gradient(135deg, #7cc14a, #2f6f1a);
  font-size: 18px;
  line-height: 1;
}
.ss-avatar.big {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
  font-size: 30px;
}

/* Uploaded profile picture (a Storage URL instead of an emoji glyph). */
.ss-avatar.has-photo { padding: 0; background: #fff; overflow: hidden; }
.ss-avatar.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ss-verified { color: #0a5ea8; font-weight: bold; }

.ss-bio {
  background: #ffffcc;
  border: 1px solid #d8d070;
  padding: 6px 8px;
  margin: 8px 0;
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.ss-mood { font-size: 12px; color: #333; margin: 6px 0; }
.ss-shocking { font-size: 12px; color: #063; margin: 6px 0; }

.shock-addr {
  font-family: "Courier New", monospace;
  background: #e8f0ff;
  border: 1px solid #9cf;
  padding: 0 3px;
}

.ss-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ss-badge {
  background: #fff3c4;
  border: 1px solid #c8a83c;
  font-size: 11px;
  padding: 2px 6px;
}

.ss-dir-row,
.ss-top-row,
.ss-req,
.ss-mail,
.ss-wall-post {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px dotted #b8b8b8;
  min-width: 0;
}
.ss-wall-post { align-items: flex-start; }
.ss-top-name { flex: 1; min-width: 0; word-wrap: break-word; overflow-wrap: anywhere; }
.ss-rank {
  width: 18px;
  text-align: right;
  font-weight: bold;
  color: #666;
  font-size: 12px;
}
.ss-req { flex-wrap: wrap; }
.ss-pending h4 { margin: 8px 0 2px; font-size: 12px; }

.tiny-btn {
  font-size: 11px;
  padding: 3px 7px;
  white-space: nowrap;
}

.ss-wall-form textarea,
#ss-compose textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 6px;
  border: 2px inset #fff;
  background: #fff;
  box-sizing: border-box;
  resize: vertical;
}
#ss-wall-list { margin-top: 8px; }
.ss-wall-body {
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  background: #f4f4f4;
  border-left: 3px solid #7cc14a;
  padding: 4px 6px;
  margin-top: 3px;
}

.ss-mail-tabs { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.ss-mail { flex-direction: column; align-items: stretch; }
.ss-mail-head { font-size: 13px; }
.ss-mail.unread { background: #fffbe0; }
.ss-mail-body {
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin: 4px 0;
}
.ss-new {
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  padding: 0 4px;
  font-weight: bold;
}

.badge {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  border-radius: 8px;
  font-size: 11px;
  padding: 0 5px;
  margin-left: 3px;
}

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.avatar-picker .tiny-btn { font-size: 16px; line-height: 1.2; padding: 6px 8px; }

/* In-world toast, styled like a classic dialog rather than a modern snackbar */
#shock-toast-host {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.shock-toast {
  background: #ffffe1;
  border: 2px outset #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  animation: swkfw-toast-in .18s ease-out;
}
.shock-toast.bad { background: #ffecec; border-color: #fc9c9c; }

@keyframes swkfw-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .shock-toast { animation: none; }
}

/* ---- Mobile: single column, touch-sized targets, no sideways scroll ---- */
@media (max-width: 760px) {
  /* Keep the topbar one row on small screens: the nav scrolls sideways. */
  .task-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ss-layout { grid-template-columns: 1fr; }
  .ss-toolbar .btn { flex: 1 1 auto; text-align: center; }
  .ss-mail-tabs .btn { flex: 1 1 auto; text-align: center; }
  .tiny-btn { padding: 8px 10px; font-size: 12px; }
  .ss-dir-row, .ss-top-row { flex-wrap: wrap; }
  .ss-toolbar input[type="search"] { font-size: 16px; }
  #shock-toast-host { bottom: 10px; }
}

/* Notch / home-indicator safe areas */
@supports (padding: env(safe-area-inset-left)) {
  #taskbar {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .desktop {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  body { padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Administration panel ---------- */

.admin-shell { padding-bottom: 60px; }
}

/* =====================================================================
   Account display in the taskbar: existing ShockSpace profile avatar +
   username. No second identity system.
   ===================================================================== */

.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
  padding: 2px 8px 2px 2px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font: inherit;
  font-size: 12px;
}
.nav-account:hover,
.nav-account:focus-visible { background: rgba(255, 255, 255, .18); outline: none; }

.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;          /* shows the whole profile picture */
  border: 1px solid rgba(255, 255, 255, .75);
  background: #fff;
  flex: 0 0 auto;
}
.nav-avatar-initials {
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  color: #123a86;
  background: linear-gradient(180deg, #fff, #d7e4ff);
}
.nav-avatar-glyph {
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  line-height: 1;
  background: #fff;
  overflow: hidden;
}
.nav-account-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nav-account-name { display: none; }
  .nav-account { padding: 2px; }
}
/* =====================================================================
   SIM (Shock Instant Messenger) — same Y2K chrome as ShockSpace.
   Two columns on desktop (buddy/conversation list + chat window),
   stacked on phones. */
.sim-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
  align-items: start;
}
.sim-side { min-width: 0; }
.sim-side .panel:first-child { margin-top: 0; }

.sim-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px dotted #b8b8b8;
  cursor: pointer;
  min-width: 0;
}
.sim-row:hover { background: #eef4ff; }
.sim-row.active { background: #d4e4ff; }

.sim-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: #9a9a9a;
  border: 1px solid #444;
}
.sim-dot.on {
  background: var(--xp-green);
  border-color: #1e4a06;
}

.sim-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.sim-preview {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.sim-find { display: flex; gap: 6px; }
.sim-find input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 13px;
  padding: 5px;
  border: 2px inset #fff;
  background: #fff;
}

.sim-chat { min-width: 0; }
.sim-chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 2px inset #fff;
}
.sim-messages {
  height: 340px;
  overflow-y: auto;
  background: #f4f4f4;
  border: 2px inset #fff;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sim-msg {
  max-width: 85%;
  padding: 4px 7px;
  font-size: 12px;
  border: 1px solid #c8c8c8;
  background: #fff;
}
.sim-msg.mine {
  align-self: flex-end;
  background: #dfeaff;
  border-color: #9cf;
}
.sim-msg.theirs { align-self: flex-start; }
.sim-msg .sim-who { font-weight: bold; color: var(--xp-blue-dark); }
.sim-msg .sim-time {
  float: right;
  color: #777;
  font-size: 10px;
  margin-left: 8px;
}
.sim-msg .sim-text {
  clear: both;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin-top: 2px;
}

.sim-compose { display: flex; gap: 6px; margin-top: 8px; }
.sim-compose input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 13px;
  padding: 6px;
  border: 2px inset #fff;
  background: #fff;
}
.sim-compose .btn { white-space: nowrap; }

@media (max-width: 760px) {
  .sim-layout { grid-template-columns: 1fr; }
  .sim-messages { height: 260px; }
  .sim-msg { max-width: 92%; }
}

/* --- SIM end-to-end encryption (migration-08) --- */
/* Visibility of the warning is toggled inline by sim.js (display
   attribute), so this rule deliberately carries no display. */
.sim-keywarn {
  margin: 8px 0 0;
  padding: 6px 8px;
  border: 2px inset #ffe28a;
  background: #fff7d6;
  color: #6b5900;
}
.sim-lock {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid #7a9e3f;
  background: #eaf6d9;
  color: #33560f;
  font-weight: bold;
  cursor: help;
}
.sim-lock.warn {
  border-color: #cc9900;
  background: #fff2cc;
  color: #7a5b00;
}
.sim-text.sim-locked {
  border-style: dashed;
  background: #ececec;
  color: #6b6b6b;
  font-style: italic;
}

/* --- Blog (migration-09) --- */
.blog-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.blog-label { display: block; font-weight: bold; margin: 8px 0 3px; }
.blog-top-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.blog-top-col h4 { margin: 0 0 6px; }
.blog-top-row { margin-bottom: 6px; }
.blog-row { border: 2px outset #fff; background: #fff; padding: 8px; margin-bottom: 8px; }
.blog-row-head .blog-title {
  font-size: 14px;
  display: inline-block; max-width: 100%;
  overflow-wrap: anywhere; word-break: break-word;
}
.blog-excerpt { margin: 4px 0; color: #222; overflow-wrap: anywhere; word-break: break-word; }
.blog-row-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.blog-counts { color: #333; }
.blog-edbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.blog-editable {
  min-height: 120px; max-height: 320px; overflow-y: auto;
  border: 2px inset #fff; background: #fff; padding: 6px;
  overflow-wrap: anywhere; word-break: break-word;
}
.blog-editable ul, .blog-editable ol,
.blog-post-body ul, .blog-post-body ol,
.blog-reply-body ul, .blog-reply-body ol { margin: 4px 0 4px 20px; padding: 0; }
.blog-reply-ed { min-height: 70px; }
.blog-poll-box { margin-top: 10px; border: 2px outset #fff; padding: 8px; background: #f6f4ea; }
.blog-poll-opt { display: flex; gap: 6px; margin-bottom: 4px; }
.blog-poll-opt input { flex: 1; min-width: 0; font-family: inherit; font-size: 12px; padding: 3px 6px; border: 2px inset #fff; }
#blog-title, #blog-poll-q, #blog-appeal-note {
  width: 100%; font-family: inherit; font-size: 13px;
  padding: 5px 6px; border: 2px inset #fff; background: #fff;
}
#blog-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.blog-single-title {
  margin: 0 0 4px; font-size: 17px;
  overflow-wrap: anywhere; word-break: break-word;
}
.blog-post-body {
  background: #fff; border: 2px inset #fff; padding: 8px; margin: 8px 0;
  overflow-wrap: anywhere; word-break: break-word;
}
.blog-poll { border: 2px outset #fff; background: #f6f4ea; padding: 8px; margin: 8px 0; }
.blog-opt { margin: 6px 0; }
.blog-bar { height: 12px; border: 1px solid #808080; background: #fff; }
.blog-bar-fill { height: 100%; background: linear-gradient(#7cc14a, var(--xp-green)); }
.blog-reply { border-top: 1px solid #d4d0c8; padding: 6px 0; }
.blog-reply-body { overflow-wrap: anywhere; word-break: break-word; }
.blog-strike { border: 1px solid #d4d0c8; background: #fff; padding: 4px 6px; margin-bottom: 4px; }

@media (max-width: 760px) {
  .blog-top-cols { grid-template-columns: 1fr; }
  .blog-edbar .btn { padding: 6px 8px; font-size: 13px; }
  .blog-editable { min-height: 150px; }

/* --- Stories (migration-12): text-only, all-public --- */
.story-input {
  width: 100%; font-family: inherit; font-size: 13px; line-height: 1.4;
  padding: 6px; border: 2px inset #fff; background: #fff; resize: vertical;
  overflow-wrap: anywhere; word-break: break-word;
}
.story-single-body {
  background: #fff; border: 2px inset #fff; padding: 8px; margin: 8px 0;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.story-replies { border-top: 1px solid #d4d0c8; margin-top: 8px; padding-top: 6px; }
.story-replies h4 { margin: 0 0 6px; }
.story-reply-form { display: flex; gap: 6px; margin-top: 8px; }
.story-reply-form input { flex: 1; min-width: 0; font-family: inherit; font-size: 13px; padding: 5px 6px; border: 2px inset #fff; background: #fff; }
.story-row .blog-excerpt { white-space: pre-wrap; }
.story-expiry { margin-top: 8px; }
.story-expiry input[type="range"] { width: 100%; max-width: 320px; accent-color: var(--xp-green, #3a9a3a); }
.story-expiry-scale { display: flex; justify-content: space-between; max-width: 320px; color: #555; }
.story-expiry-note { color: #555; }

}

/* ---- Shared footer / setup wizard / policy pages (additive) ---- */
.swk-footer{margin-top:12px;padding:8px;background:#c0c0c0;border:2px outset #fff;font-size:11px;color:#000;text-align:center}
.swk-footer a{color:#003399}
.swk-footer-inner{line-height:1.7}
.swz-progress{height:14px;border:2px inset #fff;background:#fff;margin-top:6px}
.swz-progress-fill{height:100%;background:linear-gradient(90deg,#000080,#245edb)}
.swz-tabs{display:flex;gap:8px;margin:8px 0;flex-wrap:wrap}
.swz-pronoun-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:6px;margin:8px 0}
.swz-pronoun-grid .btn.sel{outline:2px solid #000080;font-weight:bold;background:#d4e4ff}
.swz-step h3{margin:0 0 6px}
.policy-body{text-align:left}
.policy-body h2{font-size:14px;margin:14px 0 4px}
.policy-body p,.policy-body li{font-size:12px;margin:4px 0}
.policy-body ul{margin:4px 0 4px 18px;padding:0}
.policy-meta{background:#fff;border:2px inset #fff;padding:6px 8px;margin:8px 0}
@media (max-width:640px){.swz-pronoun-grid{grid-template-columns:repeat(2,1fr)}}

/* ---- Online status indicators (presence) ---- */
.ss-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 0; vertical-align: middle; border: 1px solid #fff; background: #999; flex-shrink: 0; }
.ss-status-online { background: #0a0; box-shadow: 0 0 4px #0a0; }
.ss-status-offline { background: #888; }
.ss-status.hidden { display: none !important; }

/* ---- Custom profile box on public profiles (isolated sandbox) ---- */
.ss-custom-box { border: 2px inset #c0c0c0; background: #fff; margin: 10px 0; padding: 8px 10px 10px; page-break-inside: avoid; }
.ss-custom-box h3 { margin: 0 0 6px; font-size: 13px; }
.ss-custom-label { font-size: 11px; color: #555; margin: 0 0 6px; font-weight: bold; }
.ss-custom-frame { width: 100%; height: 300px; border: 2px inset #808080; background: #fff; display: block; }

.ss-userlink { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ss-userlink:hover { text-decoration: underline; }
.pc-editor textarea { width: 100%; min-height: 260px; font-family: monospace; white-space: pre; }
.pc-window { max-width: 1000px; margin: 0 auto; }
.pc-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pc-editors { display: flex; gap: 10px; flex-wrap: wrap; }
.pc-editor { flex: 1; min-width: 260px; display: flex; flex-direction: column; }
.pc-editor label { font-size: 11px; font-weight: bold; margin: 0 0 4px; color: #000080; }
.pc-editor textarea { font-family: "Courier New", Courier, monospace; font-size: 12px; border: 2px inset #fff; background: #fff; width: 100%; height: 340px; resize: vertical; }
.pc-preview { flex: 1; min-width: 300px; display: flex; flex-direction: column; border: 2px solid #0055ea; background: #fff; }
.pc-preview-head { padding: 4px 6px; background: linear-gradient(90deg, #0a246a, #0054e3 8%, #3f8cff 55%, #0a246a); color: #fff; font-weight: bold; border-bottom: 1px solid #003399; font-size: 12px; }
.pc-preview-frame { flex: 1; width: 100%; border: 0; display: block; }
.pc-pane { border: 2px solid #0055ea; background: var(--xp-face); }
.pc-pane-head { padding: 4px 6px; background: linear-gradient(90deg, #0a246a, #0054e3 8%, #3f8cff 55%, #0a246a); color: #fff; font-weight: bold; border-bottom: 1px solid #003399; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.pc-pane-body { padding: 8px 10px; }
.pc-checkbox-row { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 6px 10px; background: #f6f4ea; border: 1px solid #d4d0c8; width: fit-content; width: -moz-fit-content; }
.pc-checkbox-row input { margin: 0; }
.pc-msg { margin: 6px 10px; font-size: 12px; display: none; }
.pc-msg.bad { color: #c00; }
.pc-msg.good { color: #060; }
.pc-msg.warn { color: #805000; }
.pc-hint { font-size: 11px; color: #555; margin: 2px 10px 10px; }
.pc-btn-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

@media (max-width: 760px) {
  .pc-editors { flex-direction: column; }
  .pc-editor { min-width: 100%; }
}
.ss-userlink { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ss-userlink:hover { text-decoration: underline; }
.pc-editor textarea { width: 100%; min-height: 260px; font-family: monospace; white-space: pre; }
