/* ==========================================================
   TannerSpace: retro profile styles
   Themes are just CSS variables. See the THEMES section.
   ========================================================== */

/* ---------- THEMES ---------- */
:root,
[data-theme="classic"] {
  --bg: repeating-linear-gradient(45deg, #e9eff8 0 10px, #dfe7f3 10px 20px);
  --nav-bg: #003399;
  --nav-text: #ffffff;
  --subnav-bg: #336699;
  --subnav-text: #ffffff;
  --panel-bg: #ffffff;
  --panel-border: #99b3d6;
  --box-bg: #ffffff;
  --box-border: #6699cc;
  --text: #222222;
  --muted: #555555;
  --link: #003399;
  --link-hover: #cc3300;
  --hd-blue-bg: #336699;
  --hd-blue-text: #ffffff;
  --hd-orange-bg: #ffcc99;
  --hd-orange-text: #993300;
  --orange-text: #b33c00;
  --th-bg: #b1d0f0;
  --th-text: #1f4466;
  --td-bg: #d5e8fb;
  --td-text: #1a1a1a;
  --btn-bg: linear-gradient(#ffffff, #dcdcdc);
  --btn-text: #111111;
  --btn-light: #ffffff;
  --btn-dark: #7a7a7a;
  --online: #b33c00;
  --ph-bg: #fff4b3;
  --ph-text: #5c4400;
  --ph-border: #b38f00;
  --focus: #cc3300;
  --marquee-bg: #ffffcc;
  --marquee-text: #1a1a1a;
  --backdrop: rgba(0, 20, 60, 0.55);
}

[data-theme="glitter"] {
  --bg:
    radial-gradient(circle at 20% 30%, #fff 0 1.5px, transparent 2.5px) 0 0 / 38px 38px,
    radial-gradient(circle at 70% 70%, #fff6c9 0 1px, transparent 2px) 0 0 / 26px 26px,
    linear-gradient(135deg, #ff9ad5, #c58cff 50%, #8ec5ff) fixed;
  --nav-bg: #8b1d6d;
  --nav-text: #ffffff;
  --subnav-bg: #a8267f;
  --subnav-text: #ffffff;
  --panel-bg: #fff6fc;
  --panel-border: #e07bc4;
  --box-bg: #ffffff;
  --box-border: #e07bc4;
  --text: #2a1030;
  --muted: #6b4a6f;
  --link: #9c1470;
  --link-hover: #5b2bb0;
  --hd-blue-bg: #7a2d9c;
  --hd-blue-text: #ffffff;
  --hd-orange-bg: #ffd6f0;
  --hd-orange-text: #8a0f5e;
  --orange-text: #9c1470;
  --th-bg: #f3d6ff;
  --th-text: #4d1a66;
  --td-bg: #fff0fa;
  --td-text: #2a1030;
  --btn-bg: linear-gradient(#ffffff, #f4c9e8);
  --btn-text: #3a0f33;
  --btn-light: #ffffff;
  --btn-dark: #b0609a;
  --online: #b0127a;
  --focus: #5b2bb0;
  --marquee-bg: #fff0fa;
  --marquee-text: #6b0f4c;
  --backdrop: rgba(60, 0, 50, 0.55);
}
[data-theme="emo"] {
  --bg:
    repeating-linear-gradient(135deg, #0f0f0f 0 14px, #181818 14px 28px);
  --nav-bg: #000000;
  --nav-text: #f2f2f2;
  --subnav-bg: #1c1c1c;
  --subnav-text: #f2f2f2;
  --panel-bg: #0b0b0b;
  --panel-border: #3a3a3a;
  --box-bg: #141414;
  --box-border: #444444;
  --text: #e8e8e8;
  --muted: #b0b0b0;
  --link: #ff7a9c;
  --link-hover: #ffc2d1;
  --hd-blue-bg: #262626;
  --hd-blue-text: #a8d8ff;
  --hd-orange-bg: #2a0d14;
  --hd-orange-text: #ff9fb4;
  --orange-text: #ff8fa8;
  --th-bg: #222222;
  --th-text: #a8d8ff;
  --td-bg: #1a1a1a;
  --td-text: #e8e8e8;
  --btn-bg: linear-gradient(#3a3a3a, #1c1c1c);
  --btn-text: #f2f2f2;
  --btn-light: #5a5a5a;
  --btn-dark: #000000;
  --online: #ff7a9c;
  --ph-bg: #3d3300;
  --ph-text: #ffe680;
  --ph-border: #b39500;
  --focus: #ff7a9c;
  --marquee-bg: #000000;
  --marquee-text: #ff9fb4;
  --backdrop: rgba(0, 0, 0, 0.75);
}
[data-theme="rain"] {
  --bg:
    repeating-linear-gradient(105deg, rgba(255,255,255,.07) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, #6b7f8c, #34444f) fixed;
  --nav-bg: #1f3a4a;
  --nav-text: #ffffff;
  --subnav-bg: #2e5566;
  --subnav-text: #ffffff;
  --panel-bg: #eef3f6;
  --panel-border: #7d98a8;
  --box-bg: #f8fafb;
  --box-border: #7d98a8;
  --text: #1d2a33;
  --muted: #4a5a65;
  --link: #135b86;
  --link-hover: #1f6b45;
  --hd-blue-bg: #2e5566;
  --hd-blue-text: #ffffff;
  --hd-orange-bg: #dbe9e1;
  --hd-orange-text: #1f5a3a;
  --orange-text: #1f6b45;
  --th-bg: #d3e0e8;
  --th-text: #1f3a4a;
  --td-bg: #e8eff3;
  --td-text: #1d2a33;
  --btn-bg: linear-gradient(#ffffff, #d5dee4);
  --btn-text: #1d2a33;
  --btn-light: #ffffff;
  --btn-dark: #6b7f8c;
  --online: #1f6b45;
  --focus: #b3470d;
  --marquee-bg: #dbe9e1;
  --marquee-text: #1f3a4a;
  --backdrop: rgba(15, 30, 40, 0.6);
}

/* theme extras (all disabled under reduced motion, see bottom) */
[data-theme="glitter"] body::before,
[data-theme="rain"] body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
[data-theme="glitter"] body::before {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 1px, transparent 2px) 0 0 / 53px 53px,
    radial-gradient(circle at 50% 50%, #fff 0 1px, transparent 2px) 17px 29px / 71px 71px;
  animation: twinkle 2.4s ease-in-out infinite alternate;
}
[data-theme="rain"] body::before {
  background: repeating-linear-gradient(100deg, transparent 0 22px, rgba(200,225,240,.35) 22px 23px, transparent 23px 60px) 0 0 / 60px 120px;
  animation: rain 0.7s linear infinite;
}
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.9; } }
@keyframes rain { to { background-position: -20px 120px; } }
[data-theme="emo"] .profile-card h1 { text-shadow: 2px 2px 0 #5a0016; }
[data-theme="emo"] .urlbar { background: #000; color: #e8e8e8; }
[data-theme="emo"] .urlbar b { color: #7CFC00; }
[data-theme="emo"] .search input { background: #111; color: #eee; border-color: #555; }
[data-theme="glitter"] .network { background: linear-gradient(90deg, #fff0fa, #f3e6ff, #e6f2ff); color: #6b0f4c; }

/* ---------- BASE ---------- */
:root {
  --fs: 11px;
  --fs-sm: 10px;
  --fs-lg: 13px;
  --font: Verdana, Tahoma, Geneva, "DejaVu Sans", sans-serif;
  --font-head: Tahoma, Verdana, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: var(--fs)/1.45 var(--font);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
p { margin: 0 0 0.7em; }
ul { margin: 0; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -40px; z-index: 100;
  background: #fff; color: #000; padding: 6px 10px; border: 2px solid #000;
}
.skip:focus { top: 8px; }

.wrap { max-width: 800px; margin: 0 auto; padding: 0 8px; }

/* placeholder highlight: anything written as [like this] in content.js */
.ph {
  background: var(--ph-bg);
  color: var(--ph-text);
  outline: 1px dashed var(--ph-border);
  padding: 0 2px;
  font-style: italic;
}

/* bevelled retro buttons */
.btn {
  font: bold var(--fs-sm) var(--font);
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 2px solid;
  border-color: var(--btn-light) var(--btn-dark) var(--btn-dark) var(--btn-light);
  padding: 2px 8px;
  cursor: pointer;
}
.btn:active { border-color: var(--btn-dark) var(--btn-light) var(--btn-light) var(--btn-dark); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-tiny { padding: 1px 6px; font-weight: normal; }

/* ---------- TOP BAR ---------- */
.topbar { background: var(--nav-bg); color: var(--nav-text); position: relative; z-index: 2; }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap;
}
.brand {
  color: var(--nav-text); text-decoration: none;
  font: bold 24px/1 var(--font-head); letter-spacing: -1px;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.brand:hover { color: var(--nav-text); }
.brand-mark { font-size: 18px; }
.brand small { font: normal var(--fs-sm) var(--font); letter-spacing: 0; opacity: 0.9; }
.search { display: flex; gap: 4px; }
.search input {
  font: var(--fs) var(--font); width: 220px; padding: 2px 4px;
  border: 1px solid #7f9db9; background: #fff; color: #111;
}

.subnav { background: var(--subnav-bg); color: var(--subnav-text); border-bottom: 1px solid rgba(0,0,0,.25); }
.subnav-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 3px; padding-bottom: 3px; }
.navlinks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; }
.navlinks li + li::before { content: "|"; margin: 0 6px; opacity: 0.8; }
.navlinks a { color: var(--subnav-text); font-weight: bold; text-decoration: none; }
.navlinks a:hover { text-decoration: underline; color: var(--subnav-text); }
.prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: var(--fs-sm); max-width: 100%; }
.prefs select { max-width: 100%; }
.prefs select { font: var(--fs-sm) var(--font); }
.search-status { font-size: var(--fs-sm); font-weight: bold; margin: 0 auto; }
.search-status:empty { display: none; }
.search-status:not(:empty) { padding-bottom: 4px; }

/* ---------- MARQUEE ---------- */
.marquee { position: relative; z-index: 1; background: var(--marquee-bg); color: var(--marquee-text); border-bottom: 1px solid var(--box-border); }
.marquee-inner { display: flex; align-items: center; gap: 8px; padding-top: 3px; padding-bottom: 3px; }
.marquee-viewport { overflow: hidden; flex: 1; font-weight: bold; font-size: var(--fs-sm); }
.marquee-track { display: inline-flex; white-space: nowrap; animation: marquee 32s linear infinite; }
.marquee-track span { padding-right: 3em; }
.marquee.is-paused .marquee-track,
.marquee-viewport:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- PROFILE LAYOUT ---------- */
.profile {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-top: 0;
  padding: 12px;
  position: relative;
  z-index: 1;
}
.profile:focus { outline: none; }
.col-left, .col-right { min-width: 0; }

/* table-style boxes */
.box { background: var(--box-bg); border: 1px solid var(--box-border); margin-bottom: 12px; }
.box-h {
  margin: 0; padding: 3px 6px;
  font: bold var(--fs) var(--font);
}
.box-blue .box-h { background: var(--hd-blue-bg); color: var(--hd-blue-text); }
.box-orange .box-h { background: var(--hd-orange-bg); color: var(--hd-orange-text); }
.box-b { padding: 6px; }
.box-b > :last-child { margin-bottom: 0; }
.box-sub { font-weight: normal; font-size: var(--fs-sm); }
.box-sub a { color: inherit; }
.box h3 { font: bold var(--fs) var(--font); color: var(--orange-text); margin: 0 0 4px; }
.box h3:not(:first-child) { margin-top: 10px; }

/* profile card */
.profile-card { margin-bottom: 12px; }
.profile-card h1 { font: bold 18px/1.2 var(--font-head); margin: 0 0 8px; }
.profile-row { display: flex; gap: 10px; align-items: flex-start; }
.profile-photo { width: 150px; height: 150px; object-fit: cover; border: 1px solid var(--box-border); background: var(--td-bg); flex: none; }
.profile-meta p { margin: 0 0 6px; }
.headline { font-style: italic; }
.online { display: inline-flex; align-items: center; gap: 4px; font-weight: bold; color: var(--online); }
.online svg { width: 14px; height: 18px; }
.small { font-size: var(--fs-sm); color: var(--muted); }
.mood { margin: 8px 0 4px; }
.viewmy { margin: 0 0 6px; }
.counter { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.odometer { display: inline-flex; gap: 1px; font: bold 12px/1 "Courier New", monospace; }
.odometer span { background: #111; color: #7CFC00; padding: 2px 3px; border: 1px solid #444; }

/* contact grid */
.contact-grid { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.act {
  display: flex; align-items: center; gap: 5px; width: 100%;
  font: bold var(--fs-sm) var(--font); color: var(--link);
  text-decoration: none; background: none; border: 0; padding: 3px 2px; text-align: left; cursor: pointer;
}
.act:hover { text-decoration: underline; color: var(--link-hover); }
.act .ico { font-size: 14px; line-height: 1; width: 18px; text-align: center; flex: none; }
.act.is-unset { color: var(--muted); cursor: help; font-weight: normal; text-decoration: none; }
.act.is-unset .lbl::after { content: " (add link)"; font-style: italic; }

/* interest / detail tables */
.kv { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: var(--fs); }
.kv th, .kv td { padding: 4px 5px; vertical-align: top; text-align: left; }
.kv th { background: var(--th-bg); color: var(--th-text); width: 32%; }
.kv td { background: var(--td-bg); color: var(--td-text); }
.kv td .ph { font-style: italic; }

/* skills "URL bar" */
.urlbar {
  display: flex; align-items: center; gap: 4px;
  border: 2px inset var(--box-border); background: #fff; color: #111;
  padding: 3px 5px; font: var(--fs-sm) "Courier New", monospace; margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.urlbar b { color: #1a7f37; }
.skills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.skills li {
  border: 1px solid var(--box-border); background: var(--td-bg); color: var(--td-text);
  padding: 1px 6px; font-size: var(--fs-sm);
}

/* song player */
.player {
  border: 2px solid; border-color: var(--btn-light) var(--btn-dark) var(--btn-dark) var(--btn-light);
  background: linear-gradient(#3c3c3c, #1b1b1b); color: #e8e8e8; padding: 6px;
}
.player-screen {
  background: #0d1a0d; color: #7CFC00; font: 11px/1.3 "Courier New", monospace;
  padding: 4px 6px; border: 1px inset #555; margin-bottom: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.player-screen .ph { background: transparent; color: #cfe; outline-color: #7a7; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.player-btn {
  width: 28px; height: 24px; font-size: 12px; line-height: 1;
  background: linear-gradient(#f5f5f5, #bdbdbd); color: #111;
  border: 2px solid; border-color: #fff #555 #555 #fff; cursor: pointer; flex: none;
}
.player-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.player input[type="range"] { flex: 1; min-width: 0; accent-color: #7CFC00; }
.player-time { font: 10px "Courier New", monospace; color: #ccc; min-width: 34px; text-align: right; }
.player-note { font-size: var(--fs-sm); color: var(--muted); margin: 5px 0 0; }
/* Spotify embed: Spotify's tall 352px card (album art on top), which fits the narrow left column */
.now-playing { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text); }
.np-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; flex: none; }
.np-eq i { width: 3px; background: #1db954; border-radius: 1px; animation: eq 0.9s ease-in-out infinite alternate; }
.np-eq i:nth-child(1) { height: 50%; }
.np-eq i:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.np-eq i:nth-child(3) { height: 70%; animation-delay: 0.6s; }
@keyframes eq { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.np-eq i { transform-origin: bottom; }
.player-embed {
  display: block; width: 100%; height: 352px; border: 0; border-radius: 12px;
  background: #282828; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

/* right column */
.network {
  border: 1px solid var(--box-border); background: var(--box-bg);
  padding: 14px 10px; margin-bottom: 12px; text-align: center;
  font: bold 15px/1.3 var(--font-head);
}
.blog-list { list-style: none; padding: 0; }
.blog-list li { padding: 3px 0; }
.blog-list li + li { border-top: 1px dotted var(--box-border); }
.blog-list .more { font-size: var(--fs-sm); white-space: nowrap; }
.blog-date { color: var(--muted); font-size: var(--fs-sm); }

.roles { padding-left: 1.4em; margin: 0 0 0.7em; }

/* Top 8 */
.friend-count { margin: 0 0 6px; }
.friend-count strong { color: var(--orange-text); }
.top8 { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.friend { text-align: center; }
.friend a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; font-weight: bold; font-size: var(--fs-sm); }
.friend a:hover .friend-name { text-decoration: underline; }
.friend img { width: 90px; height: 90px; object-fit: cover; border: 1px solid var(--box-border); background: var(--td-bg); }
.friend a:hover img, .friend a:focus-visible img { border-color: var(--link-hover); }

/* comments */
.comments-meta { margin: 0 0 6px; }
.comment { display: grid; grid-template-columns: 110px 1fr; border: 1px solid var(--box-border); margin-bottom: 6px; }
.comment-who { background: var(--hd-orange-bg); color: var(--hd-orange-text); padding: 6px; text-align: center; font-size: var(--fs-sm); font-weight: bold; }
.comment-who img { display: block; width: 60px; height: 60px; margin: 4px auto 0; border: 1px solid var(--box-border); background: #fff; }
.comment-who .role { font-weight: normal; display: block; }
.comment-body { padding: 6px 8px; }
.comment-date { font-weight: bold; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 4px; }
.comment-body blockquote { margin: 0; }

/* experience guestbook */
.gb-entry { border: 1px solid var(--box-border); margin-bottom: 8px; }
.gb-head {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: var(--th-bg); color: var(--th-text); padding: 3px 6px; font-size: var(--fs-sm); font-weight: bold;
}
.gb-body { padding: 6px 8px; display: grid; grid-template-columns: 38px 1fr; gap: 8px; }
.gb-avatar {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--hd-blue-bg); color: var(--hd-blue-text); font: bold 16px var(--font-head);
  border: 2px solid; border-color: var(--btn-light) var(--btn-dark) var(--btn-dark) var(--btn-light);
}
.gb-avatar-sm { font-size: 11px; letter-spacing: -0.5px; }
.gb-body h3 { color: var(--text); margin: 0 0 2px; }
.gb-body .org { font-weight: bold; color: var(--orange-text); margin: 0 0 4px; }
.gb-body ul { padding-left: 1.3em; }

/* search "flash" highlight */
.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--focus); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* footer */
.footer { text-align: center; font-size: var(--fs-sm); padding: 14px 0 28px; position: relative; z-index: 1; }
.footer .wrap { background: var(--panel-bg); color: var(--text); border: 1px solid var(--panel-border); border-top: 0; padding-top: 8px; padding-bottom: 8px; }
.footer p { margin: 2px 0; }
.footer .credit { color: var(--muted); }

/* ---------- TOP 8 DETAIL DIALOG ---------- */
#case-dialog {
  width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 40px);
  padding: 0; border: 2px solid var(--hd-blue-bg);
  background: var(--box-bg); color: var(--text);
  box-shadow: 6px 6px 0 rgba(0,0,0,.35);
}
#case-dialog::backdrop { background: var(--backdrop); }
.dlg-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--nav-bg); color: var(--nav-text);
  padding: 4px 4px 4px 8px; font-weight: bold; position: sticky; top: 0;
}
.dlg-x {
  width: 22px; height: 20px; line-height: 1; font-weight: bold; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-text);
  border: 2px solid; border-color: var(--btn-light) var(--btn-dark) var(--btn-dark) var(--btn-light);
}
.dlg-body { padding: 12px; }
.dlg-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.dlg-head img { width: 110px; height: 110px; border: 1px solid var(--box-border); flex: none; }
.dlg-head h2 { font: bold 18px/1.2 var(--font-head); margin: 0 0 4px; }
.dlg-head h2:focus { outline: none; }
.dlg-sub { color: var(--muted); margin: 0 0 6px; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tags li { background: var(--th-bg); color: var(--th-text); padding: 0 6px; font-size: var(--fs-sm); }
.case-sec { border: 1px solid var(--box-border); margin-bottom: 8px; }
.case-sec h3 { margin: 0; padding: 3px 6px; background: var(--hd-orange-bg); color: var(--hd-orange-text); font: bold var(--fs) var(--font); }
.case-sec p, .case-sec ul { margin: 0; padding: 6px 8px; }
.case-sec ul { padding-left: 2em; }
.dlg-links { margin: 8px 0 0; font-weight: bold; }
.case-photo { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: rgba(15, 23, 42, 0.06); border-radius: 14px; margin-bottom: 10px; border: 1px solid var(--box-border); }
.case-blurb { font-size: var(--fs-lg); margin: 0 0 8px; }
.dlg-foot {
  display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px; border-top: 1px solid var(--box-border); background: var(--panel-bg);
}
.dlg-foot a.btn { text-decoration: none; }

/* ---------- CURSOR EFFECTS (picked in the nav; see initCursor in app.js) ---------- */
.cursor-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }

/* glass glow: sits behind the tiles so the frosted glass lights up where you point */
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 380px; height: 380px; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: 0; transition: opacity 0.3s;
  transform: translate(-600px, -600px); /* parked off-screen until the mouse moves */
  background: radial-gradient(circle, rgba(96, 165, 250, 0.55), rgba(125, 211, 252, 0.25) 40%, transparent 70%);
}
.cursor-glow.is-on { opacity: 1; }

/* map coordinates readout */
.cursor-coords {
  position: fixed; left: 0; top: 0; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font: bold 11px/1.3 "Courier New", monospace; color: #e0f2fe;
  background: rgba(10, 22, 70, 0.85); border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(10, 22, 70, 0.25); opacity: 0;
}
.cursor-coords.is-on { opacity: 1; }

/* laser pointer */
.laser-dot {
  position: fixed; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #ff2d2d; box-shadow: 0 0 8px 2px rgba(255, 45, 45, 0.7); opacity: 0;
}
.laser-dot.laser-tail { width: 6px; height: 6px; margin: -3px 0 0 -3px; box-shadow: 0 0 4px rgba(255, 45, 45, 0.5); }
.laser-dot.is-on { opacity: var(--o, 1); }

/* topo ripple: contour-style rings on click */
.ripple { position: fixed; width: 0; height: 0; pointer-events: none; z-index: 9999; }
.ripple span {
  position: absolute; left: -110px; top: -110px; width: 220px; height: 220px;
  border: 2.5px solid #2563eb; border-radius: 47% 53% 51% 49% / 52% 46% 54% 48%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9), 0 0 14px rgba(37, 99, 235, 0.45);
  opacity: 0; transform: scale(0.08); animation: ripple 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.ripple span:nth-child(2) { left: -75px; top: -75px; width: 150px; height: 150px; border-radius: 53% 47% 46% 54% / 48% 55% 45% 52%; animation-delay: 0.1s; }
.ripple span:nth-child(3) { left: -40px; top: -40px; width: 80px; height: 80px; border-color: #0ea5e9; border-radius: 50% 48% 53% 47%; animation-delay: 0.2s; }
[data-theme="emo"] .ripple span { border-color: #ff7a9c; box-shadow: 0 0 12px rgba(255, 122, 156, 0.5); }
@keyframes ripple {
  0% { opacity: 1; transform: scale(0.08) rotate(0deg); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: scale(1) rotate(14deg); }
}

/* pixel cursor (2000s-era arrow + pointing hand) */
html[data-cursor="pixel"], html[data-cursor="pixel"] * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='32' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M2 4h2v2h-2zM2 6h4v2h-4zM2 8h6v2h-6zM2 10h8v2h-8zM2 12h10v2h-10zM2 14h12v2h-12zM2 16h14v2h-14zM2 18h16v2h-16zM2 20h10v2h-10zM2 22h4v2h-4zM8 22h4v2h-4zM2 24h2v2h-2zM10 24h4v2h-4zM10 26h4v2h-4zM12 28h4v2h-4z'/%3E%3Cpath fill='%23000' d='M0 0h2v2h-2zM0 2h4v2h-4zM0 4h2v2h-2zM4 4h2v2h-2zM0 6h2v2h-2zM6 6h2v2h-2zM0 8h2v2h-2zM8 8h2v2h-2zM0 10h2v2h-2zM10 10h2v2h-2zM0 12h2v2h-2zM12 12h2v2h-2zM0 14h2v2h-2zM14 14h2v2h-2zM0 16h2v2h-2zM16 16h2v2h-2zM0 18h2v2h-2zM18 18h2v2h-2zM0 20h2v2h-2zM12 20h10v2h-10zM0 22h2v2h-2zM6 22h2v2h-2zM12 22h2v2h-2zM0 24h2v2h-2zM4 24h2v2h-2zM8 24h2v2h-2zM14 24h2v2h-2zM0 26h4v2h-4zM8 26h2v2h-2zM14 26h2v2h-2zM10 28h2v2h-2zM16 28h2v2h-2zM10 30h6v2h-6z'/%3E%3C/svg%3E") 0 0, auto; }
html[data-cursor="pixel"] :is(a, button, select, label, summary, [role="button"]) { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='30' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M8 2h4v2h-4zM8 4h4v2h-4zM8 6h4v2h-4zM8 8h4v2h-4zM14 8h4v2h-4zM8 10h4v2h-4zM14 10h4v2h-4zM20 10h4v2h-4zM8 12h4v2h-4zM14 12h4v2h-4zM20 12h4v2h-4zM26 12h2v2h-2zM2 14h4v2h-4zM8 14h16v2h-16zM26 14h4v2h-4zM2 16h4v2h-4zM8 16h22v2h-22zM4 18h26v2h-26zM4 20h26v2h-26zM6 22h24v2h-24zM6 24h22v2h-22zM8 26h20v2h-20z'/%3E%3Cpath fill='%23000' d='M8 0h4v2h-4zM6 2h2v2h-2zM12 2h2v2h-2zM6 4h2v2h-2zM12 4h2v2h-2zM6 6h2v2h-2zM12 6h6v2h-6zM6 8h2v2h-2zM12 8h2v2h-2zM18 8h6v2h-6zM6 10h2v2h-2zM12 10h2v2h-2zM18 10h2v2h-2zM24 10h4v2h-4zM2 12h6v2h-6zM12 12h2v2h-2zM18 12h2v2h-2zM24 12h2v2h-2zM28 12h2v2h-2zM0 14h2v2h-2zM6 14h2v2h-2zM24 14h2v2h-2zM30 14h2v2h-2zM0 16h2v2h-2zM6 16h2v2h-2zM30 16h2v2h-2zM2 18h2v2h-2zM30 18h2v2h-2zM2 20h2v2h-2zM30 20h2v2h-2zM4 22h2v2h-2zM30 22h2v2h-2zM4 24h2v2h-2zM28 24h2v2h-2zM6 26h2v2h-2zM28 26h2v2h-2zM6 28h24v2h-24z'/%3E%3C/svg%3E") 9 0, pointer; }
html[data-cursor="pixel"] :is(input:not([type="range"]), textarea) { cursor: text; }

/* ==========================================================
   FUTURE GLASS THEME: same profile layout, frosted iOS-style tiles
   ========================================================== */
[data-theme="glass"] {
  /* topographic map of NW Washington (regenerate with tools/make_topo_bg.py) */
  --bg: #f1f3f6 url("../assets/bg-topo.jpg") 55% 60% / cover no-repeat;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-edge: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(30, 41, 59, 0.16), inset 0 1px 0 #ffffff;
  --blur: blur(18px) saturate(140%);
  --nav-bg: rgba(10, 22, 70, 0.78);
  --nav-text: #ffffff;
  --subnav-bg: rgba(255, 255, 255, 0.1);
  --subnav-text: #ffffff;
  --panel-bg: var(--glass);
  --panel-border: var(--glass-edge);
  --box-bg: var(--glass);
  --box-border: var(--glass-edge);
  --text: #0b1530;
  --muted: #3b4668;
  --link: #1e40af;
  --link-hover: #7c2d12;
  --hd-blue-bg: linear-gradient(90deg, rgba(30, 64, 175, 0.92), rgba(29, 78, 216, 0.94));
  --hd-blue-text: #ffffff;
  --hd-orange-bg: linear-gradient(90deg, rgba(255, 170, 110, 0.6), rgba(255, 204, 153, 0.45));
  --hd-orange-text: #7c2d12;
  --orange-text: #7c2d12;
  --th-bg: rgba(59, 130, 246, 0.16);
  --th-text: #1e3a8a;
  --td-bg: rgba(255, 255, 255, 0.55);
  --td-text: #0b1530;
  --btn-bg: rgba(255, 255, 255, 0.7);
  --btn-text: #0b1530;
  --btn-light: rgba(255, 255, 255, 0.9);
  --btn-dark: rgba(255, 255, 255, 0.9);
  --online: #064e3b;
  --focus: #7c3aed;
  --marquee-bg: rgba(10, 22, 70, 0.72);
  --marquee-text: #ffffff;
  --backdrop: rgba(10, 20, 60, 0.35);
}
/* glass surfaces */
[data-theme="glass"] .box,
[data-theme="glass"] .network,
[data-theme="glass"] .profile-card,
[data-theme="glass"] .footer .wrap {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  overflow: hidden;
}
[data-theme="glass"] .profile { background: transparent; border: 0; padding: 16px 12px; gap: 16px; }
[data-theme="glass"] .profile-card { padding: 14px; }
[data-theme="glass"] .box { margin-bottom: 16px; }
[data-theme="glass"] .box-h { padding: 8px 12px; letter-spacing: 0.2px; }
[data-theme="glass"] .box-b { padding: 10px 12px; }
[data-theme="glass"] .network { padding: 18px 12px; color: #0f1d4a; margin-bottom: 16px; }
[data-theme="glass"] .footer .wrap { margin-top: 4px; border-radius: 16px; }

/* top bar: dark frosted glass */
[data-theme="glass"] .topbar,
[data-theme="glass"] .marquee {
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
[data-theme="glass"] .subnav { border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
[data-theme="glass"] .brand { text-shadow: 0 0 18px rgba(103, 232, 249, 0.55); }
[data-theme="glass"] .brand-mark { color: #67e8f9; }
[data-theme="glass"] .search input {
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 4px 12px;
  background: rgba(255, 255, 255, 0.88);
}
[data-theme="glass"] .prefs select { border-radius: 8px; }

/* pill buttons */
[data-theme="glass"] .btn,
[data-theme="glass"] .dlg-x {
  border: 1px solid var(--btn-light); border-radius: 999px;
  box-shadow: 0 2px 8px rgba(10, 20, 60, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
[data-theme="glass"] .btn { padding: 3px 12px; }
[data-theme="glass"] .btn:active { transform: scale(0.97); border-color: var(--btn-light); }
[data-theme="glass"] .dlg-x { width: 26px; height: 26px; border-radius: 50%; }

/* profile bits */
[data-theme="glass"] .profile-photo {
  border-radius: 20px; border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(8, 15, 50, 0.25);
}
[data-theme="glass"] .online svg { filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.8)); }
[data-theme="glass"] .odometer span {
  background: rgba(10, 22, 70, 0.88); color: #67e8f9; border: 1px solid rgba(103, 232, 249, 0.4);
  border-radius: 4px; text-shadow: 0 0 6px rgba(103, 232, 249, 0.8);
}

/* tables + chips */
[data-theme="glass"] .kv { border-spacing: 3px; }
[data-theme="glass"] .kv th, [data-theme="glass"] .kv td { border-radius: 8px; }
[data-theme="glass"] .skills li,
[data-theme="glass"] .tags li {
  border-radius: 999px; background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.35); color: #1e3a8a; padding: 2px 9px;
}
[data-theme="glass"] .urlbar {
  border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 999px; padding: 5px 12px;
  background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 1px 3px rgba(10, 20, 60, 0.15);
}

/* player: dark glass with neon readout */
[data-theme="glass"] .player {
  background: rgba(10, 22, 70, 0.8); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px; padding: 8px;
}
[data-theme="glass"] .player-screen { background: rgba(0, 0, 0, 0.35); color: #67e8f9; border: 0; border-radius: 8px; }
[data-theme="glass"] .player-btn { border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.85); }
[data-theme="glass"] .player input[type="range"] { accent-color: #67e8f9; }

/* Top 8, comments, guestbook */
[data-theme="glass"] .friend img {
  border-radius: 18px; border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(8, 15, 50, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="glass"] .friend a:hover img,
[data-theme="glass"] .friend a:focus-visible img {
  transform: translateY(-3px) scale(1.03); border-color: #fff;
  box-shadow: 0 10px 24px rgba(8, 15, 50, 0.35), 0 0 0 3px rgba(103, 232, 249, 0.7);
}
[data-theme="glass"] .comment,
[data-theme="glass"] .gb-entry,
[data-theme="glass"] .case-sec {
  border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 14px; overflow: hidden;
  background: rgba(255, 255, 255, 0.4);
}
[data-theme="glass"] .comment-who img { border-radius: 50%; border: 2px solid #fff; }
[data-theme="glass"] .gb-avatar {
  border: 0; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, #1e40af, #7c3aed);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="glass"] .blog-list li + li { border-top-color: rgba(30, 64, 175, 0.25); }

/* detail dialog */
[data-theme="glass"] #case-dialog {
  border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 30px 80px rgba(8, 15, 50, 0.45);
}
[data-theme="glass"] #case-dialog::backdrop { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
[data-theme="glass"] .dlg-bar { background: linear-gradient(90deg, rgba(30, 64, 175, 0.95), rgba(109, 40, 217, 0.92)); }
[data-theme="glass"] .dlg-foot { background: rgba(255, 255, 255, 0.45); border-top-color: rgba(255, 255, 255, 0.8); }
[data-theme="glass"] .dlg-head img { border-radius: 18px; border: 2px solid #fff; }

/* No blur support, or the visitor asked for less transparency: go near-opaque */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-theme="glass"] { --glass: rgba(255, 255, 255, 0.93); --nav-bg: rgba(10, 22, 70, 0.92); --marquee-bg: rgba(10, 22, 70, 0.92); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  [data-theme="glass"] { --glass: rgba(255, 255, 255, 0.96); --nav-bg: #0a1646; --marquee-bg: #0a1646; }
}

/* ---------- TOP 8 "FRIEND PROFILE" PAGES ---------- */
.friend-bar { grid-column: 1 / -1; }
.friend-kicker { margin: 0 0 4px; font-size: var(--fs-sm); font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.friend-card h1:focus { outline: none; }
.friend-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.friend-stat {
  display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 84px;
  padding: 12px 8px; text-align: center; background: var(--box-bg); border: 1px solid var(--box-border);
}
.friend-stat-v { font: bold 22px/1.1 var(--font-head); color: var(--text); }
.friend-stat-l { font-size: var(--fs-sm); color: var(--muted); }
.friend-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.friend-thumb {
  display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; cursor: zoom-in;
  background: var(--td-bg); border: 1px solid var(--box-border);
}
.friend-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.friend-thumb:hover img { opacity: 0.85; }
.friend-read { margin: 12px 0 0; font-weight: bold; }
.top8-mini { gap: 8px 4px; }
.top8-mini .friend img { width: 60px; height: 60px; }
.top8-mini .friend.is-here img { outline: 3px solid var(--focus); outline-offset: 1px; }
.top8-mini .friend.is-here .friend-name { color: var(--text); }
.friend-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.friend-nav a.btn { text-decoration: none; }
[data-theme="glass"] .friend-stat {
  border-radius: 16px; background: var(--glass); border-color: var(--glass-edge); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
[data-theme="glass"] .friend-thumb { border-radius: 12px; border-color: rgba(255, 255, 255, 0.9); }
[data-theme="glass"] .friend-bar .btn { font-size: var(--fs); }

/* ---------- LINE RIDER → DIRECT MESSAGE ---------- */
[hidden] { display: none !important; }
.lr-help { margin: 0 0 6px; }
.lr-canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 600 / 260;
  border: 1px solid var(--box-border); border-radius: 10px; background: #fbfcfe;
  touch-action: none; cursor: crosshair;
}
.lr-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.lr-count { font-weight: bold; font-size: var(--fs-sm); color: var(--orange-text); }
.lr-skip { margin-left: auto; }
.lr-unlocked { font-size: var(--fs-lg); margin: 0 0 8px; }
.lr-unlocked:focus { outline: none; }
.dm-form { display: grid; gap: 3px; }
.dm-form label { font-weight: bold; font-size: var(--fs-sm); margin-top: 5px; }
.dm-opt { font-weight: normal; color: var(--muted); }
.dm-form input, .dm-form textarea {
  width: 100%; font: var(--fs) var(--font); padding: 6px 8px; color: #111;
  background: #fff; border: 1px solid var(--box-border); border-radius: 6px;
}
.dm-form textarea { resize: vertical; min-height: 80px; }
.dm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.dm-status { margin: 6px 0 0; font-weight: bold; color: var(--online); }
.dm-status:empty { display: none; }
.dm-hp { position: absolute !important; left: -9999px; }

/* ==========================================================
   BLOG: "Tanner Times", styled like a 1994 daily newspaper
   (same look in every theme; Google Fonts with Times/Arial fallbacks)
   ========================================================== */
html.paper-open { overflow: hidden; }
.paper-view {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(24, 24, 24, 0.86); padding: 22px 14px 40px;
}
.paper {
  --ink: #141414; --rule: #161616; --rule-soft: #9e9e9a; --newsprint: #f3f2ed;
  --serif: "PT Serif", "Times New Roman", Times, serif;
  --head: "Frank Ruhl Libre", "Times New Roman", Times, serif;
  --sans: "Libre Franklin", "Franklin Gothic Medium", Arial, Helvetica, sans-serif;
  position: relative; max-width: 1020px; margin: 0 auto; padding: 12px 30px 40px;
  color: var(--ink); background-color: var(--newsprint);
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1.2px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03), transparent 10%, transparent 90%, rgba(0, 0, 0, 0.03));
  background-size: 3px 3px, 100% 100%;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.05), 0 14px 44px rgba(0, 0, 0, 0.5);
  font: 16px/1.55 var(--serif);
}
.paper a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.paper a:hover { color: #000; background: rgba(0, 0, 0, 0.06); }
.paper :focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.paper .ph { background: #fff1a8; color: #4d3a00; outline-color: #9c7c00; }

.np-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 8px; }
.np-back, .np-front-link {
  font: 800 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: none; border: 2px solid var(--ink); padding: 7px 10px; cursor: pointer; text-decoration: none;
}
.np-back:hover, .np-front-link:hover { background: var(--ink); color: var(--newsprint); }

/* skyboxes (teasers above the nameplate) */
.np-skyboxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 6px 0 8px; border-bottom: 1px solid var(--rule); }
.np-sky { display: flex; gap: 8px; align-items: center; text-decoration: none; border-right: 1px solid var(--rule-soft); padding-right: 8px; }
.np-sky:last-child { border-right: 0; }
.np-sky-img { flex: none; width: 58px; height: 58px; }
.np-sky-img img { width: 100%; height: 100%; object-fit: cover; }
.np-sky-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.np-sky-sec { font: 800 10px/1.1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.np-sky-h { font: 700 14px/1.2 var(--head); }
.np-sky:hover .np-sky-h { text-decoration: underline; }

/* nameplate */
.np-masthead { text-align: center; margin-bottom: 12px; }
.np-nameplate { display: grid; grid-template-columns: 120px 1fr 120px; align-items: center; gap: 10px; padding-top: 8px; }
.np-ear {
  display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--rule);
  font: 600 11px/1.25 var(--sans); text-align: center;
}
.np-ear-h { font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.np-barcode {
  display: block; height: 22px; margin-top: 4px;
  background: repeating-linear-gradient(90deg, #222 0 1px, transparent 1px 3px, #222 3px 5px, transparent 5px 6px, #222 6px 7px, transparent 7px 10px);
}
.np-name { margin: 0; font: 400 clamp(42px, 8vw, 88px)/1 "UnifrakturMaguntia", "Old English Text MT", "Times New Roman", serif; }
.np-name a { text-decoration: none; }
.np-name a:hover { background: none; }
.np-name:focus { outline: none; }
.np-motto { margin: 4px 0 6px; font: italic 13px/1.3 var(--serif); }
.np-dateline {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px;
  border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 5px 2px; font: 800 11px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
}

/* section flag, headline, deck, byline */
.np-flag {
  display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; padding: 5px 10px;
  background: var(--ink); color: var(--newsprint); font: 900 15px/1 var(--sans); letter-spacing: 0.16em;
}
.np-kicker { margin: 0 0 4px; font: 800 11px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.np-headline {
  margin: 4px 0 8px; text-align: left;
  font: 900 clamp(32px, 5vw, 58px)/1.02 var(--head); letter-spacing: -0.015em;
}
.np-headline:focus { outline: none; }
.np-headline a { text-decoration: none; }
.np-headline a:hover { text-decoration: underline; background: none; }
.np-deck { margin: 0 0 12px; font: 400 22px/1.3 var(--head); color: #2e2e2e; }
.np-byline { margin: 10px 0 14px; padding: 6px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.np-by { margin: 0; font: 800 12px/1.3 var(--sans); letter-spacing: 0.1em; }
.np-by-role { margin: 0; font: italic 12px/1.3 var(--serif); }

/* body copy */
.np-columns { column-count: 3; column-gap: 26px; column-rule: 1px solid var(--rule-soft); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.np-cols-2 { column-count: 2; }
.np-columns p { margin: 0 0 0.8em; text-indent: 1.2em; }
.np-columns p:first-child, .np-columns .np-sub + p, .np-columns .np-photo + p, .np-columns .np-pull + p { text-indent: 0; }
.np-dl { font: 800 0.8em/1 var(--sans); letter-spacing: 0.06em; }
.np-sub { margin: 16px 0 6px; font: 900 23px/1.15 var(--head); text-align: left; break-after: avoid; }
.np-pull {
  margin: 14px 0; padding: 10px 0 8px; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
  font: 700 23px/1.25 var(--head); text-align: left; break-inside: avoid;
}
.np-pull p { margin: 0 0 6px; text-indent: 0; }
.np-pull cite { font: 800 11px/1 var(--sans); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; }
.np-note { font-size: 13px; font-style: italic; color: #444; text-indent: 0 !important; }
.np-columns ul { margin: 0 0 0.8em; padding-left: 1.2em; }
.np-jump { margin: 8px 0 0; font: 800 12px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }

/* black & white halftone photos */
.np-photo { margin: 0 0 12px; break-inside: avoid; }
.np-halftone { position: relative; overflow: hidden; background: var(--newsprint); display: block; }
.np-halftone img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.22) brightness(1.06); mix-blend-mode: multiply;
}
.np-halftone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.26) 0.85px, transparent 1.25px) 0 0 / 3px 3px;
}
.np-photo-lead .np-halftone { aspect-ratio: 16 / 9; max-height: 470px; }
.np-photo-inline .np-halftone img { height: auto; }
.np-photo-brief .np-halftone { aspect-ratio: 16 / 9; }
.np-photo-logo { max-width: 240px; margin: 4px auto 14px; }
.np-photo-logo .np-halftone { aspect-ratio: auto; max-height: none; }
.np-photo-logo .np-halftone img { height: auto; object-fit: contain; }
.np-photo-logo figcaption { text-align: center; }
.np-photo-logo .np-credit, .np-photo-logo .np-caption { text-align: center; }
.np-photo figcaption { padding-top: 4px; border-bottom: 1px solid var(--rule-soft); padding-bottom: 5px; text-align: left; }
.np-credit { display: block; text-align: right; font: 600 10px/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #474747; }
.np-caption { display: block; margin-top: 2px; font: 600 13px/1.35 var(--sans); }

/* draft stamp */
.np-stamp {
  display: block; width: fit-content; margin: 0 4px 8px auto; padding: 4px 10px; transform: rotate(-3deg);
  border: 3px double #a3221a; color: #a3221a; font: 900 12px/1.1 var(--sans);
  letter-spacing: 0.14em; text-transform: uppercase; background: rgba(243, 242, 237, 0.9);
}
.np-draft-tag { color: #a3221a; }

/* front page */
.np-front { display: grid; grid-template-columns: 2fr 1fr; gap: 26px; }
.np-headline-lead { font-size: clamp(34px, 5.2vw, 60px); }
.np-side { border-left: 1px solid var(--rule); padding-left: 22px; }
.np-index { margin-bottom: 14px; border: 2px solid var(--rule); padding: 8px 10px; }
.np-index-h { margin: 0 0 6px; font: 900 13px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; }
.np-index ul { list-style: none; margin: 0; padding: 0; }
.np-index a { display: flex; gap: 6px; align-items: baseline; text-decoration: none; font: 600 13px/1.6 var(--sans); }
.np-index a:hover span:first-child { text-decoration: underline; }
.np-dots { flex: 1; border-bottom: 1px dotted var(--ink); transform: translateY(-3px); }
.np-brief { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--rule); }
.np-brief-h { margin: 4px 0 4px; font: 900 21px/1.12 var(--head); }
.np-brief-h a { text-decoration: none; }
.np-brief-h a:hover { text-decoration: underline; background: none; }
.np-brief-text { margin: 0; font-size: 14px; line-height: 1.5; text-align: justify; hyphens: auto; }
.np-classified { margin-top: 6px; padding: 8px 10px; border: 1px solid var(--rule); font: 12px/1.45 var(--serif); column-count: 1; }
.np-classified-h { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 3px solid var(--rule); text-align: center; font: 900 14px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; }
.np-classified p:last-child { margin: 0; }

/* article footer */
.np-foot { margin-top: 18px; padding-top: 10px; border-top: 3px solid var(--rule); }
.np-related { font: 800 13px/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; }
.np-others { margin: 0; padding: 0; list-style: none; }
.np-others li { padding: 6px 0; border-bottom: 1px solid var(--rule-soft); font: 700 18px/1.25 var(--head); }
.np-others a { text-decoration: none; }
.np-others a:hover { text-decoration: underline; }
.np-others-sec { display: block; font: 800 10px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }

@media (max-width: 900px) {
  .np-columns { column-count: 2; }
  .np-front { grid-template-columns: 1fr; }
  .np-side { border-left: 0; padding-left: 0; border-top: 3px solid var(--rule); padding-top: 14px; }
  .np-nameplate { grid-template-columns: 1fr; }
  .np-ear { display: none; }
}
@media (max-width: 620px) {
  .paper-view { padding: 0; }
  .paper { padding: 12px 16px 32px; font-size: 17px; }
  .np-columns, .np-cols-2 { column-count: 1; }
  .np-skyboxes { grid-template-columns: 1fr; }
  .np-sky { border-right: 0; border-bottom: 1px solid var(--rule-soft); padding: 0 0 6px; }
  .np-stamp, .np-dateline, .np-kicker, .np-back, .np-front-link, .np-classified, .np-brief-text, .np-note, .np-jump, .np-motto,
  .np-sky-sec, .np-sky-h, .np-by, .np-by-role, .np-credit, .np-caption, .np-index a, .np-index-h, .np-others-sec, .np-related, .np-pull cite { font-size: 14px; }
  .np-flag { font-size: 14px; }
  .np-dl { font-size: 14px; }
  .np-deck { font-size: 19px; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 720px) {
  :root { --fs: 15px; --fs-sm: 14px; --fs-lg: 17px; }
  .wrap { padding: 0 16px; }
  .profile { grid-template-columns: 1fr; padding: 12px; border-left: 0; border-right: 0; }
  .brand { font-size: 26px; }
  .search { width: 100%; }
  .search input { flex: 1; width: auto; font-size: 16px; }
  .subnav-inner { flex-direction: column; align-items: flex-start; }
  .prefs select { font-size: 14px; }
  .profile-card h1 { font-size: 24px; }
  .profile-photo { width: 120px; height: 120px; }
  .odometer { font-size: 14px; }
  .network { font-size: 18px; }
  .top8 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .friend img { width: 120px; height: 120px; }
  .comment { grid-template-columns: 1fr; }
  .comment-who { display: flex; align-items: center; gap: 10px; text-align: left; }
  .comment-who img { margin: 0; }
  .act .ico { font-size: 18px; }
  .player-time, .player-screen { font-size: 14px; }
  .player-btn { width: 40px; height: 34px; font-size: 16px; }
  .footer .wrap { border-left: 0; border-right: 0; }
  .dm-form input, .dm-form textarea { font-size: 16px; }
  .friend-stat-v { font-size: 24px; }
  .top8-mini .friend img { width: 64px; height: 64px; }
  .dlg-head { flex-direction: column; }
  .dlg-head h2 { font-size: 22px; }
  .dlg-x { width: 32px; height: 30px; font-size: 18px; }
}
@media (max-width: 380px) {
  .contact-grid { grid-template-columns: 1fr; }
  .profile-row { flex-direction: column; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .marquee-track { white-space: normal; display: block; }
  .marquee-track span[aria-hidden] { display: none; }
  #marquee-toggle { display: none; }
  body::before { display: none !important; }
  .ripple, .laser-tail { display: none !important; }
}

/* keep QR-code images crisp so they stay scannable */
img[src*="-qr."] { image-rendering: pixelated; background: #fff; }
