/* ============ MR.Cutter — felület ============ */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--space-3) var(--space-4);
  z-index: 90;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus {
  left: 0;
}

.hidden,
[hidden] {
  display: none !important;
}

.wrap,
main.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-20);
}

/* ---------- brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand .mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.wordmark em {
  font-style: normal;
  color: var(--accent);
}
.brand.small .mark {
  width: 22px;
  height: 22px;
}
.brand.small .wordmark {
  font-size: 18px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--text-dim);
  white-space: nowrap;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
}
.pill.ok .dot {
  background: var(--ok);
}
.pill.bad .dot {
  background: var(--bad);
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.i-sun {
  display: none;
}
[data-theme='dark'] .i-moon {
  display: none;
}
[data-theme='dark'] .i-sun {
  display: block;
}

/* ---------- pagehead ---------- */
.pagehead {
  padding: var(--space-12) 0 var(--space-8);
}
.pagehead h1 {
  font-size: var(--text-xl);
}
.pagehead .muted {
  margin-top: var(--space-2);
  max-width: 62ch;
}
.pagehead.center {
  text-align: center;
  padding-top: var(--space-16);
}
.pagehead.center .muted {
  margin-inline: auto;
}

/* a lablec a lap aljara kerul, ha keves a tartalom */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.wrap {
  flex: 1;
  width: 100%;
  min-width: 0;
}
.authmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-6);
}
.authmark .mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.muted {
  color: var(--text-dim);
  font-size: var(--text-sm);
}
.small {
  font-size: var(--text-xs);
}
.hint {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-faint);
}
.stack {
  display: grid;
  gap: var(--space-4);
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.row.gap {
  gap: var(--space-4);
}
.row.end {
  padding-block: var(--space-2);
}

/* ---------- panelek, kártyák ---------- */
.panel,
.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.panel h2,
.card h2 {
  margin-top: var(--space-2);
}
.panel h2 + .muted,
.card h2 + .muted {
  margin-top: var(--space-2);
}
.panel.danger {
  border-color: color-mix(in oklab, var(--bad) 40%, var(--line));
}

.card.auth {
  max-width: 26rem;
  margin: 0 auto;
}
.card.auth form {
  display: grid;
  gap: var(--space-3);
}
.card.auth .label {
  margin-bottom: 0;
}
.card.auth .btn-primary {
  margin-top: var(--space-2);
}
.card.auth h2 + .muted {
  margin-bottom: var(--space-5);
}

input[type='password'],
input[type='text'],
input[type='email'],
input[type='number'],
select {
  width: 100%;
  padding: 11px var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  min-height: 44px;
}
input[type='number'] {
  max-width: 140px;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 19px) 51%, calc(100% - 14px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.msg {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-dim);
}
.msg.bad {
  color: var(--bad);
}
.msg.ok {
  color: var(--ok);
}
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}

/* ---------- szolgáltató kártyák ---------- */
.prov {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.provcard {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.provcard.on {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
}
.provcard .ptop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.provcard h3 {
  font-size: var(--text-base);
}
.provcard .acc {
  font-size: var(--text-xs);
  color: var(--text-dim);
  word-break: break-all;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge.on {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.ok {
  border-color: color-mix(in oklab, var(--ok) 50%, var(--line));
  color: var(--ok);
}
.badge.bad {
  border-color: color-mix(in oklab, var(--bad) 50%, var(--line));
  color: var(--bad);
}
.badge.dim {
  color: var(--text-faint);
}

/* ---------- mappaválasztó sor ---------- */
.pickrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.pick {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  align-content: start;
}
.pick .val {
  font-size: var(--text-sm);
  font-weight: 700;
  word-break: break-word;
}
.pick .val.none {
  font-weight: 500;
  color: var(--text-faint);
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
}
.modal-card {
  width: min(34rem, 100%);
  max-height: min(80vh, 40rem);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: var(--space-6);
  gap: var(--space-4);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.modal-head h2 {
  margin-top: var(--space-1);
  font-size: var(--text-base);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
}
.crumbs button {
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: var(--text-xs);
}
.crumbs button:hover {
  color: var(--text);
  background: var(--surface-2);
}
.crumbs button[aria-current='true'] {
  color: var(--text);
  font-weight: 700;
}
.crumbs .sep {
  color: var(--text-faint);
}
.folders {
  overflow: auto;
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-height: 8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-3);
}
.folders button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
}
.folders button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}
.folders button svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-faint);
}
.folders button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-foot {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---------- útvonal chipek ---------- */
.route {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  font-size: var(--text-xs);
  font-weight: 700;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route .arr {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--text-faint);
}

/* ---------- fájllista ---------- */
.fhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.fhead h2 {
  font-size: var(--text-lg);
}
.flist {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  min-height: 44px;
  min-width: 0;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.check .box {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  position: relative;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.check .box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 7px;
  height: 11px;
  border: 2px solid var(--on-accent);
  border-top: 0;
  border-left: 0;
  transform: rotate(42deg) scale(0.5);
  opacity: 0;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}
.check input:checked + .box {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:checked + .box::after {
  opacity: 1;
  transform: rotate(42deg) scale(1);
}
.check input:focus-visible + .box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.check.tiny {
  font-size: var(--text-sm);
  color: var(--text-dim);
  white-space: nowrap;
}

.flist li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--space-2) var(--space-4);
}
.flist li.on {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
}
.flist .check {
  width: 100%;
}
.flist .fbody {
  display: block;
  min-width: 0;
  flex: 1;
}
.flist .fname {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flist .fmeta {
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: 2px;
}

/* ---------- üres állapot, skeleton ---------- */
.empty {
  padding: var(--space-10) var(--space-5);
  text-align: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-top: var(--space-5);
}
.empty h3 {
  font-size: var(--text-base);
}
.empty p {
  margin-top: var(--space-2);
  color: var(--text-dim);
  font-size: var(--text-sm);
}
.empty .btn-ghost {
  margin-top: var(--space-5);
}
.skel {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.skel i {
  display: block;
  height: 52px;
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    var(--surface-3) 45%,
    var(--surface-2) 90%
  );
  background-size: 300% 100%;
  animation: sweep 1.3s linear infinite;
}
@keyframes sweep {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex: none;
}
.loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-dim);
  padding-block: var(--space-4);
}

/* ---------- options ---------- */
.opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.opt {
  min-width: 0;
}
.opt .label {
  display: block;
  margin-bottom: var(--space-3);
}

.seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.seg button {
  flex: 1;
  padding: 9px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.seg button:hover {
  color: var(--text);
}
.seg button[aria-checked='true'],
.seg button[aria-selected='true'],
.seg button[aria-current='true'] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.seg.nav button {
  padding: 8px var(--space-4);
}

.range-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
input[type='range'] {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
  outline-offset: 6px;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-1);
  cursor: pointer;
}
input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  cursor: pointer;
}
.range-row output,
.unit {
  font-size: var(--text-sm);
  color: var(--text-dim);
  min-width: 76px;
  white-space: nowrap;
}

.switches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.switch {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.switch .track {
  width: 40px;
  height: 23px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  position: relative;
  transition: background 0.2s var(--ease);
  margin-top: 2px;
}
.switch .track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.switch input:checked + .track {
  background: var(--accent);
}
.switch input:checked + .track::after {
  transform: translateX(17px);
  background: var(--on-accent);
}
.switch input:focus-visible + .track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.switch strong {
  display: block;
  font-size: var(--text-sm);
}
.switch em {
  display: block;
  font-style: normal;
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-top: 3px;
}
#watch-panel .switch {
  margin-top: var(--space-5);
}
#watch-panel .row {
  margin-top: var(--space-4);
}
#watch-panel .msg {
  margin-top: 0;
}

/* ---------- jelszó forma ---------- */
.codeform {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-4);
  align-items: end;
  margin-top: var(--space-5);
}
.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.codeform .btn-ghost {
  min-height: 44px;
}

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px var(--space-6);
  min-height: 46px;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.btn-primary svg {
  width: 17px;
  height: 17px;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px var(--space-5);
  min-height: 44px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--line-strong);
}
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-ghost.bad {
  color: var(--bad);
  border-color: color-mix(in oklab, var(--bad) 45%, var(--line));
}
.btn-ghost.wide,
.btn-primary.wide {
  width: 100%;
}
.btn-ghost svg {
  width: 16px;
  height: 16px;
}
.cta-note {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* ---------- progress ---------- */
.run-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.run-head h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-2);
}
.run-pct {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}
.bar {
  height: 7px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 70%, var(--bg)), var(--accent));
  transition: width 0.5s var(--ease);
}
.runsteps {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.rs {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-faint);
}
.rs .tick {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
}
.rs .tick svg {
  width: 10px;
  height: 10px;
  opacity: 0;
}
.rs.done {
  color: var(--text-dim);
}
.rs.done .tick {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--bg);
}
.rs.done .tick svg {
  opacity: 1;
}
.rs.active {
  color: var(--text);
  font-weight: 700;
}
.rs.active .tick {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.logbox {
  margin-top: var(--space-6);
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
}
.logbox summary {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
  cursor: pointer;
  min-height: 24px;
}
.logbox pre {
  margin: var(--space-4) 0 0;
  max-height: 190px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
}
#cancel {
  margin-top: var(--space-6);
}

/* ---------- result ---------- */
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}
.player {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: oklch(0.12 0.008 60);
  aspect-ratio: 9 / 16;
}
.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.dl-row {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.stats-col {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.kpi strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi span {
  display: block;
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.timeline {
  display: flex;
  gap: 3px;
  height: 54px;
  align-items: stretch;
  margin-top: var(--space-5);
}
.timeline button {
  flex-grow: var(--g);
  flex-basis: 0;
  min-width: 3px;
  border: 0;
  padding: 0;
  border-radius: 3px;
  background: var(--surface-3);
  cursor: pointer;
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
}
.timeline button:hover {
  background: var(--line-strong);
  transform: scaleY(1.06);
}
.timeline button.is-hero {
  background: var(--accent);
}
.timeline button.is-hero:hover {
  background: var(--accent-hover);
}

/* feltöltve / előzmények listák */
.ups {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.ups li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: var(--text-sm);
  min-width: 0;
}
.ups .un {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ups a {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.hist {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.hist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.hist .hn {
  display: block;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist .hm {
  grid-column: 1;
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.hist .hb {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hist .hl {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hist .hl a {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

.narr summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 24px;
}
.narr summary .chev {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  transition: transform 0.2s var(--ease);
}
.narr[open] summary .chev {
  transform: rotate(180deg);
}
.narr summary:hover .chev {
  color: var(--accent);
}
.narr summary::-webkit-details-marker {
  display: none;
}
.narr p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-dim);
  max-height: 220px;
  overflow: auto;
  line-height: 1.75;
}

/* ---------- footer ---------- */
footer {
  width: 100%;
  border-top: 1px solid var(--line);
  padding: var(--space-8) var(--space-6);
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
  .player {
    max-width: 320px;
  }
  .codeform {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }
  .topbar-right {
    width: 100%;
    justify-content: flex-end;
  }
  .seg.nav {
    flex: 1;
    min-width: 0;
  }
  .seg.nav button {
    padding: 10px 4px;
    font-size: var(--text-xs);
    min-height: 44px;
  }
  .pill {
    display: none;
  }
  main.wrap {
    padding: 0 var(--space-4) var(--space-16);
  }
  .pagehead {
    padding: var(--space-8) 0 var(--space-6);
  }
  .panel,
  .card {
    padding: var(--space-5) var(--space-4);
  }
  .prov,
  .pickrow,
  .opts,
  .switches {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .chip {
    max-width: 100%;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .hist li {
    grid-template-columns: 1fr;
  }
  .hist .hb {
    grid-row: auto;
    grid-column: 1;
    justify-content: flex-start;
  }
  .row.end {
    flex-direction: column;
    align-items: stretch;
  }
  .row.end .btn-primary {
    width: 100%;
  }
  .modal-card {
    max-height: 88vh;
    padding: var(--space-5) var(--space-4);
  }
}

/* egyoszlopos gridek: a hosszu, nem tordelheto szoveg ne szelesitse a lapot */
.stack,
.flist,
.ups,
.hist,
.skel,
.dl-row,
.stats-col,
.runsteps,
.field,
.card.auth form,
.folders {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- uzemelteto: alkalmazas-kulcsok ---------- */
.ops {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.opscard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: var(--space-5);
  min-width: 0;
}
.opscard header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.opscard h3 { font-size: var(--text-base); }
.opsuri {
  display: block;
  margin: var(--space-3) 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.opsfields {
  display: grid;
  gap: var(--space-3);
}
.opsfields input {
  width: 100%;
  padding: 10px var(--space-4);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.opsrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
@media (min-width: 860px) {
  .ops { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.small-btn {
  margin-top: var(--space-3);
  padding: 9px var(--space-4);
  font-size: var(--text-xs);
}

/* ============================================================
   v2 — belepes, admin, honnan → hova
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- topbar: ki van belepve ---------- */
.who {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.who-mail {
  font-size: var(--text-xs);
  color: var(--text-dim);
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tiny-btn {
  padding: 8px var(--space-3);
  font-size: var(--text-xs);
  min-height: 38px;
}

/* ---------- belepes / regisztracio ---------- */
.authtabs {
  margin-bottom: var(--space-5);
}
.authtabs button {
  min-height: 44px;
}
.authtabs button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.authpane {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}
.authpane .btn-primary {
  margin-top: var(--space-2);
}
.authpane .hint {
  margin-top: 0;
}

/* ---------- honnan → hova ---------- */
.flow {
  background: var(--surface-1);
  border: 1px solid color-mix(in oklab, var(--accent) 34%, var(--line));
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.flow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.flow-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.flow-node {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.flow-node strong {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.flow .arr {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent);
}
.flow-note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-dim);
}
.flow-note strong {
  color: var(--text);
}
.flow.flow-cta {
  border-style: dashed;
}
.flow.flow-cta h2 {
  margin-top: var(--space-2);
}
.flow.flow-cta .muted {
  margin-top: var(--space-2);
}
.flow.flow-cta .btn-ghost {
  margin-top: var(--space-5);
}

/* ---------- folyamat: mit vag ---------- */
.namelist {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}
.namelist li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.nl-kind {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
  flex: none;
}
.nl-name {
  font-size: var(--text-sm);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- eredmeny: feltoltve ide ---------- */
.dest {
  border-color: color-mix(in oklab, var(--accent) 34%, var(--line));
}
.dest h2 {
  overflow-wrap: anywhere;
}
.dest #uploads {
  margin-top: var(--space-4);
}
.ups li {
  flex-wrap: wrap;
}
.ups li.err {
  border-color: color-mix(in oklab, var(--bad) 45%, var(--line));
}
.ups .ub {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}
.ups .us {
  font-size: var(--text-xs);
  color: var(--text-faint);
  flex: none;
}
.ups .uerr {
  flex-basis: 100%;
  font-size: var(--text-sm);
  color: var(--bad);
}
.moved {
  margin-top: var(--space-6);
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
}
.moved .muted {
  margin-top: var(--space-3);
}

/* ---------- elozmenyek: bovitett sor ---------- */
.hist .hroute {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  flex-wrap: wrap;
  min-width: 0;
}
.hist .hroute .arr {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: none;
}
.hist .hdet {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.hist .hgrp {
  display: grid;
  gap: var(--space-1);
  align-content: start;
  min-width: 0;
}
.hist .hfile {
  font-size: var(--text-xs);
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
a.hfile {
  color: var(--accent);
  font-weight: 700;
}
.hist .bad-t {
  color: var(--bad);
}

/* ---------- admin: felhasznalo tabla ---------- */
.tablewrap {
  margin-top: var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.utable {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 44rem;
}
.utable th,
.utable td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.utable td:last-child,
.utable th:last-child {
  padding-right: var(--space-4);
}
.utable thead th {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  white-space: nowrap;
}
.utable tbody tr:last-child th,
.utable tbody tr:last-child td {
  border-bottom: 0;
}
.utable tbody tr.off {
  background: color-mix(in oklab, var(--bad) 8%, transparent);
}
.utable tbody th {
  font-weight: 700;
}
.utable .umail {
  display: block;
  overflow-wrap: anywhere;
}
.utable .num {
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  white-space: nowrap;
}
.ustore {
  display: grid;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--text-dim);
}
.ustore strong {
  font-size: var(--text-sm);
  color: var(--text);
}
.uacts {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.uacts.confirm {
  align-items: center;
}
.uacts .small-btn {
  margin-top: 0;
  min-height: 40px;
}
#opspanel h2 {
  margin-top: var(--space-2);
}
#regsw:focus-visible + .track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .flow-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .flow .arr {
    transform: rotate(90deg);
    margin-inline: auto;
  }
  .hist .hdet {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .who-mail {
    display: none;
  }
  .seg.nav {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .seg.nav::-webkit-scrollbar {
    display: none;
  }
  .seg.nav button {
    white-space: nowrap;
  }
  .tablewrap {
    -webkit-overflow-scrolling: touch;
  }
  .flow {
    padding: var(--space-5) var(--space-4);
  }
}

@media (max-width: 720px) {
  .ups li {
    flex-direction: column;
    align-items: flex-start;
  }
  .ups .ub {
    flex-wrap: wrap;
    width: 100%;
  }
  .ups .un {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ups .uerr {
    flex-basis: auto;
    width: 100%;
  }
  .nl-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .who {
    gap: var(--space-2);
  }
  .seg.nav {
    flex: 0 1 auto;
  }
  .seg.nav button {
    flex: none;
    padding: 10px var(--space-3);
  }
}

/* ---------- tarolo csatlakoztatas: allapotsav ---------- */
.connstat {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.connstat p {
  margin: 0;
}
.connstat p + p,
.connstat p + a,
.connstat p + button {
  margin-top: var(--space-2);
}
.connstat a + button {
  margin-left: var(--space-2);
}
.connstat.ok {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
  background: color-mix(in oklab, var(--accent) 10%, var(--surface-2));
}
.connstat.bad {
  border-color: color-mix(in oklab, var(--bad) 50%, var(--line));
  background: color-mix(in oklab, var(--bad) 8%, var(--surface-2));
}
.connstat .small-btn {
  margin-top: var(--space-3);
  min-height: 40px;
}
.spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 2px solid color-mix(in oklab, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 2.4s; }
}

/* ---------- Smart Square Productions hitel -------------------------------
   Ugyanaz a szerkezet es meretezes, mint az Ertektanun es a tobbi SSP
   platformon: "by" + a jel + a rovidites (S kocka P). A jelben a negyzet a
   mindenkori platformszint veszi fel — itt a naplemente-arany.

   Az igazitasrol. A kulso elem BLOKK, nulla sormagassaggal es nulla
   betumerettel: igy sem a sordoboz-tobblet, sem a tagek kozotti szokoz nem
   szamit bele, a gyerekek pedig soron belul allnak, ezert oroklik a lablec
   igazitasat. A 7 px-es res a jel margojaval keszul, nem gap-pel, mert az
   csak flexben mukodne.                                                  */
.footright {
  text-align: right;
}
.ssp-hitel {
  display: block;
  line-height: 0;
  font-size: 0;
  margin: var(--space-3) 0 3px;
}
.ssp-hitel > * {
  vertical-align: middle;
}
.ssp-hitel .ssp-by {
  display: inline;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.ssp-hitel .ssp-jel {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0 7px;
}
.ssp-hitel .ssp-rov {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.ssp-hitel .ssp-rov i {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 2px;
  background: var(--accent);
}
.ssp-nev {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--text-faint);
}

@media (max-width: 640px) {
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .footright {
    text-align: left;
  }
}
