/* Penny TV: channel sets, player, cards between videos, break screens and the grown-ups panel. */

/* ---------- channels ---------- */
.tv-sign {
  padding: 1vmin 4vmin; font-size: 6.5vmin; font-weight: 900; background: #fff; transform: rotate(-2deg);
  border: var(--line) solid var(--ink); border-radius: var(--wobble); box-shadow: var(--shadow);
}
.tv-sign span { background: var(--yellow); padding: 0 1.4vmin; border-radius: 2vmin; }
.tv-bar-gap { width: 12vmin; }
.tv-grid {
  position: relative; z-index: 1; flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  gap: 5vmin 6vmin; padding: 2vmin 6vmin 8vmin; overflow-y: auto; touch-action: pan-y;
}
.tv-set { position: relative; width: 40vmin; display: flex; flex-direction: column; align-items: center; animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.tv-set.yay { animation: yay .5s ease; }
.tv-antenna { width: 16vmin; height: 6.4vmin; margin-bottom: -0.6vmin; }
.tv-set-body {
  position: relative; width: 100%; padding: 2.4vmin 9vmin 2.4vmin 2.4vmin; background: var(--chan, var(--yellow));
  border: var(--line) solid var(--ink); border-radius: var(--wobble); box-shadow: var(--shadow);
}
.tv-set:active .tv-set-body { transform: translateY(0.8vmin); box-shadow: 0 0.3vmin 0 var(--ink); }
.tv-knobs { position: absolute; right: 2.2vmin; top: 2.4vmin; bottom: 2.4vmin; display: flex; flex-direction: column; justify-content: center; gap: 2vmin; }
.tv-knobs i { display: block; width: 4.6vmin; height: 4.6vmin; border-radius: 50%; background: #fff; border: 0.5vmin solid var(--ink); }
.tv-set-name { margin-top: 2vmin; padding: 0.6vmin 3vmin; font-size: 4.6vmin; font-weight: 900; background: #fff; border: 0.5vmin solid var(--ink); border-radius: 4vmin; }
.tv-loop { color: #E5484D; font-size: 3vmin; vertical-align: middle; }

.tv-thumb {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #1D2B5A center / cover no-repeat;
  border: 0.5vmin solid var(--ink); border-radius: 2vmin; overflow: hidden;
}
.tv-thumb-blank { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 7vmin; }
.tv-thumb.set { border-radius: 3vmin 2vmin 3.4vmin 2.2vmin; }
.tv-thumb.small { width: 22vmin; min-width: 120px; max-width: 180px; flex: none; border-width: 2px; border-radius: 8px; }
.tv-thumb.small .tv-thumb-blank { font-size: 20px; }
.tv-thumb.big { width: 48vmin; }

.tv-corner-penny { position: absolute; right: 2vmin; bottom: -2vmin; width: 22vmin; height: 20vmin; z-index: 0; pointer-events: none; }
.tv-empty { position: absolute; inset: 15vmin 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 6vmin; }
.tv-empty-penny { width: 34vmin; height: 31vmin; }
.tv-empty-title { font-size: 8vmin; font-weight: 900; margin-top: 2vmin; }
.tv-empty-sub { font-size: 4.2vmin; margin-top: 1vmin; }

/* ---------- player ---------- */
.tv-play { background: #000; }
.tv-play::before { display: none; }
.tv-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tv-video, .tv-yt, .tv-yt iframe { width: 100%; height: 100%; border: 0; background: #000; }
.tv-video { object-fit: contain; }
.tv-shield { position: absolute; inset: 0; z-index: 2; }
.tv-shield.open { pointer-events: none; }
.tv-play-top { position: absolute; left: 3vmin; top: 3vmin; z-index: 3; }
.tv-home { position: relative; width: 11vmin; height: 11vmin; opacity: .55; transition: opacity .2s; }
.tv-home.holding { opacity: 1; }
.tv-ring { position: absolute; inset: -1.4vmin; width: calc(100% + 2.8vmin) !important; height: calc(100% + 2.8vmin) !important; transform: rotate(-90deg); pointer-events: none; }
.tv-ring circle { fill: none; stroke: var(--yellow); stroke-width: 7; stroke-dasharray: 289; stroke-dashoffset: 289; }
.tv-home.holding .tv-ring circle { transition: stroke-dashoffset 1.2s linear; stroke-dashoffset: 0; }
.tv-note {
  position: absolute; left: 50%; top: 3vmin; z-index: 3; transform: translate(-50%, -150%); transition: transform .3s;
  padding: 1.2vmin 3vmin; font-size: 3.6vmin; font-weight: 900; background: #fff; border: 0.5vmin solid var(--ink); border-radius: 4vmin;
  box-shadow: 0 0.6vmin 0 var(--ink); white-space: nowrap; pointer-events: none; opacity: 0;
}
.tv-note.show { transform: translate(-50%, 0); opacity: 1; }
.tv-play.needs-tap .tv-stage::after {
  content: '▶'; position: absolute; left: 50%; top: 50%; width: 24vmin; height: 24vmin; margin: -12vmin 0 0 -12vmin;
  display: flex; align-items: center; justify-content: center; font-size: 11vmin; color: var(--ink); pointer-events: none;
  background: var(--yellow); border: var(--line) solid var(--ink); border-radius: 50%; box-shadow: var(--shadow);
  animation: breathe 1.2s ease-in-out infinite; z-index: 1;
}

/* the card between videos */
.tv-ident { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4vmin; padding: 6vmin; animation: popIn .35s ease both; }
.tv-ident::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(26, 26, 26, .1) 0.25vmin, transparent 0.3vmin); background-size: 4vmin 4vmin;
}
.tv-ident-penny { width: 36vmin; height: 33vmin; flex: none; }
.tv-ident-right { display: flex; flex-direction: column; align-items: center; max-width: 56vmin; }
.tv-ident-chan { padding: 0.6vmin 3vmin; margin-bottom: 2vmin; font-size: 4vmin; font-weight: 900; background: #fff; border: 0.5vmin solid var(--ink); border-radius: 4vmin; }
.tv-ident-title { margin-top: 2vmin; font-size: 5vmin; font-weight: 900; text-align: center; line-height: 1.2; }
.tv-ident .tv-thumb.big { box-shadow: var(--shadow); border-width: var(--line); }
.tv-ident.end { flex-direction: column; gap: 1vmin; }
.tv-end-title { font-size: 11vmin; font-weight: 900; -webkit-text-stroke: 0.3vmin var(--ink); color: #fff; }
.tv-end-title.small { font-size: 7vmin; -webkit-text-stroke: 0; color: var(--ink); }

/* ---------- break screens ---------- */
.tv-break { align-items: center; justify-content: center; }
.tv-break.night { background: linear-gradient(#1D2B5A, #3A4F8F); color: #fff; }
.tv-break.sunny { background: linear-gradient(#DFF1F2, #CEF7C7); color: var(--ink); }
.tv-break.sunny .st-title { color: var(--ink); -webkit-text-stroke: 0; }
.tv-break.sunny .st-lock { color: var(--ink); background: rgba(255, 255, 255, .6); border-color: var(--ink); }
.tv-break::before { display: none; }

/* ---------- grown-ups panel (ordinary page sizes: it is read by adults, often in portrait) ---------- */
.gu {
  background: var(--cream); display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  font-size: 16px; -webkit-user-select: text; user-select: text; align-items: stretch; justify-content: flex-start;
}
.gu button, .gu input, .gu select { touch-action: manipulation; font: inherit; }
.gu-head {
  position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: var(--yellow); border-bottom: 3px solid var(--ink);
}
.gu-title { font-size: 20px; font-weight: 900; margin-right: auto; }
.gu-tabs { display: flex; gap: 6px; order: 3; width: 100%; }
.gu-tab { padding: 8px 14px; background: #fff; border: 2px solid var(--ink); border-radius: 18px; font-weight: 900; }
.gu-tab.on { background: var(--ink); color: #fff; }
.gu-done { padding: 8px 20px; background: #3CC77A; color: #fff; border: 2px solid var(--ink); border-radius: 18px; font-weight: 900; box-shadow: 0 3px 0 var(--ink); }
.gu-body { max-width: 760px; margin: 0 auto; padding: 16px 16px 60px; }
.gu-card { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px; margin-bottom: 14px; box-shadow: 0 3px 0 var(--ink); }
.gu-card.chan { border-left-width: 12px; }
.gu-h { font-weight: 900; font-size: 17px; margin-bottom: 8px; }
.gu-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.gu-row.wrap { flex-wrap: wrap; }
.gu-input { flex: 1; min-width: 0; padding: 10px 12px; font-weight: 700; background: #fff; border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); width: 100%; }
.gu-input.name { font-weight: 900; font-size: 18px; }
.gu-btn { padding: 10px 14px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; font-weight: 900; box-shadow: 0 2px 0 var(--ink); }
.gu-btn.main { background: var(--yellow); }
.gu-btn.small { padding: 6px 10px; font-size: 14px; }
.gu-btn.warn { background: #FFE0DC; }
.gu-btn:disabled { opacity: .7; }
.gu-msg { margin-top: 8px; font-weight: 700; min-height: 1em; }
.gu-hint { color: #555; font-size: 14px; font-weight: 700; line-height: 1.4; margin: 8px 2px 14px; }
.gu-hint.right { text-align: right; margin-top: -6px; }
.gu-empty { color: #666; padding: 8px 0; }
.gu-warn { color: #B42318; font-size: 13px; margin-top: 4px; }
.gu-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--teal); border: 1.5px solid var(--ink); font-size: 12px; }
.gu-tag.ok { background: var(--green); }
.gu-tag.yt { background: #FFE0DC; }
.gu-video { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; }
.gu-video.off { opacity: .55; }
.gu-vmid { flex: 1; min-width: 0; }
.gu-vtitle { width: 100%; padding: 4px 6px; font-weight: 900; border: 1.5px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); }
.gu-vtitle:focus { border-color: var(--ink); background: #fff; outline: none; }
.gu-vmeta { font-size: 13px; color: #444; margin-top: 4px; padding-left: 6px; }
.gu-vacts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.gu-toggle { padding: 6px 12px; border: 2px solid var(--ink); border-radius: 16px; background: #eee; font-weight: 900; }
.gu-toggle.on { background: #3CC77A; color: #fff; }
.gu-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); }
.gu-swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.gu-gap { width: 8px; }
.gu-choice { padding: 8px 12px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; font-weight: 900; }
.gu-choice.on { background: var(--yellow); }
.gu-big { font-size: 18px; margin-bottom: 10px; }
.gu-order { margin: 4px 0 10px 22px; }
.gu-order li { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px dashed #bbb; }
.gu-order li.off { color: #888; }
.gu-otitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gu-mini { width: 32px; height: 32px; background: #fff; border: 2px solid var(--ink); border-radius: 8px; font-weight: 900; }
@media (max-width: 560px) { .gu-video { flex-wrap: wrap; } .gu-vacts { flex-direction: row; flex-wrap: wrap; width: 100%; } }
