/* KiraRift - Pink Schedule template layout.
   The window artwork (assets/tpl/shell.webp) comes from the Cozy Interface - Pink - Schedule PSD by LennaJpeg.
   Every element is positioned in the template's own pixel grid (4001 x 2250) and scaled with --u. */
@font-face{font-family:Nunito;src:url('./assets/cozy/nunito.woff2') format('woff2');font-weight:200 1000;font-display:swap}
@font-face{font-family:Dogica;src:url('./assets/cozy/dogica.woff2') format('woff2');font-weight:400;font-display:swap}

:root{
  --ink:#3e1d2e;
  --cream:#fcf6f5;
  --pink:#ffb3d1;
  --pink-deep:#ff7fb0;
  --bg:#ffe4ee;
  --foot:38px;
  --u:min(100vw / 4001, (100vh - var(--foot)) / 2250);
  --px:Dogica,'Courier New',monospace;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:var(--bg);color:var(--ink);font-family:Nunito,'Segoe UI',sans-serif;font-weight:700;overflow-x:hidden}
button,input{font:inherit;color:inherit}
button{border:0;background:none;padding:0;cursor:pointer}
a{color:inherit;text-decoration:none}
h1,h2,p{margin:0}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:calc(5*var(--u)) solid #b13a74;outline-offset:calc(4*var(--u));border-radius:calc(20*var(--u))}

.page{height:calc(100vh - var(--foot));min-height:200px;display:grid;place-items:center}
.stage{position:relative;width:calc(4001*var(--u));height:calc(2250*var(--u))}
.shell{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;user-select:none}
.shell-raster{display:block;width:100%;height:100%}
/* Cover the original bitmap close icon with a clean sample from the SAME
   artwork. Keep the sample inside the shell's opacity group so the live
   wallpaper shows through the entire header at exactly the same strength. */
.shell-heart-patch{
  position:absolute;left:calc(972*var(--u));top:calc(122*var(--u));
  width:calc(94*var(--u));height:calc(88*var(--u));
  background-image:url('./assets/tpl/shell.webp');
  background-size:calc(4001*var(--u)) calc(2250*var(--u));
  background-position:calc(-830*var(--u)) calc(-122*var(--u));
  background-repeat:no-repeat;
}

.e{position:absolute;z-index:2;left:calc(var(--x)*var(--u));top:calc(var(--y)*var(--u));width:calc(var(--w)*var(--u));height:calc(var(--h)*var(--u))}
.card{position:absolute;z-index:2;left:calc(var(--x)*var(--u));top:calc(var(--y)*var(--u));width:calc(var(--w)*var(--u));height:calc(var(--h)*var(--u))}

/* ---- window chrome */
.tab-title{font-family:var(--px);font-weight:400;font-size:calc(80*var(--u));line-height:calc(90*var(--u));letter-spacing:calc(12*var(--u));white-space:nowrap}
.ctl{border-radius:50%;transition:background .15s}
.ctl:hover{background:rgba(255,255,255,.45)}
.pill{display:flex;align-items:center;padding-left:calc(32*var(--u));gap:calc(5*var(--u));font-size:calc(36*var(--u));font-weight:800;border-radius:999px;white-space:nowrap}
.pill-icon{height:calc(37*var(--u));width:auto}
.pill:hover{background:rgba(255,179,209,.55)}

/* ---- date tiles */
.week{font-size:calc(52*var(--u));font-weight:900;line-height:calc(60*var(--u));white-space:nowrap}
.date-tile{display:grid;place-items:center;font-size:calc(96*var(--u));font-weight:900;line-height:1}
.date-tile.dark{color:#f7a7ce;font-size:calc(80*var(--u))}
.date-tile.small{font-size:calc(80*var(--u))}

/* ---- cards */
.tag-day,.tag-num{display:grid;place-items:center;font-weight:900;font-size:calc(29*var(--u));line-height:1;white-space:nowrap}
.tag-day{color:#ffc0de;letter-spacing:.03em}
.title{font-weight:900;font-size:calc(60*var(--u));line-height:1.1;letter-spacing:-.01em}
.title.one{font-size:calc(51*var(--u));line-height:1.15;white-space:nowrap}
.sub{font-size:calc(35*var(--u));font-weight:700;line-height:1.2}
.sub.big{font-size:calc(40*var(--u))}
.t-label{display:flex;align-items:center;font-size:calc(31*var(--u));font-weight:700;line-height:1.1;white-space:nowrap}
.chip-text,.chip-link i{display:grid;place-items:center;font-style:normal;font-weight:900;font-size:calc(30*var(--u));line-height:1}
.chip-link{display:block}
.chip-link i{position:absolute;left:calc(183*var(--u));top:calc(3*var(--u));width:calc(98*var(--u));height:calc(59*var(--u));border-radius:999px;transition:background .15s}
.chip-link:hover i{background:rgba(255,255,255,.55)}
.stretch{display:block;border-radius:calc(70*var(--u));z-index:1}
.stretch:hover{background:rgba(255,255,255,.14)}

/* likes */
.like{display:inline-flex;align-items:center;justify-content:center;gap:calc(10*var(--u));border-radius:999px;font-size:calc(30*var(--u));font-weight:900;line-height:1;transition:transform .15s,background .15s}
.like svg{width:calc(32*var(--u));height:calc(32*var(--u));fill:none;stroke:var(--ink);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:fill .15s}
.like:hover{transform:scale(1.06)}
.like.is-liked svg{fill:var(--ink)}
.like.chip{gap:calc(7*var(--u));font-size:calc(28*var(--u))}
.like.chip svg{width:calc(28*var(--u));height:calc(28*var(--u))}
.like.pill-heart{border:calc(5*var(--u)) solid var(--ink);background:var(--cream);box-shadow:0 calc(5*var(--u)) 0 rgba(255,143,186,.35)}
.like.pill-heart:hover{background:#ffe6f0}
.like.pill-heart.is-liked{background:var(--pink)}
.like.pill-heart.is-liked svg{fill:var(--pink-deep)}
.like.pill-heart.sm{font-size:calc(27*var(--u));gap:calc(8*var(--u))}
.like.pill-heart.sm svg{width:calc(28*var(--u));height:calc(28*var(--u))}
.like.doc .like-count{position:absolute;bottom:calc(8*var(--u));right:calc(16*var(--u));background:var(--cream);border:calc(4*var(--u)) solid var(--ink);border-radius:999px;padding:calc(3*var(--u)) calc(12*var(--u));font-size:calc(24*var(--u))}
.like.doc svg{opacity:0;width:calc(50*var(--u));height:calc(50*var(--u));margin-top:calc(12*var(--u))}
.like.doc.is-liked svg{opacity:1;fill:var(--pink-deep);stroke:none}

/* offline cards */
.off-title{font-family:var(--px);font-weight:400;font-size:calc(58*var(--u));line-height:1.35;text-align:center;letter-spacing:.02em}
.links-title{font-size:calc(44*var(--u))}
.food-title{font-size:calc(50*var(--u))}
.off-sub{font-size:calc(34*var(--u));font-weight:700;text-align:center;line-height:1.2}
.food-copy{font-size:calc(40*var(--u));font-weight:900;line-height:1.28}
.link-row{display:flex;align-items:center;justify-content:space-between;padding:0 calc(32*var(--u));border:calc(5*var(--u)) solid var(--ink);border-radius:999px;background:var(--cream);font-size:calc(33*var(--u));font-weight:800;transition:background .15s}
.link-row:hover{background:#ffe1ed}
.link-row b{font-weight:900}

/* artwork panel (sits behind the template window, which has a transparent hole for it) */
.art{z-index:0;background:#e8dcef;overflow:hidden}
.art img{width:100%;height:100%;object-fit:cover;object-position:50% 42%;display:block}
.credit{position:absolute;left:calc(42*var(--u));bottom:calc(30*var(--u));padding:0 calc(26*var(--u));height:calc(56*var(--u));display:inline-flex;align-items:center;border:calc(4*var(--u)) solid var(--ink);border-radius:999px;background:var(--cream);font-size:calc(28*var(--u));font-weight:800}
.bubble-text{display:grid;place-items:center;font-size:calc(28*var(--u));font-weight:900;letter-spacing:.01em;text-align:center;line-height:1;white-space:nowrap;padding-right:calc(8*var(--u))}
.bubble-text span{margin-left:.35em}
.chat-input{display:flex;align-items:center;padding-left:calc(46*var(--u));font-size:calc(31*var(--u));font-weight:700;color:#8c566f;border-radius:999px}
.chat-send{border-radius:999px;transition:background .15s}
.chat-send:hover{background:rgba(255,255,255,.3)}

/* ---- footer, notice, dialogs */
.foot{position:fixed;left:0;right:0;bottom:0;height:var(--foot);display:flex;align-items:center;justify-content:center;gap:14px;font-size:12px;font-weight:800;z-index:10}
.foot b{color:var(--pink-deep)}
.foot button{border:2px solid var(--ink);border-radius:999px;background:var(--cream);padding:2px 12px;font-size:12px;font-weight:800}
.foot button:hover{background:var(--pink)}
.notice{position:fixed;left:50%;bottom:48px;transform:translateX(-50%);z-index:20;background:var(--cream);border:3px solid var(--ink);border-radius:999px;padding:6px 18px;font-size:13px;display:none}
.notice:not(:empty){display:block}
dialog{border:3px solid var(--ink);border-radius:26px;background:var(--cream);color:var(--ink);padding:26px 30px;max-width:min(440px,92vw);box-shadow:0 8px 0 var(--pink)}
dialog::backdrop{background:rgba(255,200,222,.6);backdrop-filter:blur(3px)}
dialog h2{font-size:26px;font-weight:900;margin:6px 0 8px}
dialog p{font-size:14px;line-height:1.5;margin:6px 0}
dialog .px{font-family:var(--px);font-size:10px;line-height:1.7}
dialog a{text-decoration:underline;text-decoration-color:var(--pink-deep);text-underline-offset:3px}
dialog .dialog-link{display:inline-block;margin-top:12px;padding:5px 16px;border:2.5px solid var(--ink);border-radius:999px;background:var(--pink);text-decoration:none;font-weight:900}
dialog .close{position:absolute;right:14px;top:12px;width:30px;height:30px;border:2.5px solid var(--ink);border-radius:50%;background:var(--pink);font-size:20px;line-height:1}
html.still *{transition:none!important;animation:none!important}

/* ---- small screens: stacked cards, same look */
@media (max-width:860px){
  :root{--foot:56px}
  .page{display:block;height:auto;padding:16px 12px calc(var(--foot) + 12px)}
  .stage{width:auto;height:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:16px 14px 18px;border:3px solid var(--ink);border-radius:26px;background:linear-gradient(180deg,#fff3f7,#ffc7de)}
  .shell,.ctl,.chat-send,.like.doc{display:none}
  .e,.card{position:static;width:auto;height:auto}
  .tab-title{grid-column:1/-1;order:1;font-size:26px;line-height:1.3;letter-spacing:4px;padding-bottom:4px}
  .pill{order:2;padding:0 8px;gap:6px;font-size:12px;height:32px;border:2px solid var(--ink);background:var(--cream)}
  .pill-icon{height:14px}
  .week{grid-column:1/-1;order:3;font-size:16px;line-height:1.2;margin-top:6px}
  .date-tile{order:4;height:64px;border:3px solid var(--ink);border-radius:12px;background:var(--cream);font-size:24px}
  .date-tile.dark{background:var(--ink);font-size:22px}
  .date-tile.small{font-size:22px}
  .card{grid-column:1/-1;order:5;display:flex;flex-direction:column;gap:6px;min-height:150px;padding:14px 16px;border:3px solid var(--ink);border-radius:22px;background:var(--cream)}
  .card.offline{align-items:center;text-align:center;background:linear-gradient(180deg,#ffe3ee,#ffb3d1)}
  .card.banner{order:4}
  .tag-day,.tag-num{display:inline-block;font-size:11px;padding:2px 9px;border-radius:999px;align-self:flex-start}
  .tag-day{background:var(--ink)}
  .tag-num{background:var(--pink);color:var(--ink);margin-top:-30px;margin-left:56px}
  .title,.title.one{font-size:24px;white-space:normal}
  .sub,.sub.big{font-size:14px}
  .t-label,.chip-text{display:none}
  .stretch{position:absolute;inset:0}
  .card{position:relative}
  .like,.like.pill-heart,.like.pill-heart.sm,.like.chip{position:absolute;right:12px;top:12px;width:auto;min-width:52px;height:30px;padding:0 10px;border:2px solid var(--ink);background:var(--cream);font-size:13px;gap:5px;box-shadow:none}
  .like svg,.like.chip svg,.like.pill-heart.sm svg{width:15px;height:15px}
  .like.is-liked{background:var(--pink)}
  .like.is-liked svg{fill:var(--ink)}
  .chip-link{display:inline-block;align-self:flex-start;padding:3px 14px;border:2px solid var(--ink);border-radius:999px;background:var(--pink);font-size:13px;position:relative;z-index:3}
  .chip-link::before{content:attr(aria-label)}
  .chip-link i{position:static;width:auto;height:auto;margin-left:6px;display:inline}
  .off-title,.links-title,.food-title{font-size:18px;line-height:1.4}
  .off-sub,.food-copy{font-size:14px}
  .link-row{padding:5px 16px;border-width:2px;font-size:14px;width:100%;position:relative;z-index:3}
  .art{order:6;grid-column:1/-1;height:min(120vw,520px);border:3px solid var(--ink);border-radius:22px}
  .credit{left:12px;bottom:12px;height:26px;border-width:2px;font-size:11px;padding:0 12px}
  .bubble-text{order:5;grid-column:1/-1;justify-self:start;font-size:11px;border:2px solid var(--ink);border-radius:999px;background:var(--cream);padding:6px 14px}
  .chat-input{order:7;grid-column:1/-1;height:40px;padding:0 18px;font-size:13px;border:3px solid var(--ink);background:var(--cream)}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}


/* Clean plushie card: the PSD shell has a baked divider and two decorative
   buttons. Replace only those pixels via local overlays (leave other cards untouched). */
.card[data-key="plushie"]{isolation:isolate}
.card[data-key="plushie"]::before,
.card[data-key="plushie"]::after{content:"";position:absolute;z-index:1;pointer-events:none}
/* Restore the star where the original artwork has a dashed line. */
.card[data-key="plushie"]::before{
  left:calc(39*var(--u));top:calc(300*var(--u));
  width:calc(683*var(--u));height:calc(103*var(--u));
  background-image:url('./assets/tpl/shell.webp');
  background-repeat:no-repeat;
  background-size:calc(4001*var(--u)) calc(2250*var(--u));
  background-position:calc(-1012*var(--u)) calc(-1650*var(--u));
}
/* Conceal the old twin pill buttons and arrow within the card. */
.card[data-key="plushie"]::after{
  left:calc(36*var(--u));top:calc(441*var(--u));
  width:calc(691*var(--u));height:calc(127*var(--u));
  background:var(--cream);
}
.card[data-key="plushie"] .plushie-heading{
  text-align:center;display:block;padding-top:calc(5*var(--u));
  font-size:calc(65*var(--u));line-height:1.18;z-index:3;
}
.card[data-key="plushie"] .plushie-cta{
  position:absolute;display:flex;align-items:stretch;box-sizing:border-box;
  z-index:5;border:calc(5*var(--u)) solid var(--ink);
  border-radius:999px;overflow:hidden;background:var(--cream);box-shadow:none;
}
.card[data-key="plushie"] .plushie-cta-label{
  flex:1 1 auto;min-width:0;display:flex;align-items:center;justify-content:center;
  font-size:calc(34*var(--u));font-weight:900;white-space:nowrap;
}
.card[data-key="plushie"] .plushie-chip-heart{
  position:static;flex:0 0 calc(148*var(--u));width:calc(148*var(--u));height:auto;
  min-width:0;display:flex;align-items:center;justify-content:center;
  gap:calc(12*var(--u));border:0;border-left:calc(5*var(--u)) solid var(--ink);
  border-radius:0;background:var(--pink);font-size:calc(30*var(--u));font-weight:900;
  transition:background .15s;
}
.card[data-key="plushie"] .plushie-chip-heart:hover,
.card[data-key="plushie"] .plushie-chip-heart.is-liked{background:#ff9dc6}
.card[data-key="plushie"] .plushie-chip-heart svg{
  flex:none;width:calc(31*var(--u));height:calc(31*var(--u));
}
@media(max-width:860px){
  .card[data-key="plushie"]::before,.card[data-key="plushie"]::after{display:none}
  .card[data-key="plushie"]{min-height:202px;padding-bottom:68px}
  .card[data-key="plushie"] .plushie-heading{
    position:static;width:auto;height:auto;display:block;text-align:center;
    font-size:24px;line-height:1.12;margin:21px 0 8px;
  }
  .card[data-key="plushie"] .plushie-cta{
    left:16px;right:16px;bottom:15px;top:auto;width:auto;height:39px;border-width:2px;
  }
  .card[data-key="plushie"] .plushie-cta-label{font-size:14px}
  .card[data-key="plushie"] .plushie-chip-heart{
    position:static;width:72px;flex-basis:72px;height:auto;
    padding:0 6px;min-width:0;border:0;border-left:2px solid var(--ink);
    font-size:14px;gap:6px;
  }
  .card[data-key="plushie"] .plushie-chip-heart svg{width:17px;height:17px}
}


/* Games card: hide baked-in twin decorative buttons while retaining the card
   outline and the user's text. Only the real interactive heart remains. */
.card[data-key="games"]{isolation:isolate}
.card[data-key="games"]::after{
  content:"";position:absolute;pointer-events:none;z-index:1;
  left:calc(37*var(--u));top:calc(447*var(--u));
  width:calc(690*var(--u));height:calc(129*var(--u));
  background:var(--cream);
}
.card[data-key="games"] .games-heart{
  z-index:4;
  border-width:calc(5*var(--u));
  background:var(--cream);
}
@media(max-width:860px){
  .card[data-key="games"]{padding-bottom:55px}
  .card[data-key="games"]::after{display:none}
  .card[data-key="games"] .games-heart{
    position:absolute;
    top:auto;left:auto;right:12px;bottom:12px;
    width:auto;height:31px;min-width:54px;
    padding:0 9px;border:2px solid var(--ink);
    font-size:13px;gap:5px;
  }
  .card[data-key="games"] .games-heart svg{width:16px;height:16px}
}


/* ----- Background video -----
   Uses the actual live MP4 in the website root. Original frame remains
   in the foreground, but softens slightly ONLY while the video is playing.
   If playback fails the website's pink artwork stays fully opaque. */
.site-video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.site-video-background video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  filter: brightness(.91) saturate(.95);
  transition: opacity .45s ease;
}
.site-video-background.is-playing video { opacity: 1; }
.site-video-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 220, 235, .13);
  pointer-events: none;
}
.page { position: relative; z-index: 1; }
html.still .site-video-background video { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .site-video-background video { transition: none; }
}

/* The template shell is a full-size opaque image; without this rule the video
   plays underneath it but cannot be seen at all. The reaction controls and
   character art remain at their original, fully opaque stacking layers. */
.page .shell { transition: opacity .45s ease; }
.site-video-background.is-playing ~ .page .shell { opacity: .76; }
html.still .site-video-background ~ .page .shell { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .page .shell { transition: none; }
}

/* Final note uses the former offline-card slot, without a gallery action. */
.nothing-title{display:grid;place-items:center;font-size:calc(51*var(--u));line-height:1.5;text-wrap:balance}
@media(max-width:860px){.nothing-title{display:block}}
