/* nasza-klasa.net - single hand-written stylesheet, no framework */

:root {
  --ink: #1d2430;
  --ink-soft: #55607a;
  --paper: #f6f4ee;
  --card: #ffffff;
  --accent: #1f6f43;      /* szkolna tablica */
  --accent-dark: #174f31;
  --accent-soft: #e3efe7;
  --danger: #a4343a;
  --danger-soft: #f7e5e6;
  --line: #d8d4c8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(29, 36, 48, 0.12);
  --space: 1rem;
  --chalk: #f2efe2;
}

* { box-sizing: border-box; }

/* the hidden attribute must always win, even over display:flex components */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

/* --- nav --- */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding: 0.6rem var(--space);
  background: var(--accent);
  color: var(--chalk);
}

.topnav .brand {
  color: var(--chalk);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.navlinks { display: flex; align-items: center; gap: 0.9rem; }

.navprofile { display: inline-flex; align-items: center; gap: 0.4rem; }
.navavatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

.navlinks a { color: var(--chalk); text-decoration: none; }
.navlinks a:hover { text-decoration: underline; }

form.inline { display: inline; margin: 0; }

button.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--chalk);
  font: inherit;
  cursor: pointer;
}
button.linklike:hover { text-decoration: underline; }

/* --- layout --- */

.content {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--space);
}

.footer {
  padding: 0.75rem var(--space);
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.messages { max-width: 64rem; margin: 0.5rem auto 0; padding: 0 var(--space); }
.message {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin-bottom: 0.4rem;
}
.message.error { background: var(--danger-soft); }

/* --- cards, buttons, forms --- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* comfortable touch target */
  background: var(--accent);
  color: var(--chalk);
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1.3rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }

.btn.danger { background: var(--danger); }

.muted { color: var(--ink-soft); font-size: 0.9rem; }

.errors, .errorlist {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  margin: 0.5rem 0;
  list-style: none;
}

.authbox { max-width: 24rem; margin: 3rem auto; padding: 1.6rem 1.8rem; }
.authbox h1 { text-align: center; font-size: 1.4rem; margin: 0.2rem 0 0.2rem; }
.authbox .subtitle { text-align: center; color: var(--ink-soft); margin: 0 0 1rem; }
.authbox--wide { max-width: 30rem; }

.boundinfo {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
}

.btn-block { display: flex; width: 100%; text-align: center; margin-top: 1rem; padding: 0.65rem; }

form p { margin: 0.7rem 0; }
form label { display: block; font-weight: 600; margin-bottom: 0.2rem; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: #fff;
  font: inherit;
  font-size: max(1rem, 16px); /* also stops iOS from auto-zooming into fields */
  color: var(--ink);
}

input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.helptext { color: var(--ink-soft); font-size: 0.8rem; display: block; }

ul { padding-left: 1.2rem; }

form ul { list-style: none; padding-left: 0; }
form ul li label { font-weight: 400; display: inline-flex; gap: 0.4rem; align-items: center; }

a { color: var(--accent); }

/* --- landing --- */

.landing { text-align: center; padding: 1.5rem 1rem 3rem; }

.landing .lead { color: var(--ink-soft); max-width: 34rem; margin: 0.6rem auto 1.2rem; }

#tablica {
  width: min(26rem, 90vw);
  height: auto;
  margin: 0.5rem auto 0;
  display: block;
  filter: drop-shadow(0 5px 10px rgba(29, 36, 48, 0.22));
}

/* the white class-tag plates ("numerek") from school photos */
.tag-plate {
  fill: #f8f7f3;
  stroke: #d8d5cc;
  stroke-width: 1.5;
}

.tag-hole {
  fill: var(--paper);
  stroke: #c4c1b7;
  stroke-width: 1.5;
}

.tag-scratch {
  stroke: #e9e7e0;
  stroke-width: 1.2;
  fill: none;
}

.tag-text {
  fill: #16171a;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 128px;
  letter-spacing: 2px;
}

.tag-caption { color: var(--ink-soft); margin: 0.6rem 0 0; }
.tag-caption strong { color: var(--ink); font-weight: 600; }

/* --- roster --- */

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }

.chip {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--chalk); }
.chip:hover:not(.active) { border-color: var(--accent); }

.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.8rem;
}

.personcard {
  position: relative;
  padding: 1rem 0.8rem;
}
.personcard:hover { border-color: var(--accent); }

.cardlink {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}

/* contact icons flank the avatar - the side space was born for them */
.contact-ico {
  position: absolute;
  top: 1.4rem;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-soft);
}
.contact-ico svg { width: 21px; height: 21px; }
.contact-mail { left: 0.7rem; }
.contact-wa { right: 0.7rem; color: #1f8a4d; }
.contact-ico:hover { border-color: var(--accent); color: var(--accent-dark); }
.contact-wa:hover { color: #166b3b; }

.contact-inline {
  position: static;
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.contact-inline svg { width: 17px; height: 17px; }

.personname { font-weight: 600; }

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
}

.avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.4rem;
}

.avatar-big { width: 112px; height: 112px; font-size: 2rem; }

.avatar-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(11, 13, 17, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.avatar-overlay img {
  max-width: min(92vw, 640px);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
.avatar-close {
  position: fixed;
  top: 0.4rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: #f2efe2;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
}

.dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #2f9e44;
  margin-left: 0.3rem;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.8rem;
}

.gradetags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.gradetag {
  font-size: 0.72rem;
  padding: 0.04rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--card);
}

.cardfacts { font-size: 0.78rem; }

/* profile memories - the light-theme twin of the lightbox wspomnienia */
.pamietniczek { margin-top: 1.5rem; max-width: 42rem; }

.pm-entry { border-top: 1px solid var(--line); padding: 0.5rem 0; }
.pm-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; font-size: 0.82rem; }
.pm-text { white-space: pre-wrap; margin: 0.15rem 0 0.1rem; }

button.pm-action, .pm-editbox summary {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}
.pm-editbox { margin-top: 0.2rem; }
.pm-editbox summary { list-style: none; display: inline; }
.pm-editbox form { margin-top: 0.4rem; }
.pm-editbox .btn { margin-top: 0.4rem; padding: 0.35rem 0.9rem; }

.gradetag-teacher {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

/* --- profile --- */

.profile-head { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.profile-head h1 { margin: 0.2rem 0; }
.profile-facts dt { font-weight: 600; margin-top: 0.5rem; }
.profile-facts dd { margin: 0; color: var(--ink-soft); }
.bio { white-space: normal; }

/* --- dzienniczek / Wozny --- */

.wozny { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; text-align: right; }

.wozny-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26%;
  width: 96px;
  height: 106px;
  padding: 8px 8px 4px;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wozny-btn:hover { border-color: var(--accent); transform: scale(1.04); }
.wozny-btn { transition: transform 150ms ease, border-color 150ms ease; }
.wozny-btn img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { .wozny-btn:hover { transform: none; } }

.wozny-bubble {
  position: absolute;
  right: 0;
  bottom: 118px;
  width: max-content;
  max-width: 16rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  animation: wozny-pop 300ms ease;
}

@keyframes wozny-pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wozny-bubble { animation: none; }
}

.wozny-dialog {
  max-width: 28rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: 0 8px 30px rgba(29, 36, 48, 0.25);
}
.wozny-dialog::backdrop { background: rgba(29, 36, 48, 0.45); }
.wozny-dialog h2 { margin-top: 0; font-size: 1.1rem; }

.dialog-actions { display: flex; gap: 1rem; align-items: center; }

button.linklike-dark {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-soft);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 200; /* above the lightbox (100) and the viewfinder (130) */
}

.ticket { margin-bottom: 0.8rem; }
.ticket-head { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.4rem; }

.badge-cat { background: #eee7d7; color: #6b5d3f; }
.badge-new { background: #e7e9ee; color: #3f4a63; }
.badge-accepted { background: #dbe9f6; color: #1d5c8f; }
.badge-done { background: #dff0e2; color: #1f6f43; }
.badge-ignored { background: #f7e5e6; color: #a4343a; }

/* --- gallery --- */

.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.navcta { font-weight: 700; }

.datehead { font-size: 1rem; color: var(--ink-soft); margin: 1.2rem 0 0.5rem; }

.newsbox { margin-bottom: 1rem; padding: 0.9rem 1.2rem; }
.newsbox h2 { margin: 0 0 0.4rem; font-size: 1.05rem; color: var(--accent-dark); }
.newsbox ul { list-style: none; padding: 0; margin: 0; }
.newsbox li { padding: 0.15rem 0; font-size: 0.92rem; }

.filterinfo { background: var(--accent-soft); border-radius: var(--radius); padding: 0.4rem 0.8rem; }

.mediagrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

.mediathumb {
  position: relative;
  padding: 0;
  border: none;
  background: var(--accent-soft);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}
.mediathumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mediathumb:hover img { opacity: 0.9; }

.playmark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.5rem 0; }

/* --- lightbox --- */

.noscroll { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 18, 24, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  max-width: calc(100vw - 7rem);
  max-height: calc(100vh - 7rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-stage img, .lb-stage video {
  max-width: calc(100vw - 7rem);
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  border-radius: 4px;
}

.lb-btn {
  position: absolute;
  background: none;
  border: none;
  color: #f2efe2;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 1rem;
  z-index: 101;
}
.lb-btn:hover { color: #fff; }
.lb-close { top: 0.3rem; right: 0.5rem; }
.lb-prev { left: 0.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.2rem; top: 50%; transform: translateY(-50%); }

.lb-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 1rem;
  background: rgba(15, 18, 24, 0.75);
  color: #e7e4d8;
  font-size: 0.9rem;
}
.lb-meta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.lb-meta a { color: #cfe7d8; }
.lb-info .muted { color: #b7b3a6; }

.lb-info-toggle { display: none; }

.lb-hevc { background: #5a4030; color: #f2efe2; padding: 0.4rem 0.8rem; border-radius: 6px; margin-bottom: 0.4rem; }
.lb-hevc a { color: #ffd88a; }

.lb-tags { margin-top: 0.3rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* --- wspomnienia in the lightbox --- */

.lb-memwrap { margin-top: 0.5rem; max-width: 38rem; }

.lb-memories { max-height: 26vh; overflow-y: auto; }

.lb-memory {
  border-top: 1px solid rgba(242, 239, 226, 0.18);
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.lb-memhead { color: #b7b3a6; font-size: 0.8rem; }
.lb-memhead a { color: #cfe7d8; }
.lb-memtext { white-space: pre-wrap; margin: 0.15rem 0 0.2rem; }
.lb-memory .linklike-dark { margin-right: 0.6rem; font-size: 0.8rem; }
.lb-memory textarea,
.lb-memoryform textarea {
  width: 100%;
  background: #1d2430;
  border: 1px solid rgba(242, 239, 226, 0.3);
  color: #f2efe2;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
}

.lb-memoryform { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; margin-top: 0.4rem; }

/* --- upload page --- */

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  padding: 2rem 1rem;
  margin: 1rem 0;
  background: var(--card);
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }

.uprow {
  display: grid;
  grid-template-columns: 1fr 160px minmax(12rem, auto);
  gap: 0.8rem;
  align-items: center;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
}
.upname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upthumb { height: 28px; border-radius: 4px; vertical-align: middle; margin-right: 6px; }

.era-pick .era-option { display: block; font-weight: 400; margin: 0.2rem 0; }
.era-pick input[type="radio"] { width: auto; margin-right: 0.4rem; }
.year-input { width: 7rem; display: inline-block; margin-left: 0.4rem; }
.when-select { width: auto; display: inline-block; margin-left: 0.4rem; }
.upbar { height: 8px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.upfill { height: 100%; width: 0; background: var(--accent); transition: width 200ms; }
.up-ok .upfill { background: #2f9e44; }
.up-dup .upfill { background: #b58900; }
.up-err .upfill { background: var(--danger); }

.albumcover { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; background: var(--accent-soft); }
.albumcover-empty { display: flex; align-items: center; justify-content: center; font-size: 2rem; }
@media (max-width: 640px) {
  .uprow { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* --- tagging --- */

.lb-imgwrap { position: relative; display: inline-block; }

.lb-boxes { position: absolute; inset: 0; pointer-events: none; }

/* resting boxes stay quiet (faces are the point); hover on the box OR its
   chip sets both ablaze - :hover covers the element itself, .hot is added
   by JS to the counterpart */
.tagbox {
  position: absolute;
  border: 2px solid rgba(242, 239, 226, 0.85);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}
.tagbox:hover,
.tagbox.hot {
  border: 3px solid #ffd88a;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 16px rgba(255, 216, 138, 0.95);
}

.tagchip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(242, 239, 226, 0.14);
  border: 1px solid rgba(242, 239, 226, 0.35);
  border-radius: 999px;
  padding: 0.14rem 0.65rem;
  font-size: 0.9rem;
}
.tagchip:hover,
.tagchip.hot {
  border-color: #ffd88a;
  background: rgba(255, 216, 138, 0.28);
  box-shadow: 0 0 10px rgba(255, 216, 138, 0.65);
}
.tagchip a { color: #e7e4d8; text-decoration: none; }
.tagchip a:hover { text-decoration: underline; }
.tagdel {
  background: none;
  border: none;
  color: #b7b3a6;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.1rem;
}
.tagdel:hover { color: #fff; }

.lb-action {
  background: none;
  border: 1px solid rgba(242, 239, 226, 0.4);
  color: #e7e4d8;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.lb-action:hover { border-color: #fff; color: #fff; }
.lb-action-warn { border-color: rgba(255, 160, 160, 0.5); color: #f3c0c0; }
.lb-action-warn:hover { border-color: #f3c0c0; color: #fff; }

.lb-minipanel {
  margin-top: 0.5rem;
  background: rgba(15, 18, 24, 0.9);
  border: 1px solid rgba(242, 239, 226, 0.25);
  border-radius: var(--radius);
  padding: 0.6rem;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lb-minipanel input {
  background: #1d2430;
  border: 1px solid rgba(242, 239, 226, 0.3);
  color: #f2efe2;
}

.lb-picker-results { display: flex; flex-direction: column; gap: 2px; max-height: 11rem; overflow-y: auto; }

.lb-similar-label { color: #ffd88a; font-size: 0.8rem; margin: 0.2rem 0; }

/* --- beta viewfinder tagger --- */

.lb-vf {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: #0b0d11;
  overflow: hidden;
  touch-action: none;
}

.lb-vf-stage {
  position: absolute;
  inset: 0 0 84px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-vf-stage img {
  max-width: 100vw;
  max-height: calc(100vh - 84px);
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-vf-cross {
  position: fixed;
  left: 50%;
  top: calc(50% - 42px);
  transform: translate(-50%, -50%);
  width: 104px;
  height: 104px;
  border: 3px solid #ffd88a;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.lb-vf-hint {
  position: fixed;
  top: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  color: #f2efe2;
  background: rgba(11, 13, 17, 0.75);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}

.lb-vf-zoom {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(242, 239, 226, 0.55);
  background: rgba(11, 13, 17, 0.6);
  color: #f2efe2;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.lb-vf-zoom:hover { border-color: #ffd88a; color: #ffd88a; }

.lb-vf-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* --- mobile readability: bigger type and finger-sized targets for 45+ eyes --- */

@media (max-width: 640px) {
  html { font-size: 17.5px; }
  .btn { padding: 0.7rem 1.5rem; }
  .chip { padding: 0.32rem 0.9rem; font-size: 0.95rem; }
  .navlinks { gap: 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
  .navlinks a, button.linklike { padding: 0.35rem 0.1rem; }
  .lb-btn { font-size: 3.4rem; padding: 1.1rem 0.9rem; }
  .lb-action { font-size: 1rem; padding: 0.45rem 1.05rem; }
  .lb-info { font-size: 1rem; }
  .lb-meta { gap: 0.7rem 1.1rem; }

  /* phone: the photo owns the screen; details are one tap away */
  .lb-stage,
  .lb-stage img,
  .lb-stage video { max-width: calc(100vw - 1rem); max-height: calc(100vh - 5rem); }
  .lb-info-toggle {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #f2efe2;
    font: inherit;
    font-weight: 600;
    text-align: center;
    padding: 0.55rem 0;
    cursor: pointer;
  }
  .lb-info:not(.open) > :not(.lb-info-toggle) { display: none; }
  .lb-info.open { max-height: 64vh; overflow-y: auto; }
  .tagchip { font-size: 0.95rem; padding: 0.22rem 0.8rem; }
  .tagdel { font-size: 1.25rem; padding: 0 0.3rem; }
  .gradetag { font-size: 0.82rem; padding: 0.1rem 0.55rem; }
  .cardfacts { font-size: 0.85rem; }
  button.pm-action, .pm-editbox summary { font-size: 0.95rem; padding: 0.25rem 0.15rem; }
  .lb-memory .linklike-dark, .lb-memhead { font-size: 0.9rem; }
  .lb-personrow { font-size: 1rem; padding: 0.5rem 0.5rem; }
  .footer { font-size: 0.85rem; }
}

.lb-personrow {
  text-align: left;
  background: none;
  border: none;
  color: #e7e4d8;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.lb-personrow:hover { background: rgba(242, 239, 226, 0.12); }

.editthumb { display: block; margin-top: 0.5rem; height: 80px; border-radius: 6px; }

/* --- zasady --- */

.zasady { max-width: 42rem; margin: 0 auto; }
.nowosci { list-style: none; padding: 0; }
.nowosci li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.zasady h2 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; color: var(--accent-dark); }
.zasady .lead { background: var(--accent-soft); border-radius: var(--radius); padding: 0.7rem 1rem; }
.footer a { color: var(--ink-soft); }
