/* ══════════════════════════════════════════════
   BACKGROUND ASSIGNMENTS
   ══════════════════════════════════════════════ */
:root {
  --bg-body:       url('images/bg-plaid.png');
  --bg-window:     url('images/bg-polka-wide.png');
  --bg-header:     url('images/bg-carousel.png');
  --bg-sidebox:    url('images/bg-polka.png');
  --bg-post:       url('images/bg-lined-bordered.png');
  --bg-footer:     url('images/bg-stars.png');

  /* Text palette */
  --tx-body:    #4599E8;
  --tx-link:    #12A0FF;
  --tx-hover:   #FF91CA;
  --tx-head:    #FF91CA;
  --tx-meta:    #7fa8d8;
  --tx-soft:    #a8c4e0;
}

/* ══════════════════════════════════════════════
   FONTS
   ══════════════════════════════════════════════ */
@font-face {
  font-family: 'pixel';
  src: url('fonts/Alice_in_Wonderland_3.ttf') format('truetype');
}
@font-face {
  font-family: 'display';
  src: url('fonts/Beyond_Wonderland.ttf') format('truetype');
}

/* ══════════════════════════════════════════════
   CUSTOM CURSORS
   ══════════════════════════════════════════════ */
* { cursor: url('cursors/cursor-default.gif'), auto; }

a, a *,
button,
.greybtn,
.tablinks,
summary,
[role="button"],
.guestbook-btn {
  cursor: url('cursors/cursor-pointer.gif'), pointer;
}

input,
textarea,
.expanding-input,
[contenteditable] {
  cursor: url('cursors/cursor-text.gif') 16 16, text;
}

.resizable-nwse { cursor: url('cursors/cursor-nwse.gif') 4 4,   nwse-resize; }
.resizable-nesw { cursor: url('cursors/cursor-nesw.gif') 28 4,  nesw-resize; }
.resizable-ew   { cursor: url('cursors/cursor-ew.gif')   4 16,  ew-resize;   }
.resizable-ns   { cursor: url('cursors/cursor-ns.gif')   16 4,  ns-resize;   }
.draggable      { cursor: url('cursors/cursor-move.gif') 16 16, move;        }

.help, [title]         { cursor: url('cursors/cursor-help.gif'),      help;        }
.art-canvas, .pen-tool { cursor: url('cursors/cursor-pen.gif') 2 2,   crosshair;   }
.loading               { cursor: url('cursors/cursor-wait.gif'),      wait;        }
.is-loading            { cursor: url('cursors/cursor-progress.gif'),  progress;    }
.precision, .cell      { cursor: url('cursors/cursor-plus.gif') 16 16, cell;       }
.alias                 { cursor: url('cursors/cursor-alias.gif'),     alias;       }
[disabled], .disabled  { cursor: url('cursors/cursor-forbidden.gif'), not-allowed; }
.busy                  { cursor: url('cursors/cursor-dots.gif'),      progress;    }

.idia-keyboard-widget,
.idia-keyboard-widget *,
.idia-keyboard,
.idia-keyboard * {
  cursor: url('cursors/cursor-cat-idle.gif') 16 16, auto;
}

/* ══════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  padding: 24px 12px 60px;
  font-family: 'pixel', monospace;
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--tx-body);
  text-align: center;
  background-color: #fdf6fb;
  background-image: var(--bg-body);
  background-size: 320px;
  background-repeat: repeat;
  background-attachment: fixed;
}

a { color: var(--tx-link); text-decoration: none; }
a:hover { color: var(--tx-hover); text-decoration: underline; }
img { image-rendering: pixelated; max-width: 100%; }

/* ══════════════════════════════════════════════
   DECORATIVE PLUSHLES
   ══════════════════════════════════════════════ */
.keychain-wrap {
  position: fixed;
  top: 0;
  left: 24px;
  z-index: 50;
  pointer-events: none;
}

.keychain-wrap::before {
  content: "";
  display: block;
  width: 2px;
  height: 32px;
  margin: 0 auto;
  background: #12A0FF;
  border-radius: 1px;
}

.keychain-plush {
  display: block;
  width: 125px;
  height: auto;
  pointer-events: auto;
  transition: transform .3s ease;
  transform-origin: top center;
  filter: drop-shadow(2px 4px 0 rgba(150, 130, 180, .25));
}

.keychain-plush:hover {
  transform: rotate(6deg);
}

.cat-plush {
  position: absolute;
  bottom: -67px;
  right: 469px;
  width: 78px;
  height: auto;
  z-index: 2;
  transition: transform .25s ease;
  filter: drop-shadow(2px 3px 0 rgba(150, 130, 180, .25));
}

.cat-plush:hover {
  transform: scale(1.12) rotate(-6deg);
}

.sitting-plush {
  position: absolute;
  bottom: -20px;
  left: 12%;
  transform: translateX(-50%);
  width: 320px;
  height: auto;
  z-index: 3;
  pointer-events: auto;
  transition: transform .25s ease;
  filter: drop-shadow(2px 4px 0 rgba(150, 130, 180, .22));
}

.sitting-plush:hover {
  transform: translateX(-50%) scale(1.06);
}

/* ══════════════════════════════════════════════
   MUSIC PLAYER — grid layout
   ══════════════════════════════════════════════ */
.music-player {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;

  display: grid;
  grid-template-columns: auto 130px 1fr 44px;
  align-items: center;
  column-gap: 10px;

  width: min(620px, calc(100% - 220px));
  padding: 8px 14px;

  background: #ffffff;
  border: 2px solid #53A9FF;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(83, 169, 255, .3);
  font-family: 'pixel', monospace;
}

.mp-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.mp-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  color: #53A9FF;
  padding: 2px 4px;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}

.mp-btn:hover { color: #ff91ca; transform: scale(1.15); }
.mp-btn:active { transform: scale(0.95); }

.mp-info {
  overflow: hidden;
  text-align: left;
  line-height: 1.2;
}

.mp-title {
  font-size: 16px;
  color: #53A9FF;
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-time {
  font-size: 11px;
  color: #7fa8d8;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mp-bar {
  position: relative;
  height: 22px;
  width: 100%;
}

.mp-bar::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  transform: translateY(-50%);
  background: #e3f0ff;
  border-radius: 3px;
  pointer-events: none;
}

.mp-progress {
  position: absolute;
  top: 50%;
  left: 0;
  height: 6px;
  width: 0%;
  transform: translateY(-50%);
  background: #53A9FF;
  border-radius: 3px;
  pointer-events: none;
  transition: width .15s linear;
}

.mp-marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 2px rgba(83, 169, 255, .5));
  transition: left .15s linear;
}

.mp-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* Small screens */
@media (max-width: 820px) {
  .music-player {
    width: calc(100% - 40px);
    padding: 6px 10px;
    column-gap: 6px;
    grid-template-columns: auto 84px 1fr 38px;
  }
  .mp-title  { font-size: 16px; }
  .mp-marker { width: 20px; height: 20px; }
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
.site-header {
  max-width: 980px;
  margin: 0 auto 14px;
  padding: 28px 20px 22px;
  position: relative;
  background-image: var(--bg-header);
  background-size: cover;
  background-position: center 30%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(150, 130, 180, .18);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, .55) 0%,
    rgba(255, 255, 255, .75) 60%,
    rgba(255, 255, 255, .88) 100%
  );
  z-index: 0;
}

.site-header > * { position: relative; z-index: 1; }

.site-header h1 {
  font-family: 'display', 'pixel', sans-serif;
  font-size: 30px;
  letter-spacing: 3px;
  margin: 0 0 4px;
  color: var(--tx-head);
  text-shadow: 2px 2px 0 #ffffff, 4px 4px 0 #ffd6ea;
}

.tagline {
  margin: 0;
  font-size: 11px;
  color: var(--tx-body);
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════════
   LACE DIVIDERS
   ══════════════════════════════════════════════ */
.lace-divider {
  height: 26px;
  width: 100%;
  margin: 14px auto;
  background-image: url('images/lace-divider.png');
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
  opacity: .9;
}

.lace-divider.small {
  height: 16px;
  margin: 10px 0;
  opacity: .7;
}

/* ══════════════════════════════════════════════
   LACE TRIMS
   ══════════════════════════════════════════════ */
.lace-trim {
  position: absolute;
  left: 0;
  right: 0;
  height: 56px;
  background-image: url('images/lace-trim.png');
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
  pointer-events: none;
  z-index: 6;
}

.lace-trim-top    { top: -28px;    background-position: center bottom; }
.lace-trim-bottom { bottom: -28px; background-position: center top; }

/* ══════════════════════════════════════════════
   BOW DIVIDERS
   ══════════════════════════════════════════════ */
.lace-bow {
  display: block;
  height: 34px;
  width: 100%;
  margin: 16px auto;
  background-image: url('images/divider-bow-sm.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: .95;
}

.lace-bow.small {
  height: 44px;
  margin: 10px auto;
  background-image: url('images/divider-bow.png');
}

/* ══════════════════════════════════════════════
   MAIN WINDOW
   ══════════════════════════════════════════════ */
.window {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  background: #fffdfa;
  border: 2px solid #d3c2e2;
  border-radius: 3px;
  box-shadow:
    0 0 0 4px #fffdfa,
    0 0 0 6px #e6d8f0,
    0 6px 20px rgba(90, 70, 120, .18);
}

.window::before,
.window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  background-repeat: repeat-y;
  background-size: 34px auto;
  background-position: top center;
  pointer-events: none;
  z-index: 2;
}

.window::before {
  left: -20px;
  background-image: url('images/lace-rail-bow.png');
}

.window::after {
  right: -20px;
  background-image: url('images/lace-rail-bow.png');
  transform: scaleX(-1);
}

.sticker-btn-purple,
.sticker-btn-blue {
  position: absolute;
  width: 56px;
  z-index: 10;
  transition: transform .18s ease;
  filter: drop-shadow(2px 3px 0 rgba(150, 130, 180, .3));
}

.sticker-btn-purple:hover,
.sticker-btn-blue:hover { transform: scale(1.15) rotate(-5deg); }

.sticker-btn-purple { top: -22px; left: -32px; transform: rotate(-14deg); }
.sticker-btn-purple:hover { transform: scale(1.15) rotate(-18deg); }

.sticker-btn-blue { bottom: -22px; right: -32px; width: 50px; transform: rotate(11deg); }
.sticker-btn-blue:hover { transform: scale(1.15) rotate(15deg); }

.window-inner {
  padding: 14px 40px;
  background-image: var(--bg-window);
  background-size: 420px;
  background-repeat: repeat;
  background-position: top left;
  position: relative;
}

.window-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 250, 0.72);
  pointer-events: none;
  z-index: 0;
}

.window-inner > .layout { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════
   LACE FRAME
   ══════════════════════════════════════════════ */
.lace-frame {
  position: relative;
  background: #fffdfa;
  padding: 14px 16px;
  border: 26px solid transparent;
  border-image: url('images/lace-frame.png') 22% / 26px round;
  box-shadow: inset 0 0 0 1px rgba(217, 198, 234, .55);
}

/* ══════════════════════════════════════════════
   DECORATIVE FRAMES
   ══════════════════════════════════════════════ */
.frame-zigzag,
.frame-scallop {
  border: 36px solid transparent;
  padding: 4px 10px;
  background: transparent;
  text-align: left;
}

.frame-zigzag { border-image: url('images/frame-zigzag.png') 30% fill round; }
.frame-scallop { border-image: url('images/frame-scallop.png') 30% fill round; }

.frame-zigzag > *,
.frame-scallop > * {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
}

.frame-zigzag > *:last-child,
.frame-scallop > *:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */
.layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
}

.col-left  { width: 200px; flex: 0 0 200px; }
.col-right { width: 220px; flex: 0 0 220px; }
.col-main  { flex: 1 1 auto; min-width: 0; }

/* ══════════════════════════════════════════════
   SIDEBARS / BOXES
   ══════════════════════════════════════════════ */
.sidebox {
  margin-bottom: 14px;
  font-size: 18.5px;
  background: #fffdfa;
  background-image:
    linear-gradient(rgba(255, 253, 250, .82), rgba(255, 253, 250, .82)),
    var(--bg-sidebox);
  background-size: auto, 110px;
  background-repeat: repeat, repeat;
}

.sidebox p { margin: 0 0 6px; }
.sidebox p:last-child { margin-bottom: 0; }

.sidebox-title {
  font-family: 'display', 'pixel', sans-serif;
  font-size: 18.5px;
  letter-spacing: 1.5px;
  color: var(--tx-head);
  padding-bottom: 4px;
  margin-bottom: 8px !important;
  border-bottom: 1px dashed #ffd6ea;
}

.caption {
  font-size: 18.5px;
  color: var(--tx-meta);
  margin-top: 6px !important;
  font-style: italic;
}

/* ══════════════════════════════════════════════
   PROFILE ICON
   ══════════════════════════════════════════════ */
.icon-frame {
  padding: 8px;
  margin-bottom: 10px;
  text-align: center;
}

.profile-icon {
  width: 100%;
  max-width: 130px;
  display: block;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════
   4 GREY-STYLE BUTTONS (pink)
   ══════════════════════════════════════════════ */
.greybtn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.greybtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  padding: 2px 3px;
  font-family: 'pixel', monospace;
  font-size: 13px;
  line-height: 1.05;
  letter-spacing: .3px;
  text-align: center;
  text-decoration: none;
  color: #8a3a68;
  background: linear-gradient(
    180deg,
    #ffeaf3 0%,
    #ffd4e8 42%,
    #ffb8da 50%,
    #ffc8e2 62%,
    #ffe0ee 100%
  );
  border: 2px solid;
  border-color: #ffffff #d878a8 #d878a8 #ffffff;
  box-shadow: inset 0 0 0 1px #ffeaf3;
  overflow: hidden;
  transition: filter .12s ease, transform .12s ease;
}

/* ══════════════════════════════════════════════
   IDIAHOVER WIDGET
   ══════════════════════════════════════════════ */
.idia-hover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 12px auto 0;
  overflow: visible;
}

.idia-hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
  transition: opacity .35s ease;
  will-change: opacity;
}

.idia-hover-img.is-idle  { opacity: 1; }
.idia-hover-img.is-hover { opacity: 0; }

.idia-hover:hover .idia-hover-img.is-idle  { opacity: 0; }
.idia-hover:hover .idia-hover-img.is-hover { opacity: 1; }

/* ══════════════════════════════════════════════
   BLOG POSTS
   ══════════════════════════════════════════════ */
.post {
  margin-bottom: 16px;
  padding: 34px 34px 34px 34px;
  background-image: var(--bg-post);
  background-size: 240px auto;
  background-position: center top;
  background-repeat: repeat;
  background-clip: padding-box;
}

.post > p,
.post > h2,
.post > .lace-divider,
.post > .post-img,
.post > .lace-bow,
.post > .frame-zigzag,
.post > .frame-scallop {
  position: relative;
  z-index: 1;
}

.post-date {
  font-size: 18.5px;
  letter-spacing: 1.5px;
  color: var(--tx-meta);
  text-transform: uppercase;
  margin: 0 0 2px;
}

.post-title {
  font-family: 'display', 'pixel', sans-serif;
  font-size: 18.5px;
  letter-spacing: 1px;
  color: var(--tx-head);
  margin: 0;
}

.post p { font-size: 18.5px; }

.post-img {
  display: block;
  margin: 10px auto 4px;
  max-width: 320px;
  border: 1px solid #e2d3ef;
  padding: 3px;
  background: #fff;
}

.placeholder-slot {
  text-align: center;
  font-size: 18.5px;
  color: var(--tx-meta);
  font-style: italic;
}

/* ══════════════════════════════════════════════
   CBOX WRAP + IDIAKEYBOARD
   ══════════════════════════════════════════════ */
.cbox-wrap {
  position: relative;
  padding-bottom: 110px;
  margin-bottom: 14px;
}

.cbox-frame { padding: 10px; }

.cbox-body {
  background: #fbf7ff;
  border: 1px solid #d9c6ea;
  border-radius: 2px;
  padding: 4px;
  overflow: hidden;
}

.cbox-body iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.idia-keyboard {
  position: absolute;
  right: -18px;
  bottom: 0;
  width: 170px;
  aspect-ratio: 460 / 350;
  overflow: visible;
  z-index: 5;
  transform: translateY(0);
  transition: transform .25s ease;
  filter: drop-shadow(2px 3px 0 rgba(150, 130, 180, .25));
}

.idia-keyboard-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity .18s ease;
  will-change: opacity;
  pointer-events: none;
}

.idia-keyboard[data-pose="idle"]  .is-idle  { opacity: 1; }
.idia-keyboard[data-pose="left"]  .is-left  { opacity: 1; }
.idia-keyboard[data-pose="right"] .is-right { opacity: 1; }

.idia-keyboard[data-pose="left"],
.idia-keyboard[data-pose="right"] {
  transform: translateY(-3px);
  transition: transform .15s ease;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.site-footer {
  max-width: 980px;
  margin: 20px auto 0;
  font-size: 24px;
  color: var(--tx-meta);
  padding: 18px 20px 14px;
  background-image: var(--bg-footer);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 4px;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 250, .72);
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
}

.site-footer > * { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════
   SCROLLBARS
   ══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #f3edf7; border: 1px solid #e2d3ef; }
::-webkit-scrollbar-thumb { background: #ffc8e2; border: 1px solid #ff91ca; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #ffb8da; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .col-left, .col-right, .col-main { width: 100%; flex: 1 1 auto; }
  .cbox-body iframe { height: 220px; }
  .idia-keyboard { right: 0; width: 140px; }
  .cbox-wrap { padding-bottom: 90px; }
  .window::before, .window::after { display: none; }
  .window-inner { padding: 14px; }
  .sticker-btn-purple { top: -14px; left: -14px; width: 44px; }
  .sticker-btn-blue   { bottom: -14px; right: -14px; width: 40px; }
  .lace-trim { height: 36px; }
  .lace-trim-top    { top:    -18px; }
  .lace-trim-bottom { bottom: -18px; }

  .keychain-wrap { display: none; }
  .sitting-plush { width: 100px; bottom: -50px; }
  .cat-plush     { width: 60px; }
}

