/* ===== Sidebar Widgets ===== */
.profile-top {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border: 1px solid #808080;
  border-radius: 0;
  object-fit: cover;
  object-position: center 15%;
  background-color: #dcdad5;
  background-image: var(--xp-tex-classic);
  box-shadow: var(--xp-sunken-soft);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.profile-kaomoji {
  font-weight: 700;
  color: var(--ink);
}

.profile-bubble {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #7f9db9;
  border-radius: 0;
  background-color: #eae9e4;
  background-image: var(--xp-tex-panel);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: var(--xp-sunken-soft);
}

.owner-badge-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

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

.social-tile {
  min-height: 82px;
  padding: 10px 6px 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #808080;
  border-radius: 2px;
  background-color: #c8cacd;
  background-image: var(--xp-tex-panel);
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
  color: #003c74;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.social-tile__ico {
  width: 42px;
  height: 42px;
}

.social-tile__label {
  font-family: var(--font-pixel);
  font-size: 11.5px;
  font-weight: 700;
  color: #111827;
}

.social-tile:hover {
  box-shadow:
    inset -1px 1px #fff0cf,
    inset 1px 2px #fdd889,
    inset -2px 2px #fbc761,
    inset 2px -2px #e5a01a;
  border-color: #003c74;
  transform: translateY(-1px);
  text-decoration: none;
}

.side-credit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.side-banner-gif {
  width: 100%;
  height: 46px;
  object-fit: contain;
  border: 1px solid #808080;
  border-radius: 0;
  background-color: #eae9e4;
  background-image: var(--xp-tex-panel);
  box-shadow: var(--xp-sunken-soft);
  padding: 2px;
}

.side-credit-text {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--brown);
}

.side-mascot {
  display: flex;
  justify-content: center;
  padding: 4px 0 0;
}

.side-mascot img {
  max-height: 260px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(15, 45, 78, 0.3));
}

/* ===== Home: Hero Banner + Error Stack + Washi Tape + Slogan ===== */
.hero-win {
  position: relative;
  overflow: visible;
  margin-top: 0;
}

.hero-browser-win {
  border-radius: 8px 8px 0 0;
}

.hero-stage {
  position: relative;
  min-height: 282px;
  border: 1px solid #7f9db9;
  border-radius: 0;
  overflow: hidden;
  background-color: #7cc4f5;
  box-shadow: var(--xp-sunken-soft);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  z-index: 0;
  filter: contrast(1.06) saturate(1.12) sepia(0.05);
}

.hero-aero-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(0deg, rgba(10, 30, 55, 0.06) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 76% 20%, rgba(188, 238, 255, 0.28) 0%, transparent 52%);
}

.hero-char-img {
  position: absolute;
  left: 50%;
  transform: translateX(-34%);
  bottom: -2px;
  height: 282px;
  width: auto;
  max-width: 56%;
  object-fit: contain;
  z-index: 2;
  filter:
    contrast(1.04)
    saturate(1.05)
    drop-shadow(1px 0 0 rgba(0, 210, 255, 0.32))
    drop-shadow(-1px 0 0 rgba(255, 70, 150, 0.24))
    drop-shadow(0 5px 10px rgba(15, 41, 66, 0.28));
  pointer-events: none;
}

.hero-sticker-card {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 196px;
  padding: 5px;
  border: none;
  border-radius: 0;
  background-color: #dcdad5;
  background-image: var(--xp-tex-classic);
  box-shadow: var(--xp-classic-bevel);
  transform: rotate(2.5deg);
  z-index: 3;
}

.hero-sticker-card img {
  width: 100%;
  height: 146px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 3px;
  border: 1px solid var(--line-soft);
  filter: contrast(1.08) saturate(1.1) sepia(0.08);
}

/* Nostalgic Lo-Fi Distortion (applied strictly to non-GALLERY elements) */
.lofi-frame:not(.hero-sticker-card) {
  position: relative;
}

.lofi-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(8, 24, 48, 0.07) 0 1px, transparent 1px 3px),
    radial-gradient(circle at center, transparent 58%, rgba(15, 32, 58, 0.14) 100%);
  z-index: 2;
}

.lofi-media {
  filter:
    contrast(1.07)
    saturate(1.1)
    sepia(0.06)
    drop-shadow(1px 0 0 rgba(0, 215, 255, 0.26))
    drop-shadow(-1px 0 0 rgba(255, 70, 145, 0.22));
}

/* Top-Layer Floating Chrome & Aqua Stickers (always above windows, never blocking clicks) */
.sticker-anchor {
  position: relative;
}

.top-sticker {
  position: absolute;
  z-index: 65;
  pointer-events: none;
  user-select: none;
  height: auto;
  filter:
    contrast(1.07)
    saturate(1.08)
    drop-shadow(1px 0 0 rgba(0, 215, 255, 0.24))
    drop-shadow(0 6px 10px rgba(15, 41, 66, 0.28));
}

.top-sticker--chrome-star {
  width: 56px;
  left: 44%;
  bottom: -16px;
  transform: rotate(-16deg);
}

.top-sticker--chrome-boombox {
  width: 74px;
  left: -20px;
  top: 32px;
  transform: rotate(-12deg);
}

.top-sticker--chrome-pill {
  width: 104px;
  left: 16px;
  bottom: -22px;
  transform: rotate(5deg);
}

.top-sticker--aqua-globe {
  width: 66px;
  right: -16px;
  top: 34px;
  transform: rotate(8deg);
}

.top-sticker--butterfly {
  width: 52px;
  left: 258px;
  top: -22px;
  transform: rotate(-12deg);
}

.top-sticker--blue-star {
  width: 44px;
  left: 184px;
  top: -20px;
  transform: rotate(14deg);
}

.top-sticker--aqua-crt {
  width: 90px;
  right: -10px;
  bottom: -18px;
  transform: rotate(-7deg);
}

.hero-sticker-cap {
  margin-top: 4px;
  font-family: var(--font-pixel);
  font-size: 10.5px;
  text-align: center;
  color: var(--accent-text);
  font-weight: 700;
}

.washi-tape {
  position: absolute;
  width: 96px;
  height: 22px;
  background-color: rgba(186, 232, 186, 0.86);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.45) 0 6px,
    transparent 6px 12px
  );
  border-top: 1px dashed rgba(84, 169, 111, 0.7);
  border-bottom: 1px dashed rgba(84, 169, 111, 0.7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 4;
}

.washi-tape--hero {
  right: -14px;
  bottom: 16px;
  transform: rotate(-28deg);
}

.washi-tape--board {
  right: -12px;
  top: 10px;
  transform: rotate(32deg);
  background-color: rgba(255, 207, 226, 0.88);
  border-color: rgba(196, 69, 105, 0.5);
}

.error-stack {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 3;
  width: 202px;
  height: 228px;
}

.mini-err {
  position: absolute;
  width: 156px;
  padding: 2px;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background-color: #dcdad5;
  background-image: var(--xp-tex-classic);
  box-shadow:
    inset 1px 1px #ffffff,
    inset -1px -1px #0a0a0a,
    inset 2px 2px #dfdfdf,
    inset -2px -2px #808080,
    2px 3px 6px rgba(0, 0, 0, 0.3);
  font-size: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.mini-err:hover {
  transform: translateY(-2px);
}

.mini-err__bar {
  background: var(--xp-classic-bar);
  padding: 2px 5px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #ffffff;
}

.mini-err__body {
  padding: 6px;
  background-color: #dcdad5;
  background-image: var(--xp-tex-classic);
  color: #000000;
  text-align: center;
}

.mini-err__btn {
  margin-top: 5px;
  display: inline-block;
  padding: 1px 12px;
  border: none;
  background-color: #d4d0c8;
  background-image: var(--xp-tex-classic);
  box-shadow:
    inset 1px 1px #ffffff,
    inset -1px -1px #0a0a0a,
    inset 2px 2px #dfdfdf,
    inset -2px -2px #808080;
  color: #000000;
  font-size: 10px;
  font-weight: 700;
}

.hero-slogan {
  position: relative;
  z-index: 5;
  margin-top: -24px;
  margin-left: 12px;
  pointer-events: none;
  font-family: var(--font-pixel);
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-btn);
  -webkit-text-stroke: 5px #ffffff;
  paint-order: stroke fill;
  filter: drop-shadow(0 2px 3px rgba(0, 18, 64, 0.35));
}

/* Marquee (Windows XP Classic Raised Gray Status Strip) */
.marquee-bar {
  border: none;
  border-radius: 0;
  background-color: #ece9d8;
  background-image: var(--xp-tex-luna);
  box-shadow:
    inset 1px 1px #ffffff,
    inset -1px -1px #404040,
    inset 2px 2px #dfdfdf,
    inset -2px -2px #808080,
    0 4px 12px rgba(0, 18, 64, 0.22);
  padding: 5px 12px;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee-scroll 26s linear infinite;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--accent-text);
  font-weight: 700;
}

.marquee-bar:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Real Windows XP Interactive Desktop Shortcut Icons & Window States ===== */
.xp-desk-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 6;
}

.xp-desk-icon {
  width: 74px;
  padding: 5px 3px 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  cursor: pointer;
  color: #ffffff;
  text-align: center;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.xp-desk-icon:hover,
.xp-desk-icon:focus-visible {
  background: rgba(49, 106, 197, 0.34);
  border-color: rgba(255, 255, 255, 0.55);
  outline: none;
}

.xp-desk-icon.is-selected {
  background: rgba(49, 106, 197, 0.58);
  border: 1px dotted rgba(255, 255, 255, 0.92);
}

.xp-desk-icon.is-selected .xp-desk-icon__label {
  background: #316ac5;
  padding: 0 3px;
  border-radius: 1px;
}

.xp-desk-icon:active {
  transform: scale(0.96);
  background: rgba(49, 106, 197, 0.62);
}

.xp-desk-icon__img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 14, 48, 0.52));
  pointer-events: none;
}

.xp-desk-icon__label {
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.25;
  color: #ffffff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.96),
    1px 1px 0 rgba(0, 0, 0, 0.85),
    0 0 5px rgba(0, 18, 56, 0.8);
  word-break: keep-all;
}

.xp-desk-icon.is-closed {
  background: rgba(16, 48, 96, 0.24);
  border-color: rgba(255, 255, 255, 0.35);
}

.xp-desk-icon.is-closed .xp-desk-icon__label::after {
  content: " ●";
  color: #7dfcd4;
  font-size: 9px;
}

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

@keyframes xp-win-pop {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.is-win-opening {
  animation: xp-win-pop 0.16s ease-out;
}

/* ===== Home: User-Curated Overlapping Windows XP Desktop Layout ===== */
@media (min-width: 1100px) {
  body[data-page="home"] .shell-grid {
    position: relative;
    display: block;
    width: 100%;
    max-width: 1840px;
    min-height: 1745px;
    margin: 0 auto;
    padding: 0;
  }

  body[data-page="home"] .sidebar,
  body[data-page="home"] .main-col,
  body[data-page="home"] .desktop-cluster,
  body[data-page="home"] .cluster-right {
    display: contents;
  }

  /* Left, Top-Right & Mid-Right Open-Sky Windows XP Desktop Icon Docks (all 12 directly clickable!) */
  body[data-page="home"] .xp-desk-dock--left {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: repeat(3, 74px);
    gap: 6px 4px;
    z-index: 6;
  }

  body[data-page="home"] .xp-desk-dock--right {
    position: absolute;
    top: 10px;
    right: 12px;
    display: grid;
    grid-template-columns: repeat(2, 74px);
    gap: 6px 6px;
    z-index: 6;
  }

  body[data-page="home"] .xp-desk-dock--midright {
    position: absolute;
    top: 586px;
    right: 18px;
    display: grid;
    grid-template-columns: repeat(3, 74px);
    gap: 6px 6px;
    z-index: 6;
  }

  /* Anchored Hero Browser (Matches User Screenshot!) */
  body[data-page="home"] .hero-win {
    position: absolute;
    top: 10px;
    left: 22.5%;
    width: min(960px, 57.5%);
    margin: 0;
    z-index: 14;
  }

  /* Marquee Ticker tucked right below Hero slogan */
  body[data-page="home"] .marquee-bar {
    position: absolute;
    top: 376px;
    left: 26.5%;
    width: min(760px, 46%);
    margin: 0;
    z-index: 20;
  }

  /* Left Wing — Matching User's Hand-Arranged Screenshot Exactly! */
  body[data-page="home"] .sidebar > .win:nth-child(1) {
    position: absolute;
    top: 118px;
    left: 2%;
    width: 268px;
    margin: 0;
    z-index: 22;
  }

  body[data-page="home"] .sidebar > .win:nth-child(2) {
    position: absolute;
    top: 318px;
    left: 8.2%;
    width: 212px;
    margin: 0;
    z-index: 26;
  }

  body[data-page="home"] .sidebar > .win:nth-child(3) {
    position: absolute;
    top: 470px;
    left: 3.6%;
    width: 260px;
    margin: 0;
    z-index: 28;
  }

  body[data-page="home"] .sidebar .side-mascot {
    position: absolute;
    top: 642px;
    left: 2.2%;
    width: 178px;
    margin: 0;
    padding: 0;
    z-index: 30;
    cursor: grab;
  }

  /* Flip-Phone Drink Window right next to Mascot, overlapping Reminder & Player left! */
  body[data-page="home"] .cluster-drink {
    position: absolute;
    top: 590px;
    left: 11.2%;
    width: 214px;
    margin: 0;
    z-index: 32;
  }

  /* Center-Left: Y2K Metallic LO-FI PLAYER + Pinned Memo (Matches Image 1!) */
  body[data-page="home"] .cluster-left {
    position: absolute;
    top: 486px;
    left: 22.8%;
    width: 256px;
    margin: 0;
    z-index: 25;
  }

  body[data-page="home"] .cluster-left .pinned-memo {
    margin-top: -12px;
    margin-left: 12px;
    width: 244px;
    transform: rotate(-1.6deg);
    z-index: 29;
  }

  /* Center: open — GIF_COLLECTION.DOC (ON TOP OF BULLETIN.TXT, never clipping LO-FI PLAYER right edge!) */
  body[data-page="home"] .cluster-gifdoc {
    position: absolute;
    top: 454px;
    left: max(39.3%, calc(22.8% + 266px));
    right: calc(2% + 294px);
    width: auto;
    margin: 0;
    z-index: 30;
  }

  /* Right Wing: BULLETIN.TXT overlapping Hero bottom-right, behind GIF_COLLECTION.DOC (Matches Image 1!) */
  body[data-page="home"] .cluster-bulletin {
    position: absolute;
    top: 294px;
    right: 2%;
    width: min(440px, 27.5%);
    margin: 0;
    z-index: 24;
  }

  /* Bottom-Right Wing: MEMOS.TXT cleanly below Bulletin */
  body[data-page="home"] .cluster-memo {
    position: absolute;
    top: 728px;
    left: auto;
    right: 2%;
    width: 284px;
    margin: 0;
    z-index: 33;
  }

  /* Lower Scrollable Windows (Matches Image 2: UPDATES left, GALLERY overlapping right ON TOP, CHAT BOX centered & much wider!) */
  body[data-page="home"] .updates-win-wrap {
    position: absolute;
    top: 948px;
    left: 3.5%;
    width: min(640px, 41.5%);
    margin: 0;
    z-index: 25;
  }

  body[data-page="home"] .gallery-win-wrap {
    position: absolute;
    top: 1036px;
    left: 39.6%;
    right: auto;
    width: min(880px, 53.5%);
    margin: 0;
    z-index: 30;
  }

  body[data-page="home"] .chat-win-wrap {
    position: absolute;
    top: 1300px;
    left: 13%;
    width: 74%;
    margin: 0;
    z-index: 32;
  }

  /* Draggable titlebar cursor cue on desktop */
  body[data-page="home"] .win > .win__bar,
  body[data-page="home"] .memo-mini-bar,
  body[data-page="home"] .pinned-memo {
    cursor: grab;
  }

  body[data-page="home"] .is-dragging,
  body[data-page="home"] .is-dragging .win__bar {
    cursor: grabbing !important;
  }
}

/* Click-to-front visual cue */
.desktop-win {
  transition: box-shadow 0.14s ease;
}

/* Y2K Rhinestone Flip-Phone Drink Window (drink.jpg + melon soda screen + close btn) */
.drink-phone-win {
  position: relative;
  width: 224px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  transform: rotate(-2deg);
}

.drink-phone-win:hover {
  transform: rotate(-1deg) translateY(-2px);
}

.drink-phone-close {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 5;
  opacity: 0.85;
}

.drink-phone-close:hover {
  opacity: 1;
}

.drink-phone-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 14px 24px rgba(0, 18, 64, 0.36));
  user-select: none;
}

.drink-phone-tag {
  margin-top: -14px;
  position: relative;
  z-index: 2;
  padding: 2px 10px;
  background-color: #cecbc0;
  background-image: var(--xp-tex-luna);
  border: 1px solid #003c74;
  box-shadow: inset 1px 1px #ffffff, 0 3px 8px rgba(0, 18, 64, 0.25);
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: 700;
  color: #003c74;
}

/* ===== Home: Row 2 Collage (legacy helpers kept for compatibility) ===== */
.collage-row {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.collage-left-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Outer LO-FI PLAYER Frame (Windows XP Classic wrapper) */
.player-win-frame {
  overflow: visible;
  border-radius: 0;
}

.player-win-frame > .win__bar {
  border-radius: 0;
}

.player-win-frame .player-card {
  border: none;
  border-radius: 0;
}

/* Y2K 2001-2003 Brushed Silver-Chrome Hardware Discman / Winamp MP3 Player */
.player-card {
  position: relative;
  border: 1px solid #586270;
  border-radius: 4px;
  padding: 10px 12px 14px;
  background-color: #bcc3ce;
  background-image:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.22) 0 1px,
      rgba(68, 78, 94, 0.08) 1px 2px
    ),
    linear-gradient(155deg, #eef1f6 0%, #c8cfd9 34%, #9da6b5 54%, #c6cdd8 78%, #dfe4ec 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.92),
    inset -1px -1px 0 rgba(56, 65, 78, 0.72),
    inset 0 0 0 3px rgba(154, 164, 179, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.y2k-player__top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 6px;
  border: 1px solid #6e7785;
  background: linear-gradient(180deg, #3b4452 0%, #232a34 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 0 rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: #cdd6e2;
}

.y2k-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #a7ffd1 0%, #22c55e 65%, #115e2d 100%);
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.85);
  flex-shrink: 0;
}

.y2k-player.is-playing .y2k-led {
  background: radial-gradient(circle at 35% 35%, #d9fff0 0%, #34f5a8 60%, #059669 100%);
  box-shadow: 0 0 8px #34f5a8;
}

.y2k-brand {
  font-weight: 700;
  color: #e6edf7;
}

.y2k-spec {
  padding: 0 4px;
  background: #102422;
  border: 1px solid #3c8c78;
  color: #6df7cc;
  font-size: 9px;
}

.cd-stage {
  position: relative;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #18202b 0%, #293240 78%, #545f70 100%);
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.72),
    inset 0 -2px 4px rgba(255, 255, 255, 0.25),
    0 2px 0 rgba(255, 255, 255, 0.85),
    0 -1px 0 rgba(62, 70, 84, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-wrap {
  position: relative;
  width: 158px;
  height: 158px;
  border-radius: 50%;
  border: 2px solid #dfe5ef;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 4px 10px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  background: #1a222d;
}

.cd-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.cd-sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 25deg,
    rgba(255, 255, 255, 0.38),
    rgba(110, 235, 255, 0.26),
    rgba(255, 160, 230, 0.26),
    rgba(255, 255, 255, 0.14),
    rgba(130, 255, 200, 0.24),
    rgba(255, 255, 255, 0.38)
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

.cd-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 232, 242, 0.65) 0%, rgba(160, 172, 190, 0.45) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.cd-wrap.is-spinning {
  animation: cd-spin 10s linear infinite;
}

.cd-hole {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #232b36;
  border: 2px solid #cbd3df;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65);
}

.cd-swirl-sticker {
  position: absolute;
  right: -16px;
  bottom: -10px;
  width: 66px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 65;
  pointer-events: none;
  transform: rotate(12deg);
  filter: drop-shadow(0 4px 8px rgba(10, 20, 38, 0.42));
}

.cd-swirl-sticker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

/* Y2K Dark Phosphor Dot-Matrix LCD Display */
.player-lcd {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(109, 247, 204, 0.06) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #091716 0%, #102a26 60%, #0b201d 100%);
  border: 2px solid #4d5664;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  padding: 6px;
}

.player-thumb {
  width: 44px;
  height: 44px;
  border-radius: 2px;
  border: 1px solid #3d8e7a;
  object-fit: cover;
  object-position: center 20%;
}

.player-lcd__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
}

.player-lcd__title {
  font-size: 11px;
  font-weight: 700;
  color: #7dfcd4;
  text-shadow: 0 0 6px rgba(109, 247, 204, 0.5);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-lcd__sub {
  font-size: 10px;
  color: #4cc4a2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-lcd__eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
  margin-top: 2px;
}

.player-lcd__eq i {
  display: block;
  width: 5px;
  height: 3px;
  background: linear-gradient(180deg, #a7ff7a 0%, #34e8b4 100%);
  opacity: 0.72;
}

.player-lcd__eq i:nth-child(2) { height: 6px; }
.player-lcd__eq i:nth-child(3) { height: 9px; }
.player-lcd__eq i:nth-child(4) { height: 5px; }
.player-lcd__eq i:nth-child(5) { height: 8px; }
.player-lcd__eq i:nth-child(6) { height: 4px; }
.player-lcd__eq i:nth-child(7) { height: 7px; }

.y2k-player.is-playing .player-lcd__eq i {
  animation: eq-bounce 0.65s ease-in-out infinite alternate;
}

.y2k-player.is-playing .player-lcd__eq i:nth-child(even) {
  animation-delay: 0.22s;
}

@keyframes eq-bounce {
  0% { transform: scaleY(0.35); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}

.player-progress {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #1f2733;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.player-bar {
  position: relative;
  flex: 1;
  height: 8px;
  border: 1px solid #4e5866;
  border-radius: 2px;
  background: #141e26;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.player-bar__fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 1px;
  background: linear-gradient(90deg, #1ea884 0%, #6cf7cc 100%);
  box-shadow: 0 0 6px rgba(108, 247, 204, 0.55);
  transition: width 0.2s linear;
}

.player-knob {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #374151;
  background: linear-gradient(180deg, #ffffff 0%, #c8d0dc 55%, #8f99a8 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.hw-btn {
  min-width: 48px;
  height: 27px;
  border: 1px solid #485260;
  border-radius: 3px;
  background: linear-gradient(180deg, #f5f7fa 0%, #d2d8e2 48%, #b3bcc9 52%, #dde2ea 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(88, 98, 114, 0.75),
    0 2px 4px rgba(15, 23, 42, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: #182230;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.hw-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset 0 0 0 1px rgba(108, 247, 204, 0.6),
    0 3px 6px rgba(15, 23, 42, 0.34);
}

.hw-btn:active {
  transform: translateY(1px);
  background: linear-gradient(180deg, #aeb7c4 0%, #ced5df 100%);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
}

/* Pinned Crumpled Memo Paper beneath Player (XP Bright-Gray Bitmap Surface) */
.pinned-memo {
  position: relative;
  z-index: 6;
  margin-top: -6px;
  padding: 22px 24px 16px 14px;
  border: none;
  border-radius: 0;
  background-color: #e8e7e1;
  background-image:
    repeating-linear-gradient(180deg, transparent 0 21px, rgba(128, 134, 146, 0.28) 21px 22px),
    var(--xp-tex-panel);
  background-size: auto, 128px 128px;
  box-shadow: var(--xp-classic-bevel);
  transform: rotate(-1deg);
}

.memo-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #d4d8df 48%, #7d8594 100%);
  border: 1px solid #4c525e;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.32);
}

.memo-text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 22px;
  color: var(--brown);
  font-weight: 700;
}

.memo-stickers {
  position: absolute;
  right: 6px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.memo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.8);
}

/* Scrapbook Collage Board (Right of Player) — Inside Authentic Windows XP Luna Document Window */
.scrapbook-host {
  min-width: 0;
}

.scrapbook-aqua-win {
  overflow: visible;
}

.scrapbook-aqua-win > .win__bar {
  border-radius: 8px 8px 0 0;
}

.scrapbook-aqua-win > .win__aquabar {
  border-radius: 0;
}

/* GIF Collection Board inside XP Luna Document Window (Vertical split: Left gif1, Right stacked gif2 + gif3) */
.gif-doc-board {
  position: relative;
  padding: 10px;
  background-color: #cecbc0;
  background-image: var(--xp-tex-luna);
  background-repeat: repeat;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 0.85fr);
  gap: 8px;
  align-items: stretch;
}

.gif-card--left {
  height: 100%;
  min-height: 224px;
  background: #1a2433;
}

.gif-pair-vert {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gif-pair-vert .gif-card {
  aspect-ratio: 1 / 1;
  background: #1d2633;
}

.scrapbook-board {
  position: relative;
  border: none;
  border-radius: 0;
  padding: 12px 12px 10px;
  background-color: #cecbc0;
  background-image: var(--xp-tex-luna);
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scrapbook-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.scrapbook-bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: start;
}

/* Shared refer2.jpg Classic XP Mini Titlebar for MEMOS */
.memo-mini-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  background: var(--xp-classic-bar);
  border-bottom: 1px solid #404040;
  font-family: var(--font-pixel);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 10, 50, 0.75);
}

.memo-mini-bar .ico {
  width: 14px;
  height: 14px;
  padding: 2px;
  background-color: #d4d0c8;
  background-image: var(--xp-tex-classic);
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #0a0a0a;
  color: #000000;
}

/* 3D Metallic Spiral Ring Notebook (MEMOS · 公告栏 on XP Bright-Gray Bitmap) */
.notebook {
  position: relative;
  border: none;
  border-radius: 0;
  padding: 3px;
  box-shadow: var(--xp-classic-bevel);
  overflow: hidden;
  background-color: #dcdad5;
  background-image: var(--xp-tex-classic);
}

/* Vintage Kraft Lined Paper Bulletin Board (bulletin.jpg) */
.bulletin-paper-bg {
  position: relative;
  padding: 18px 20px 24px 48px;
  min-height: 222px;
  overflow: hidden;
  background-color: #dfd4be;
  background-image: url("../img/web/bulletin-paper.jpg");
  background-size: cover;
  background-position: left top;
  box-shadow: var(--xp-sunken-soft);
  color: #261e16;
}

.bulletin-paper-bg::before {
  display: none;
}

.bulletin-paper-bg .notebook__title {
  color: #241911;
  text-shadow: 0 1px 0 rgba(255, 250, 240, 0.65);
}

.bulletin-paper-bg .notebook__list {
  color: #2a2017;
  font-weight: 600;
}

.bulletin-paper-bg .notebook__list li {
  border-bottom: none;
  padding: 4px 0;
  line-height: 1.85;
}

.bulletin-paper-bg .notebook-paws {
  color: rgba(168, 72, 62, 0.45);
}

.notebook-paws {
  position: absolute;
  right: 12px;
  top: 8px;
  display: flex;
  gap: 8px;
  color: rgba(180, 223, 251, 0.85);
  pointer-events: none;
}

.bandaid-sticker {
  position: absolute;
  right: 26%;
  bottom: -6px;
  width: 68px;
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f3cfb2 0 28%, #f9e3cf 28% 72%, #f3cfb2 72% 100%);
  border: 1px solid rgba(180, 130, 95, 0.45);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: rotate(-14deg);
  pointer-events: none;
}

.notebook__title {
  position: relative;
  margin: 0 0 6px;
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notebook__list {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.75;
}

.notebook__list li {
  border-bottom: 1px dashed var(--accent-border);
  padding: 2px 0;
}

/* Animated GIF Cards (Independent of GALLERY, XP Sunken Bevel) */
.gif-card {
  position: relative;
  border: 2px solid #808080;
  border-radius: 0;
  overflow: hidden;
  background: #1a2433;
  box-shadow:
    inset 1px 1px #404040,
    inset -1px -1px #ffffff,
    0 2px 6px rgba(0, 18, 64, 0.16);
}

.gif-card--mint {
  border-color: #808080;
}

.gif-card--top {
  aspect-ratio: 4 / 3;
  height: auto;
  background: #1a2433;
}

.gif-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.gif-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid #003c74;
  background-color: #ece9d8;
  background-image: var(--xp-tex-luna);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #003c74;
}

/* Scalloped Lace Doily + Authentic Cream Soda (on XP Bright-Gray Bitmap Panel) */
.scallop-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid #808080;
  border-radius: 0;
  background-color: #eae9e4;
  background-image:
    radial-gradient(rgba(127, 157, 185, 0.25) 1.2px, transparent 1.2px),
    var(--xp-tex-panel);
  background-size: 12px 12px, 128px 128px;
  box-shadow: var(--xp-sunken-soft);
}

.scallop-badge {
  width: 168px;
  height: 168px;
  border-radius: 42% 58% 48% 52% / 52% 44% 56% 48%;
  border: 5px dotted var(--accent-strong);
  padding: 7px;
  background-color: #ece9d8;
  background-image: var(--xp-tex-luna);
  box-shadow: 0 4px 12px rgba(0, 18, 64, 0.18);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scallop-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.scallop-cap {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--ink);
  background-color: #ece9d8;
  background-image: var(--xp-tex-luna);
  padding: 1px 8px;
  border-radius: 2px;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px #ffffff;
}

.collage-lower-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gif-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.gif-pair .gif-card {
  aspect-ratio: 1 / 1;
  background: #1d2633;
}

/* Signature MEMOS Classic XP Mini-Window overlapping bottom-right decorative status bar */
.stationery-memo-win {
  padding: 3px;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background-color: #dcdad5;
  background-image: var(--xp-tex-classic);
  box-shadow: var(--xp-classic-bevel);
}

.stationery-note {
  position: relative;
  border: none;
  border-radius: 0;
  padding: 8px 14px 12px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--xp-sunken-soft);
}

.stationery-note::after {
  display: none;
}

/* ===== Home: UPDATES, GALLERY, CHAT BOX base wrappers (desktop coords in @media min-width: 1100px) ===== */
.updates-win-wrap,
.gallery-win-wrap,
.chat-win-wrap {
  position: relative;
}

.updates-sticker {
  position: absolute;
  top: -26px;
  right: 96px;
  height: 88px;
  width: auto;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(36, 92, 136, 0.22));
}

.update-row {
  border-bottom: 1px solid #aca899;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  padding: 7px 10px;
}

.update-row:last-child {
  border-bottom: none;
}

.update-row summary {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  cursor: pointer;
}

.update-row summary::-webkit-details-marker {
  display: none;
}

.update-row__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.date-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--accent-text);
}

.update-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.update-summary {
  margin: 6px 0 2px 62px;
  padding: 6px 10px;
  border: 1px solid #9f9c8e;
  background-color: #eae9e4;
  background-image: var(--xp-tex-panel);
  box-shadow: var(--xp-sunken-soft);
  font-size: 12.5px;
  color: var(--brown);
}

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

.gallery-btn {
  position: relative;
  padding: 2px;
  border: 1px solid #808080;
  border-radius: 0;
  background-color: #e6e5df;
  background-image: var(--xp-tex-panel);
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.gallery-btn:hover {
  transform: translateY(-2px);
  border-color: #003c74;
  box-shadow:
    inset -1px 1px #fff0cf,
    inset 1px 2px #fdd889,
    0 4px 10px rgba(0, 18, 64, 0.2);
}

.gallery-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
}

.gallery-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 6px;
  border-radius: 2px;
  background-color: #ece9d8;
  background-image: var(--xp-tex-luna);
  border: 1px solid #003c74;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

.gal-mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.gal-preview-box {
  width: 100%;
  height: 168px;
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius-m);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--brown);
}

.gal-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--accent-border);
}

.chat-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-bottom: 1px solid #aca899;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.chat-row:last-child {
  border-bottom: none;
}

.chat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #404040;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.chat-bubble {
  display: inline-block;
  margin-top: 3px;
  padding: 4px 10px;
  border: 1px solid #7f9db9;
  border-radius: 0;
  background-color: #eae9e4;
  background-image: var(--xp-tex-panel);
  box-shadow: var(--xp-sunken-soft);
  font-size: 12.5px;
  color: var(--ink);
}

.chat-date {
  font-size: 11px;
  color: var(--brown);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.chat-reply {
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 0;
  border: 1px solid #808080;
  background-color: #ece9d8;
  background-image: var(--xp-tex-luna);
  box-shadow: inset 1px 1px #ffffff;
  font-size: 12px;
  color: var(--ink);
}

.chat-footer {
  padding: 7px 10px;
  text-align: center;
  border-top: 1px solid #aca899;
  background-color: #e4e3dc;
  background-image: var(--xp-tex-panel);
}

/* ===== Guestbook Page ===== */
.gb-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-block;
}

.gb-footnote {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--brown);
}

/* ===== Owner: Posts & Archive ===== */
.posts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: var(--gap);
  align-items: start;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.toolbar .input98 {
  flex: 1 1 180px;
}

.toolbar .select98 {
  width: auto;
  min-width: 110px;
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-filter {
  cursor: pointer;
}

.tag-filter.is-active {
  background: var(--accent-text);
  color: #ffffff;
}

.post-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item__thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  object-fit: cover;
}

/* ===== Owner: Post Reader ===== */
.post-header {
  border-bottom: 1px dashed var(--accent-border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.post-header h1 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.3;
  color: var(--ink);
}

.post-cover {
  max-height: 300px;
  width: 100%;
  object-fit: contain;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  margin-bottom: 16px;
}

.post-prose {
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

.post-prose h2,
.post-prose h3 {
  margin: 20px 0 8px;
  color: var(--accent-text);
  font-family: var(--font-pixel);
}

.post-prose pre {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background-color: #ffffff;
  background-image:
    linear-gradient(to right, rgba(160, 196, 232, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160, 196, 232, 0.24) 1px, transparent 1px);
  background-size: 16px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
}

.post-prose code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.post-prose pre code {
  padding: 0;
  background: transparent;
}

.post-prose blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px dashed var(--accent-border);
  border-left: 4px solid var(--accent-strong);
  background: var(--accent-soft);
  border-radius: var(--radius-s);
}

.post-nav {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== Owner: Editor ===== */
.editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.editor-tabs {
  display: none;
  gap: 6px;
  margin-bottom: 8px;
}

.cover-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cover-opt {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
}

.cover-opt img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 2px solid var(--line-soft);
  border-radius: var(--radius-s);
}

.cover-opt input:checked + img {
  border-color: var(--accent-text);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ===== Owner: About & Settings ===== */
.sys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sys-table th,
.sys-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.sys-table th {
  width: 120px;
  color: var(--brown);
}

.skill-bar {
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--accent-strong) 0 8px,
    var(--accent) 8px 10px
  );
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

/* ===== Responsive Refinements (Clean Stacked Layout <= 1099px) ===== */
@media (max-width: 1099px) {
  .xp-desk-dock {
    justify-content: center;
    padding: 4px 2px 2px;
  }
  .xp-desk-icon {
    width: 66px;
  }
  .xp-desk-icon__img {
    width: 38px;
    height: 38px;
  }
  .desktop-cluster {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .cluster-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }
  .cluster-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .updates-win-wrap,
  .gallery-win-wrap,
  .chat-win-wrap {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
  }
  .drink-phone-win {
    width: min(260px, 84vw);
    margin: 0 auto;
    transform: none;
  }
  .collage-row {
    grid-template-columns: 1fr;
  }
  .collage-left-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .pinned-memo {
    margin-top: 0;
  }
  .stationery-memo-win {
    margin-bottom: 0;
    margin-right: 0;
  }
  .hero-sticker-card {
    width: 164px;
  }
  .hero-char-img {
    right: 20%;
    height: 235px;
  }
  .posts-layout {
    grid-template-columns: 1fr;
  }
  .editor-split {
    grid-template-columns: 1fr;
  }
  .editor-tabs {
    display: flex;
  }
  .editor-pane.is-hidden-mobile {
    display: none;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .main-col {
    padding: 6px;
  }
  .hero-stage {
    min-height: 210px;
  }
  .win-layered-wrap::before {
    top: -5px;
    left: -4px;
    right: 10px;
    bottom: 8px;
  }
  .win__menubar {
    display: none;
  }
  .hero-char-img {
    left: auto;
    transform: none;
    right: 4px;
    height: 196px;
    max-width: 66%;
  }
  .hero-sticker-card {
    display: none;
  }
  .top-sticker--chrome-boombox {
    width: 54px;
    left: -6px;
    top: 32px;
  }
  .top-sticker--aqua-globe {
    width: 46px;
    right: -4px;
    top: 32px;
  }
  .top-sticker--aqua-crt {
    width: 58px;
    right: 2px;
    bottom: -10px;
  }
  .top-sticker--chrome-star,
  .top-sticker--chrome-pill,
  .top-sticker--butterfly,
  .top-sticker--blue-star {
    display: none;
  }
  .error-stack {
    transform: scale(0.56);
    transform-origin: top left;
    left: 4px;
    top: 4px;
  }
  .hero-slogan {
    margin-top: -16px;
    margin-left: 6px;
    font-size: clamp(20px, 6.4vw, 28px);
    -webkit-text-stroke: 3px #ffffff;
  }
  .cluster-left,
  .collage-left-stack {
    grid-template-columns: 1fr;
  }
  .scrapbook-top,
  .scrapbook-bottom {
    grid-template-columns: 1fr;
  }
  .gif-card--top {
    aspect-ratio: 4 / 3;
    height: auto;
  }
  .gif-doc-board {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
    gap: 6px;
    padding: 8px;
  }
  .gif-card--left {
    min-height: 170px;
  }
  .updates-sticker {
    display: none;
  }
  .gallery-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-strip--odd .gallery-btn:last-child {
    grid-column: 1 / -1;
    aspect-ratio: 2 / 1;
  }
  .post-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .post-item__actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
  }
  .update-summary {
    margin-left: 0;
  }
}

/* ===== R2 Full-Res Inline Images & Editor Upload Bar ===== */
.post-figure {
  margin: 14px 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 45, 78, 0.08);
  text-align: center;
}

.post-inline-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 3px;
  cursor: zoom-in;
}

.post-cover {
  cursor: zoom-in;
}

.post-figure__cap {
  margin-top: 6px;
  font-size: 12px;
  color: var(--brown);
  line-height: 1.4;
}

.editor-media-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border: 1px solid #7f9db9;
  background: #f5f9ff;
  border-radius: 3px;
}

.editor-drop-active {
  outline: 2px dashed #316ac5 !important;
  background: #eef6ff !important;
}
