/* ============================================================
   PEKORITAS ONLINE — dennalaporri.com
   Mobile first. Desktop = fixed 780px fansite frame.
   Colors come from the duo's own stated favorites:
   DENNA verde / PORRI naranja. Both collide into PEKORITAS pink
   (taken from the PEKORITAS VOL.1 banner).
   ============================================================ */

:root {
  --bg: #000;
  --panel: #0c0c0c;
  --panel-2: #141414;
  --line: #3a3a3a;
  --line-2: #5a5a5a;
  --txt: #e6e6e6;
  --mute: #9a9a9a;
  --denna: #3ed660;
  --porri: #ee9441;
  --peko: #ff5fd2;
  --peko-dark: #7a0f5a;
  --link: #ffd9f4;
  --font: Verdana, Tahoma, Geneva, "DejaVu Sans", sans-serif;
  --mono: "Courier New", Courier, monospace;
  --nav-h: 60px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  /* tiled period background: tiny pink stars on black */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><rect width='48' height='48' fill='%23000'/><path d='M24 6l1.6 4.4L30 12l-4.4 1.6L24 18l-1.6-4.4L18 12l4.4-1.6z' fill='%23220b1c'/><rect x='6' y='34' width='2' height='2' fill='%23241124'/><rect x='40' y='30' width='2' height='2' fill='%23241124'/></svg>");
  color: var(--txt);
  font: 14px/1.45 var(--font);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #fff; background: var(--peko-dark); }
a:focus-visible, button:focus-visible { outline: 2px dotted var(--peko); outline-offset: 2px; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
b { font-weight: bold; }
small { font-size: .8em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--peko); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.c-denna { color: var(--denna); }
.c-porri { color: var(--porri); }
.tiny { font-size: 11px; color: var(--mute); }
.sep { color: var(--mute); margin: 0 4px; }
.fname { font: 11px/1.2 var(--mono); color: var(--mute); letter-spacing: .02em; }

/* status dots */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: #666; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.dot.on { background: #47e05a; box-shadow: 0 0 4px #47e05a, inset 0 0 0 1px rgba(255,255,255,.35); }
.dot.you { background: var(--peko); box-shadow: 0 0 4px var(--peko), inset 0 0 0 1px rgba(255,255,255,.35); }

/* ---------- site frame ---------- */
#site {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
}

/* ---------- header ---------- */
.hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #1a0716 0%, #000 70%);
}
.hdr-logo img { width: 96px; height: 96px; }
.hdr-txt { min-width: 0; flex: 1; }
.hdr-stars { color: var(--peko); font-size: 11px; letter-spacing: .3em; line-height: 1; }
.hdr-title {
  font: bold 24px/1 var(--font); letter-spacing: .04em; color: #fff;
  text-shadow: 2px 2px 0 var(--peko-dark);
  margin: 4px 0 2px;
}
.hdr-title span { color: var(--peko); }
.hdr-sub { font-size: 12px; color: var(--txt); }
.hdr-sub b { letter-spacing: .06em; }
.hdr-meta { font-size: 11px; color: var(--mute); margin-top: 4px; }
.hdr-meta time { color: var(--txt); }
.hdr-upd { display: none; }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--peko-dark); color: #fff; font-size: 11px; font-weight: bold; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ticker-in { display: inline-flex; gap: 40px; padding: 4px 0; animation: tick 40s linear infinite; }
.ticker-in span { padding-left: 40px; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-in { animation: none; } }

/* ---------- navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #0a0a0a; border-top: 2px solid var(--peko);
}
.nav ul { display: flex; height: var(--nav-h); max-width: 780px; margin: 0 auto; }
.nav li { flex: 1; }
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; min-width: 44px;
  color: var(--txt); text-decoration: none; font-size: 11px; font-weight: bold; letter-spacing: .02em;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #1c1c1c, #050505);
}
.nav li:last-child a { border-right: 0; }
.nav a i { font-style: normal; font-size: 18px; line-height: 1; color: var(--peko); }
.nav a[aria-current="page"] { background: var(--peko-dark); color: #fff; }
.nav a[aria-current="page"] i { color: #fff; }
.nav a:hover { background: #222; }

/* ---------- columns ---------- */
.cols { display: flex; flex-direction: column; }
.side { padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; border-top: 1px solid var(--line); }
.main { padding: 8px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- windows ---------- */
.win { background: var(--panel); border: 1px solid var(--line-2); box-shadow: 2px 2px 0 #000; }
.win-t {
  font: bold 11px/1.2 var(--font); text-transform: uppercase; letter-spacing: .12em;
  padding: 6px 8px; background: linear-gradient(180deg, #2a2a2a, #161616); color: #fff;
  border-bottom: 1px solid var(--line-2);
}
.win-t small { font-weight: normal; letter-spacing: .04em; text-transform: none; color: var(--mute); margin-left: 6px; font-size: 11px; }
.sec-h { font: bold 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: .2em; color: var(--peko); padding: 0 2px; }

/* ---------- buttons (always ≥44px tall on touch) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 14px;
  font: bold 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: #fff; background: linear-gradient(180deg, #3a3a3a, #1a1a1a);
  border: 1px solid #777; border-bottom-color: #222; border-right-color: #222;
  box-shadow: 1px 1px 0 #000; cursor: pointer;
}
.btn:hover { background: linear-gradient(180deg, #4a4a4a, #222); color: #fff; }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-k { background: linear-gradient(180deg, #ff86dd, #c6249a); border-color: #ffb8ea; border-bottom-color: #6a0d4f; border-right-color: #6a0d4f; color: #1a0212; }
.btn-k:hover { background: linear-gradient(180deg, #ffa0e6, #d63aab); color: #000; }
.btn-sm { min-height: 44px; padding: 6px 12px; font-size: 11px; }
.btn-discord { width: 100%; background: linear-gradient(180deg, #7289da, #4e5fb4); border-color: #aab6f0; border-bottom-color: #2b356b; border-right-color: #2b356b; }

/* inline text links: comfortable tap area on touch, normal on desktop */
@media (pointer: coarse) {
  .alt-links a, .video-line a, .cam-ctl .tiny, .tour-foot a, .ftr a, .dia-foot span { display: inline-block; padding: 14px 8px; }
  .dia-foot span { padding-left: 0; }
}

/* ---------- sidebar bits ---------- */
.users { padding: 6px 8px; }
.users li { display: flex; align-items: center; gap: 4px; padding: 5px 0; font-size: 12px; border-bottom: 1px dotted var(--line); }
.users li:last-child { border-bottom: 0; }
.users .who { color: var(--mute); font-size: 11px; }
.links { padding: 6px 8px 8px; font-size: 12px; }
.links li { padding: 0; }
.links a { display: flex; align-items: center; min-height: 44px; }
.links a::before { content: "» "; color: var(--peko); }
.win .btn-discord { margin: 8px 8px 0; width: calc(100% - 16px); }
.win-counter { text-align: center; padding-bottom: 8px; }
.counter { display: inline-flex; gap: 2px; margin: 10px 0 4px; }
.counter span { display: inline-block; width: 16px; height: 22px; font: bold 15px/22px var(--mono); background: #111; color: #7cff8a; border: 1px solid #333; box-shadow: inset 0 0 6px #000; }
.badge88 {
  grid-column: 1 / -1; justify-self: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 88px; height: 31px; text-decoration: none;
  background: linear-gradient(180deg, #ff5fd2, #7a0f5a); border: 1px solid #ffb8ea; color: #fff;
  font: bold 8px/1 var(--font); letter-spacing: .12em; image-rendering: pixelated;
}
.badge88 .b2 { color: #ffe3f7; margin-top: 2px; }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: 6px; }
.hero-kicker { color: var(--peko); font-weight: bold; font-size: 12px; letter-spacing: .3em; text-align: center; }
.hero-h { font: bold 22px/1.05 var(--font); text-transform: uppercase; letter-spacing: .02em; text-align: center; color: #fff; text-shadow: 2px 2px 0 var(--peko-dark); }
.hero-fig { border: 3px solid #fff; outline: 1px solid var(--line-2); box-shadow: 3px 3px 0 var(--peko-dark); background: #111; }
.hero-fig img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.hero-fig figcaption { padding: 3px 6px; background: #fff; color: #444; }
.ready { text-align: center; font: bold 16px/1.3 var(--font); letter-spacing: .08em; color: #fff; padding: 6px 0 2px; }
.ready span { color: var(--peko); font-weight: normal; }

.eq { display: flex; align-items: stretch; gap: 4px; margin-top: 4px; }
.eq li { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 4px; text-align: center; border: 1px solid; }
.eq li b { font-size: 12px; letter-spacing: .12em; }
.eq li small { font-size: 11px; color: inherit; opacity: .85; margin-top: 2px; }
.eq-op { flex: 0 0 22px !important; border: 0 !important; color: var(--mute); font-weight: bold; font-size: 16px; padding: 0 !important; }
.eq-d { color: var(--denna); border-color: var(--denna); background: rgba(62,214,96,.08); }
.eq-p { color: var(--porri); border-color: var(--porri); background: rgba(238,148,65,.08); transform: rotate(-1deg); }
.eq-k { color: #fff; border-color: var(--peko); background: linear-gradient(135deg, rgba(62,214,96,.25), rgba(255,95,210,.35) 50%, rgba(238,148,65,.25)); }

/* ---------- diarios ---------- */
.diarios { display: flex; flex-direction: column; gap: 10px; }
.diario .win-t { display: flex; align-items: center; }
.diario-denna { border-color: var(--denna); }
.diario-denna .win-t { background: linear-gradient(180deg, #1e6a32, #0b3a19); border-bottom-color: var(--denna); }
.diario-porri { border-color: var(--porri); }
.diario-porri .win-t { background: linear-gradient(180deg, #8a4a17, #4a2608); border-bottom-color: var(--porri); }
.dia { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; padding: 10px 10px 6px; font-size: 13px; }
.dia dt { color: var(--mute); white-space: nowrap; }
.dia dd { color: var(--txt); }
.diario-denna .dia dt { color: var(--denna); }
.diario-porri .dia dt { color: var(--porri); }
.dia-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 10px; font-size: 11px; color: var(--mute); border-top: 1px dotted var(--line); margin-top: 4px; }
/* two cursors — desktop only, discovered later */
@media (pointer: fine) {
  .diario-denna { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='24' viewBox='0 0 18 24'><path d='M1 1l0 19 5-5 3 8 3-1-3-8h7z' fill='%233ed660' stroke='%23000' stroke-width='1.5'/></svg>") 1 1, auto; }
  .diario-porri { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='24' viewBox='0 0 18 24'><path d='M1 1l0 19 5-5 3 8 3-1-3-8h7z' fill='%23ee9441' stroke='%23000' stroke-width='1.5'/></svg>") 1 1, auto; }
}
.nerd { border-color: var(--peko-dark); }
.nerd .win-t { background: linear-gradient(180deg, #4a1238, #23081c); text-transform: none; }
.nerd-q { padding: 8px 10px 2px; font-size: 12px; color: var(--mute); }
.nerd-a { padding: 0 10px 10px; font-size: 13px; }

/* ---------- album ---------- */
.album { display: flex; flex-direction: column; gap: 8px; }
.album-banner { display: block; border: 1px solid var(--line-2); background: #000; }
.album-banner:hover { background: #000; outline: 2px solid var(--peko); }
.album-banner img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.folder-t { text-transform: none; letter-spacing: .04em; font-family: var(--mono); font-size: 12px; }
.files { font-family: var(--mono); font-size: 12px; }
.files li { border-bottom: 1px dotted var(--line); }
.files li:nth-child(odd) { background: var(--panel-2); }
.files a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 10px; text-decoration: none; color: var(--txt); }
.files a:hover { background: var(--peko-dark); color: #fff; }
.files .fn::before { content: "♪ "; color: var(--peko); }
.files .ft { font-size: 11px; color: var(--mute); text-align: right; font-family: var(--font); }
.folder-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; }
.alt-links { font-size: 11px; color: var(--mute); }
.video-line { font-size: 12px; padding: 0 2px; }

/* ---------- pekorita cam ---------- */
.cam { border-color: #777; }
.cam-t { display: flex; align-items: center; background: linear-gradient(180deg, #222, #000); font-family: var(--mono); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #ff2b2b; margin-right: 6px; box-shadow: 0 0 6px #ff2b2b; animation: rec 1.2s steps(2) infinite; }
@keyframes rec { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .rec { animation: none; } }
.cam-fig { background: #050505; }
.cam-fig img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #050505; }
.cam-cap { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: #000; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cam-cap .fname { color: #ffcf40; font-weight: bold; }
.cam-ctl { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px; }
.cam-ctl .btn { flex: 0 0 auto; min-width: 96px; font-family: var(--mono); }
.cam-ctl .tiny { text-align: center; }

/* ---------- shop ---------- */
.product-in { display: flex; gap: 10px; padding: 10px; }
.product-img { flex: 0 0 120px; background: #fff; border: 1px solid var(--line-2); align-self: flex-start; }
.product-img:hover { background: #fff; }
.ficha { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; font-size: 12px; align-content: start; }
.ficha dt, .ficha dd { padding: 5px 6px; border-bottom: 1px dotted var(--line); }
.ficha dt { color: var(--mute); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; white-space: nowrap; }
.ficha dd { color: var(--txt); }
.product-desc { padding: 8px 10px 0; font-size: 12px; color: var(--mute); }
.product-cta { padding: 8px 10px 10px; }
.soldout { display: inline-block; padding: 1px 6px; font-size: 11px; font-weight: bold; letter-spacing: .1em; color: #fff; background: #b3001b; border: 1px solid #ff6b7d; vertical-align: 2px; }
.product-photo { border-top: 1px solid var(--line); }
.product-photo img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }
.product-photo figcaption, .tour-photo figcaption { padding: 3px 8px; }

/* ---------- tour ---------- */
.tour-row { display: flex; align-items: center; gap: 10px; padding: 10px; }
.tour-date { flex: 0 0 52px; text-align: center; border: 1px solid var(--peko); background: var(--peko-dark); padding: 4px 0; }
.tour-date b { display: block; font-size: 22px; line-height: 1; }
.tour-date span { font-size: 11px; letter-spacing: .15em; }
.tour-info { flex: 1; min-width: 0; }
.tour-ev { font-weight: bold; font-size: 13px; letter-spacing: .04em; }
.tour-photo { border-top: 1px solid var(--line); }
.tour-photo img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.tour-foot { padding: 6px 10px 10px; }

.end { text-align: center; color: var(--mute); font-size: 12px; padding: 4px 0 8px; }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); padding: 12px 12px 16px; text-align: center; font-size: 12px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(0deg, #14040f, #000 80%); }
.ftr-p2k { letter-spacing: .1em; text-transform: uppercase; font-size: 11px; color: #8a8a8a; margin-top: 6px; }
.ftr-p2k b { color: #aaa; }

/* ============================================================
   ≥ 560px: side-by-side diaries
   ============================================================ */
@media (min-width: 560px) {
  .diarios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .diarios .sec-h, .diarios .nerd { grid-column: 1 / -1; }
  .diario-porri { transform: rotate(.6deg) translateX(-6px); position: relative; z-index: 1; }
  .hero-h { font-size: 26px; }
  .hdr-upd { display: inline; }
}

/* ============================================================
   ≥ 820px: the 780px fansite frame, sidebar left, nav in sidebar
   ============================================================ */
@media (min-width: 768px) {
  body { padding: 16px 0 24px; font-size: 12px; }
  #site { width: min(780px, 100%); border: 1px solid var(--line-2); box-shadow: 0 0 0 4px #000, 0 0 0 5px var(--peko-dark); min-height: 0; }
  .hdr { padding: 12px 16px 10px; }
  .hdr-logo img { width: 120px; height: 120px; }
  .hdr-title { font-size: 30px; }

  .cols { display: grid; grid-template-columns: 176px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "nav main" "side main"; align-items: start; }
  .side { grid-area: side; display: flex; flex-direction: column; gap: 10px; border-top: 0; border-right: 1px solid var(--line); padding: 0 8px 10px; }
  .main { grid-area: main; padding: 10px 12px 12px; gap: 16px; }

  /* nav becomes the classic left button column */
  .nav { grid-area: nav; position: static; height: auto; padding: 10px 8px 0; border: 0; border-right: 1px solid var(--line); background: none; }
  .nav ul { flex-direction: column; height: auto; max-width: none; margin: 0; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 8px; height: 44px; padding: 0 10px; font-size: 11px; border-right: 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #202020, #0a0a0a); }
  .nav a i { font-size: 14px; width: 16px; text-align: center; }
  .nav li:first-child a { border-top: 1px solid var(--line); }

  .dia { font-size: 12px; }
  .cam-fig img { aspect-ratio: 1 / 1; }
  .product-img { flex-basis: 150px; }
  .hero-h { font-size: 30px; }
  .ready { font-size: 18px; }
}

/* desktop-width AND a real mouse: allow period-accurate compact controls */
@media (min-width: 768px) and (pointer: fine) {
  .nav a { height: 34px; }
  .btn { min-height: 32px; font-size: 11px; }
  .btn-sm { min-height: 28px; }
  .files a { min-height: 26px; }
  .links a { min-height: 30px; }
}
