/* Νύχτα: deep ink, glowing light, a giant Γ5. Every row is a live bar. Nothing under 16px. */
@font-face {
  font-family: "TikTok Sans";
  src: url(fonts/tiktok-sans-g5.woff2?v=3d5f1ecc333c) format("woff2");
  font-weight: 500 900;
  font-stretch: 100% 150%;
  font-display: swap;
}

:root {
  --bg: #0B0C1F;
  --ink: #F3F2FA;
  --muted: #C4C5DA;
  --line: rgba(255, 255, 255, .16);
  --row: rgba(255, 255, 255, .08);
  --fill: rgba(120, 140, 255, .32);
  --amber: #FFC24D;
  --rose: #FF7BA5;
  --danger: #FF9C8F;
  --radius: 22px;
  --column: 520px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "TikTok Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.boot { padding: 40px 20px; text-align: center; font-size: 20px; }
.shell { max-width: var(--column); margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* Masthead */
.mast {
  position: relative;
  overflow: hidden;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 16px 18px;
  isolation: isolate;
}
.mast::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(45% 50% at 22% 78%, rgba(255, 84, 136, .9), transparent 72%),
    radial-gradient(45% 50% at 82% 26%, rgba(61, 91, 255, .95), transparent 72%);
  animation: aurora 14s ease-in-out infinite alternate;
}
@keyframes aurora {
  from { transform: translate3d(-5%, 3%, 0) scale(1); }
  to { transform: translate3d(6%, -4%, 0) scale(1.12); }
}
.pre { display: block; font-size: 26px; line-height: 1.1; font-weight: 800; }
.g5 {
  display: block;
  font-size: min(53vw, 266px);
  line-height: .86;
  font-weight: 900;
  font-stretch: 150%;
  letter-spacing: -.035em;
  margin: 6px 0 10px -.03em;
}
.out { display: block; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.mast.small { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; align-items: center; padding-block: calc(16px + env(safe-area-inset-top, 0px)) 16px; }
.mast.small .g5 { grid-row: 1 / 3; font-size: min(23vw, 112px); margin: 0; }
.mast.small .pre { font-size: 19px; align-self: end; }
.mast.small .out { font-size: 18px; align-self: start; }

/* Body */
.body { padding: 16px 16px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.me { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: 18px; }
.link {
  border: 0;
  background: none;
  padding: 0;
  min-height: 48px;
  font-weight: 750;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.now { background: var(--row); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; font-size: 19px; line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; }
.now small { display: block; font-size: 16px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
h2 { font-size: 32px; line-height: 1.06; margin: 0; font-weight: 850; font-stretch: 112%; color: #fff; }
.hint { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 4px 0 0; font-size: 18px; }
.hint b { font-weight: 750; white-space: nowrap; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.month { font-size: 18px; font-weight: 800; margin: 6px 0 -2px; }
.empty { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--row); }

/* Rows: the row itself is the bar chart */
.row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  padding: 10px 14px 10px 12px;
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  background: var(--row);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 20px;
  font-weight: 680;
  line-height: 1.18;
  transition: transform .12s, color .15s;
}
.row:active { transform: scale(.985); }
.fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: var(--fill);
  z-index: -1;
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
  animation: grow .9s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes grow { from { width: 0; } }
.nm { display: block; overflow-wrap: anywhere; }
.nm small { display: block; font-size: 18px; font-weight: 520; }
.mark { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--amber); display: grid; place-items: center; }
.num { font-size: 32px; line-height: 1; font-weight: 850; font-stretch: 120%; font-variant-numeric: tabular-nums; }
.num.bump { animation: bump .3s ease-out; }
@keyframes bump { 40% { transform: scale(1.32); } }
.tag { display: inline-block; margin-top: 5px; padding: 1px 10px; border-radius: 99px; background: var(--amber); color: var(--bg); font-size: 16px; font-weight: 700; }
.row[aria-pressed="true"] { background: linear-gradient(100deg, var(--amber), var(--rose)); color: var(--bg); box-shadow: none; }
.row[aria-pressed="true"] .fill { background: rgba(255, 255, 255, .3); }
.row[aria-pressed="true"] .mark { box-shadow: none; background: var(--bg); }
.row[aria-pressed="true"] .mark::after { content: ""; width: 17px; height: 9px; border: solid var(--amber); border-width: 0 0 4.5px 4.5px; transform: rotate(-45deg) translate(1px, -1px); }
.row[aria-pressed="true"] .tag { background: var(--bg); color: var(--amber); }
.row:disabled { color: var(--muted); cursor: default; }
.row:disabled .mark { box-shadow: inset 0 0 0 3px var(--muted); }
.row.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0%, 60% { box-shadow: inset 0 0 0 3px var(--amber); } }
.shake { animation: shake .32s linear; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.add { min-height: 68px; width: 100%; border: 0; box-shadow: inset 0 0 0 2.5px var(--amber); background: transparent; border-radius: var(--radius); color: var(--amber); font-weight: 750; font-size: 20px; }
.sort { min-height: 48px; border: 0; background: var(--row); box-shadow: inset 0 0 0 1px var(--line); color: #fff; border-radius: 99px; padding: 6px 18px; font-size: 18px; font-weight: 700; justify-self: start; }

/* Add forms */
.panel { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--row); box-shadow: inset 0 0 0 1px var(--line); }
.panel label { font-size: 18px; font-weight: 700; }
.field { width: 100%; min-height: 60px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--muted); background: var(--bg); font-size: 20px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.primary, .secondary { min-height: 60px; border-radius: 16px; border: 0; font-size: 19px; font-weight: 750; padding: 8px 10px; }
.primary { background: linear-gradient(100deg, var(--amber), var(--rose)); color: var(--bg); }
.secondary { background: transparent; box-shadow: inset 0 0 0 2px var(--line); color: #fff; }
.primary:disabled { opacity: .6; }
.ask { margin: 0; font-weight: 700; font-size: 19px; }

/* Calendar */
.cal-head { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; text-align: center; font-size: 20px; font-weight: 800; }
.cal-nav { min-height: 56px; border: 0; border-radius: 14px; background: var(--row); color: #fff; font-size: 28px; font-weight: 800; }
.cal-nav:disabled { opacity: .35; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal span { text-align: center; font-size: 16px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1; min-height: 44px; border: 0; border-radius: 12px; background: var(--row); color: #fff; font-size: 19px; font-weight: 700; padding: 0; }
.cal button:disabled { background: none; color: rgba(255, 255, 255, .34); }
.cal button.taken { box-shadow: inset 0 0 0 2.5px var(--amber); }

/* Name picker */
.names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.names button { min-height: 74px; border: 0; padding: 8px; font-size: 21px; font-weight: 720; background: var(--row); box-shadow: inset 0 0 0 1px var(--line); color: #fff; border-radius: var(--radius); overflow-wrap: anywhere; }
.names button:active { background: linear-gradient(100deg, var(--amber), var(--rose)); color: var(--bg); }
.footnote { margin: 0; color: var(--muted); }

/* Status message: always in view, whatever the scroll position */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 18px;
  background: #fff;
  color: var(--bg);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 10;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.offline { margin: 0; padding: 10px 16px; background: var(--danger); color: var(--bg); font-weight: 700; text-align: center; }

/* Plain messages (home page, wrong link) */
.message { position: relative; max-width: var(--column); margin: 0 auto; padding: 40px 20px; }
.m-pre { margin: 0; font-size: 26px; font-weight: 800; }
.m-g5 { margin: 6px 0 22px; font-size: min(46vw, 230px); line-height: .9; font-weight: 900; font-stretch: 150%; letter-spacing: -.035em; }
.message h1 { font-size: 30px; line-height: 1.1; margin: 0 0 8px; font-weight: 850; }
.message p:last-child { margin: 0; font-size: 19px; }

@media (prefers-reduced-motion: reduce) {
  .mast::before, .fill, .row.flash, .shake, .num.bump { animation: none; }
  .fill, .row, .toast { transition: none; }
}
