html { overflow-x: clip; }
body.app {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  background: #0c0c0c;
  color: #f3f3f4;
  font-family: Raleway, system-ui, sans-serif;
}
body.app button, body.app input { font-family: inherit; }
[hidden] { display: none !important; }
body.app a { color: inherit; text-decoration: none; }

.appbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(8px + env(safe-area-inset-top)) 22px 8px;
  background: #0c0c0c;
  border-bottom: 1px solid #1c1c1c;
}
.appbar-left, .appbar-right, .app-brand, .app-link, .logout, .lang {
  display: flex;
  align-items: center;
}
.appbar-left { gap: 18px; min-width: 0; }
.appbar-right { gap: 16px; }
.app-brand { gap: 8px; font-weight: 700; font-size: 15px; }
.app-brand svg, .app-link svg, .icon-btn svg, .logout svg, .sun svg { width: 18px; height: 18px; }
.app-link, .icon-btn, .logout {
  gap: 8px;
  border: 0;
  background: transparent;
  color: #c8c8ce;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; color: #bdbdc4; }
.lang { gap: 8px; color: #8d8d95; font-size: 13px; font-weight: 700; }
.lang .on { color: #fff; }
.sun { color: #c8c8ce; display: grid; }
.pro {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ff4f93;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.logout { color: #d0d0d6; }

.apptabs {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 12px;
  background: #101010;
  border-bottom: 1px solid #1c1c1c;
  overflow-x: auto;
}
.apptab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #9a9aa3;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.tab-ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #8e8e96;
}
.tab-ico svg { width: 15px; height: 15px; }
.apptab.is-on { color: #fff; }
.apptab:disabled { opacity: 0.35; cursor: default; }
.apptab.is-on .tab-ico { background: #ff4f93; color: #fff; }
.tab-rule { width: 1px; height: 16px; background: #2c2c2c; flex: none; }

main { padding: 22px 28px 80px; }
.events-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.events-title { display: flex; gap: 12px; align-items: center; }
.events-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #2a1520;
  color: #ff4f93;
}
.events-mark svg, .empty-ico svg { width: 18px; height: 18px; }
.events-title h1, .sheet h2, .empty-stage h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.events-title p, .empty-stage p, .lede, .hint { margin: 3px 0 0; color: #9a9aa3; font-size: 13px; line-height: 1.45; }
.meters { display: flex; gap: 28px; justify-content: center; }
.meter { display: grid; gap: 2px; min-width: 120px; }
.meter strong { font-size: 14px; }
.meter span { color: #8e8e96; font-size: 12px; }
.meter-track {
  display: block;
  width: 92px;
  height: 4px;
  margin-top: 6px;
  border-radius: 99px;
  background: #3a2024;
  overflow: hidden;
}
#used-bar {
  display: block;
  width: 0;
  height: 100%;
  background: #e23b3b;
}
#used-bar.full { width: 100%; }
.head-actions { display: grid; justify-items: end; gap: 8px; }
.ftp-status { margin: 0; color: #3dce86; font-size: 12px; font-weight: 600; }
.ftp-status.live { color: #5ee0a0; }
.head-buttons, .empty-actions, .inline-form, .share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ghost-btn, .pink-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #2e2e2e;
  background: #1a1a1a;
  color: #eee;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ghost-btn svg, .pink-btn svg { width: 15px; height: 15px; }
.pink-btn { border-color: transparent; background: #ff4f93; color: #fff; }
.ghost-btn:disabled, .pink-btn:disabled { opacity: 0.45; cursor: default; }

.stage {
  margin-top: 22px;
  min-height: 460px;
  border-radius: 18px;
  background: #141414;
  border: 1px solid #222;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}
.stage.has-rows { display: block; padding: 10px; }
.empty-stage { text-align: center; max-width: 520px; }
.empty-ico {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  color: #d7d7dc;
}
.empty-stage h2 { font-size: 20px; }
.empty-stage p { margin: 8px 0 18px; }
.empty-actions { justify-content: center; }

.event-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
  color: #c8c8ce;
  font-size: 14px;
}
.event-check-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}
.event-check-all input, .event-check input {
  width: 18px;
  height: 18px;
  accent-color: #ff4f93;
  cursor: pointer;
}
#event-pick-count { color: #9a9aa3; }
.head-buttons .danger-btn { margin-top: 0; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.event-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.event-check { display: grid; place-items: center; flex: none; }
.event-item.is-picked .event-row { border-color: #ff4f93; background: #201018; }
.event-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #262626;
  background: #191919;
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.event-row.is-on { border-color: #ff4f93; }
.event-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #2a1520;
  color: #ff4f93;
  flex: none;
}
.event-ico svg { width: 16px; height: 16px; }
.event-copy { display: grid; gap: 2px; flex: 1; }
.event-copy span, .event-kicker { color: #9a9aa3; font-size: 13px; }
.event-kicker { color: #ff4f93; font-weight: 700; }

.sheet { max-width: 980px; }
.pick-gate {
  min-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 68px;
}
.pick-gate h2 { margin: 0; font-size: 18px; font-weight: 700; }
.pick-gate p { max-width: 420px; margin: 10px 0 18px; color: #9a9aa3; font-size: 13px; line-height: 1.5; }
.pick-gate select {
  width: min(260px, 100%);
  height: 40px;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: #121212;
  color: #f3f3f4;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
}
.pick-gate.is-chosen { min-height: 0; padding: 8px 0 20px; }
.pick-gate.is-chosen p { display: none; }
.sheet h2 { font-size: 22px; }
.sheet-bar { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 14px; }
.photo-sub { display: flex; gap: 14px; align-items: center; color: #9a9aa3; font-size: 13px; margin-bottom: 16px; }
.photo-sub strong { color: #fff; }
.photo-head { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 18px; align-items: center; }
.photo-head h2 { margin: 0; font-size: 18px; }
.photo-head p { margin: 2px 0 0; color: #9a9aa3; font-size: 13px; }
.photo-meters { display: flex; gap: 22px; }
#quota-bar, #storage-bar { display: block; height: 100%; width: 0; background: #8a8a92; }
.photo-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 8px; }
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #161616;
}
.photo-actions .danger-btn {
  margin-top: 0;
  min-height: 44px;
  padding: 0 16px;
}
.tile-wrap { position: relative; }
.tile-del {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 99px;
  background: rgba(12, 12, 12, 0.72);
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.photo-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #9a9aa3;
}
.photo-search svg { width: 16px; height: 16px; flex: none; }
.photo-search input { flex: 1; border: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; outline: none; }
.photo-stage {
  min-height: 420px;
  border-radius: 16px;
  border: 1px dashed #2e2e2e;
  background: #101010;
  padding: 18px;
}
.photo-empty { min-height: 360px; display: grid; align-content: center; justify-items: center; text-align: center; }
.photo-empty h2 { margin: 8px 0 0; font-size: 18px; }
.photo-empty p { max-width: 460px; margin: 8px 0 16px; color: #9a9aa3; font-size: 14px; line-height: 1.5; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #191919;
  color: #9a9aa3;
  cursor: pointer;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.selected { outline: 3px solid #ff4f93; }
.tile .mark {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  border: 2px solid #fff;
}
.tile.selected .mark { background: #ff4f93; }
.file-fallback { display: grid; place-items: center; height: 100%; padding: 8px; text-align: center; font-size: 12px; }
.share-row { margin-top: 14px; }
.share-row button, .note code { font: inherit; }
.share-row button {
  border-radius: 8px;
  border: 1px solid #2e2e2e;
  background: #1a1a1a;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.facts div { background: #161616; border: 1px solid #242424; border-radius: 12px; padding: 10px 12px; }
.facts dt { color: #9a9aa3; font-size: 12px; }
.facts dd { margin: 4px 0 0; font-family: Consolas, monospace; word-break: break-all; }
.note, .steps { color: #c8c8ce; }
label { display: block; margin: 14px 0 6px; color: #9a9aa3; font-size: 13px; }
.inline-form input, #share-title, #session-name, #public-url, #ftp-host-input, #ftp-port-input {
  height: 42px;
  min-width: min(320px, 100%);
  border-radius: 10px;
  border: 1px solid #2e2e2e;
  background: #101010;
  color: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}
dialog { border: 0; padding: 0; background: transparent; }
dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.qr-card {
  width: min(440px, calc(100vw - 24px));
  background: #161616;
  color: #fff;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 18px;
}
.qr-card h2 { margin: 0 0 12px; }
.kicker { margin: 0; color: #ff4f93; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.qr-form { display: grid; gap: 8px; }
#qr-image { width: 100%; border-radius: 12px; background: #fff; }
.chat {
  position: fixed;
  left: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff4f93;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.chat svg { width: 20px; height: 20px; }

.apptabs { position: relative; }
.ftp-chip {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #ff4f93;
  background: transparent;
  color: #ff4f93;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.boitier { max-width: 860px; margin: 0 auto; display: grid; gap: 14px; }
.boitier-head, .boitier-head h1 { display: flex; }
.boitier-head { gap: 12px; align-items: center; }
.boitier-head h1, .dest-card h2, .ftp-card h2, .source-card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.boitier-head p { margin: 2px 0 0; color: #9a9aa3; font-size: 13px; }
.dest-card {
  border: 1px solid #6d4e1e;
  background: linear-gradient(180deg, #24180c, #16110c);
  border-radius: 14px;
  padding: 16px 18px 14px;
}
.dest-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dest-card h2 { display: flex; align-items: center; gap: 8px; color: #e6b15a; font-size: 15px; }
.dest-card h2 svg, .source-card h3 svg, .ftp-card h2 svg, .cred-kicker svg { width: 16px; height: 16px; }
.dest-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.dest-stats span { display: block; color: #9a9aa3; font-size: 12px; margin-bottom: 4px; }
.dest-stats strong { font-size: 18px; }
.shared-pill {
  display: inline-flex;
  margin-top: 12px;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: #2a2a2a;
  color: #d0d0d6;
  font-size: 11px;
  font-weight: 700;
}
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.source-card {
  border: 1px solid #2a2a2a;
  background: #141414;
  border-radius: 14px;
  padding: 16px;
}
.source-card h3 { display: flex; align-items: center; gap: 8px; }
.source-card p { margin: 8px 0 12px; color: #b5b5bc; font-size: 13px; line-height: 1.45; }
.ok-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #1f6b45;
  color: #3dce86;
  font-size: 12px;
  font-weight: 700;
}
.ok-pill::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: #3dce86; margin-right: 6px; }
.soon { margin: 8px 0 0 !important; color: #8e8e96 !important; font-size: 12px !important; }
.wait-note { margin: 4px 0 0; color: #9a9aa3; font-size: 13px; line-height: 1.45; }
.ftp-off {
  margin-top: 8px;
  padding: 42px 20px 32px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: #161616;
  text-align: center;
}
.ftp-off .empty-ico { margin-bottom: 14px; }
.ftp-off p { margin: 0 0 16px; color: #d4d4d8; font-size: 14px; line-height: 1.5; }
.ftp-off strong { font-weight: 700; }
.source-card .ghost-btn svg { width: 14px; height: 14px; }
.acc, .ftp-card, .log-empty, .log-line {
  border: 1px solid #2a2a2a;
  background: #121212;
  border-radius: 12px;
}
.acc summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary span:last-child { color: #8e8e96; font-size: 12px; font-weight: 500; }
.acc-body { padding: 0 14px 14px; }
.id-title { margin: 22px 0 8px; font-size: 13px; color: #c8c8ce; }
.id-list { display: grid; gap: 8px; }
.id-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #101010;
}
.id-card strong { font-size: 14px; }
.id-card code { color: #ff4f93; font-size: 13px; }
.id-card .id-meta { color: #8e8e96; font-size: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.id-card button { justify-self: start; margin-top: 6px; }
.id-card input {
  height: 40px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2e2e2e;
  background: #0c0c0c;
  color: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
}
.id-card label { margin: 8px 0 4px; }
.ovh-guide ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.ovh-guide code { color: #ff4f93; }
.ftp-card { padding: 16px 18px; }
.ftp-card h2 { display: flex; align-items: center; gap: 8px; }
.ftp-card .lede { margin: 6px 0 14px; }
.cred-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #c8c8ce;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cred {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
}
.cred small { display: block; color: #8e8e96; font-size: 10px; letter-spacing: 0.08em; }
.cred strong { display: block; margin-top: 3px; font-size: 14px; word-break: break-all; }
.cred em { display: block; color: #8e8e96; font-style: normal; font-size: 11px; }
.cred button {
  border: 0;
  background: transparent;
  color: #d0d0d6;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.fine, .ftp-foot p { color: #9a9aa3; font-size: 12px; line-height: 1.5; }
.ftp-actions { display: flex; justify-content: flex-end; margin: 8px 0; }
.cert { margin-top: 8px; border-top: 1px solid #2a2a2a; }
.cert summary { cursor: pointer; padding: 10px 0; color: #d0d0d6; font-size: 12px; letter-spacing: 0.04em; }
.cert p { margin: 0 0 8px; color: #9a9aa3; font-size: 13px; }
.ftp-foot { margin-top: 8px; padding-top: 10px; border-top: 1px solid #242424; }
.log-block h3 { margin: 4px 0; font-size: 12px; letter-spacing: 0.04em; color: #d0d0d6; }
.log-block h3 span { color: #8e8e96; font-weight: 500; }
.log-empty, .log-line { padding: 14px; color: #9a9aa3; font-size: 13px; text-align: center; }
.log-list { display: grid; gap: 8px; }
.log-line { display: flex; justify-content: space-between; text-align: left; gap: 12px; }
.log-line b { color: #e6b15a; font-weight: 600; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  border: 0;
  background: transparent;
  color: #f3f3f4;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.back-link svg { width: 18px; height: 18px; }
.wizard { width: min(560px, 100%); margin: 0 auto; }
.wizard > h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.wizard > .lede { margin: 8px 0 18px; }
.wizard-card {
  display: grid;
  gap: 6px;
  padding: 18px 18px 14px;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
  background: #141414;
}
.wizard-card label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: #ececf0;
  font-size: 13px;
  font-weight: 600;
}
.wizard-card label span { color: #ff4f93; }
.wizard-card label svg, .wizard-card h3 svg { width: 15px; height: 15px; }
.wizard-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 14px;
}
.wizard-card input, .wizard-card select, .wizard-card textarea {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: #101010;
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
}
.wizard-card input:focus, .wizard-card select:focus, .wizard-card textarea:focus {
  outline: none;
  border-color: #ff4f93;
  box-shadow: 0 0 0 1px #ff4f93;
}
.wizard-card textarea { resize: vertical; min-height: 96px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.schedule-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  color: #9a9aa3;
  font-size: 12px;
  line-height: 1.45;
}
.wizard-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 12px; }
.text-btn { border: 0; background: transparent; color: #f3f3f4; font: inherit; font-weight: 600; cursor: pointer; }
#create-error, .app-error { color: #f0a0a0; }
.app-error { margin: 12px 16px 0; }
.event-page { width: min(720px, 100%); margin: 0 auto; display: grid; gap: 14px; }
.event-page > h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.ftp-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #145c4a;
  background: #0e1c18;
}
.ftp-banner p { margin: 0; color: #b7e7d4; font-size: 13px; line-height: 1.45; }
.opt-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  background: #141414;
}
.opt-card h3 { margin: 0 0 4px; font-size: 15px; }
.opt-card label { margin: 6px 0 0; }
.opt-card input, .opt-card select, .opt-card textarea {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: #101010;
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
}
.opt-card input:focus, .opt-card select:focus, .opt-card textarea:focus {
  outline: none;
  border-color: #ff4f93;
  box-shadow: 0 0 0 1px #ff4f93;
}
.opt-card input[type="color"] { height: 42px; padding: 4px; }
.opt-card input[type="range"] { padding: 0; accent-color: #ff4f93; }
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eee;
  font-weight: 600;
}
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle span {
  width: 36px;
  height: 20px;
  border-radius: 99px;
  background: #3a3a3a;
  position: relative;
  flex: none;
}
.toggle span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 99px;
  background: #fff;
  transition: transform 0.15s ease;
}
.toggle input:checked + span { background: #ff4f93; }
.toggle input:checked + span::after { transform: translateX(16px); }
.drop {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px dashed #3a3a3a;
  border-radius: 10px;
  color: #9a9aa3;
  cursor: pointer;
}
.drop input { display: none; }
.path-row { display: flex; gap: 8px; align-items: center; }
.path-row code {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  background: #101010;
  border: 1px solid #2a2a2a;
}
.danger-btn {
  justify-self: start;
  margin-top: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #5c2424;
  background: transparent;
  color: #f0a0a0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
#event-error { color: #f0a0a0; }
.upsell {
  width: min(420px, 100%);
  margin: 48px auto 0;
  padding: 28px 22px 22px;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  background: #161616;
  text-align: center;
}
.upsell-ico {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2a1520;
  color: #ff4f93;
}
.upsell-ico svg { width: 22px; height: 22px; }
.upsell h2 { margin: 0; font-size: 22px; }
.upsell p { margin: 10px 0 16px; color: #b5b5bc; font-size: 14px; line-height: 1.45; }
.upsell ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; text-align: left; color: #d7d7dc; font-size: 13px; }
.upsell li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 99px; background: #ff4f93; }
.pink-btn.wide { width: 100%; height: 42px; }
.quiet {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #d0d0d6;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
body.guest { margin: 0; min-height: 100vh; background: #120f0e; color: #f6f1ea; }
.guest-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
}
.guest-tools { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.guest-main { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 80px; text-align: center; }
.guest-main h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; }
.guest-meta { display: flex; justify-content: center; gap: 18px; color: #ff4f93; font-size: 14px; }
.price-note, .pay-note { margin: 10px 0 0; color: #d0c6bc; font-size: 14px; }
.pay-note { color: #ff4f93; }
.quality-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.quality-pill.owned { background: #ff4f93; }
.guest-grid .tile { position: relative; }
.selfie {
  width: 132px;
  height: 132px;
  margin: 28px auto 22px;
  border: 0;
  border-radius: 999px;
  background: #ff4f93;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
.selfie svg { width: 28px; height: 28px; display: block; margin: 0 auto 6px; }
.selfie-dialog { border: 0; padding: 0; background: transparent; max-width: 100%; }
.selfie-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.selfie-card {
  width: min(420px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: #161210;
  color: #f6f1ea;
  text-align: center;
}
.selfie-card h2 { margin: 0 0 8px; font-size: 22px; }
.selfie-stage {
  position: relative;
  width: 100%;
  margin: 12px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0c0c0c;
}
#selfie-video {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: cover;
  transform: scaleX(-1);
}
#selfie-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.selfie-file { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.guest-actions { display: flex; justify-content: center; gap: 8px; align-items: center; }
.guest-empty { margin-top: 72px; }
.guest-empty p { margin: 0; letter-spacing: 0.14em; font-size: 12px; color: #d9d0c8; }
.guest-empty h2 { margin: 12px 0 0; font-size: 28px; font-weight: 500; line-height: 1.35; }
.guest-grid { margin-top: 28px; text-align: left; }
.guest-preview { width: min(760px, 100%); margin: 0 auto; text-align: center; padding-top: 24px; }
.guest-preview h2 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; }
.stats-head h2 { margin: 0; font-size: 28px; }
.stats-head p { margin: 6px 0 18px; color: #9a9aa3; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats-grid article, .stat-list li {
  border: 1px solid #2a2a2a;
  background: #141414;
  border-radius: 14px;
  padding: 16px;
}
.stats-grid span, .stat-list span { display: block; color: #9a9aa3; font-size: 13px; }
.stats-grid strong { display: block; margin-top: 8px; font-size: 28px; }
.stat-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.stat-list li { display: flex; justify-content: space-between; align-items: center; }
.panel[data-panel="stats"] h3 { margin: 22px 0 10px; font-size: 16px; }
@media (max-width: 980px) {
  .appbar {
    flex-wrap: nowrap;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }
  .appbar-left, .appbar-right { gap: 8px; min-width: 0; }
  .app-link, .lang, .sun { display: none; }
  .logout-label { display: none; }
  .logout { width: 40px; height: 40px; justify-content: center; padding: 0; }
  .apptabs {
    flex-wrap: wrap;
    justify-content: space-between;
    overflow: visible;
    gap: 4px 0;
    padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
  }
  .tab-rule, .ftp-chip { display: none; }
  .apptab {
    flex: 1 1 22%;
    min-width: 64px;
    max-width: 25%;
    flex-direction: column;
    height: auto;
    min-height: 52px;
    padding: 6px 2px;
    font-size: 10px;
    gap: 4px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }
  main { padding: 14px max(12px, env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .events-head { grid-template-columns: 1fr; gap: 12px; }
  .meters, .head-actions, .head-buttons { justify-content: flex-start; justify-items: start; width: 100%; }
  .meters { flex-wrap: wrap; gap: 12px 20px; }
  .meter, .meter-track { min-width: 0; width: auto; max-width: 100%; }
  .head-buttons { width: 100%; }
  .head-buttons .pink-btn, .head-buttons .danger-btn { flex: 1 1 auto; }
  .stage { min-height: 280px; }
  .event-toolbar { flex-wrap: wrap; }
  .event-item { align-items: stretch; }
  .event-row { min-width: 0; padding: 12px; }
  .event-copy strong { overflow-wrap: anywhere; }
  .photo-head, .photo-meters, .sheet-bar { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .photo-sub { flex-wrap: wrap; }
  .photo-actions {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 0 12px;
  }
  .photo-actions .danger-btn { width: 100%; }
  .tile-del { width: 36px; height: 36px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-stage, .photo-empty { min-height: 220px; padding: 12px; }
  .pair, .source-grid, .cred-grid, .dest-stats, .dest-top { grid-template-columns: 1fr; display: grid; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-list li { flex-wrap: wrap; gap: 6px; }
  .wizard > h2, .event-page > h2 { font-size: 22px; }
  .wizard-card, .opt-card, .dest-card, .ftp-card { padding: 14px; }
  .empty-actions, .guest-actions { flex-wrap: wrap; justify-content: center; }
  .qr-card { width: min(440px, calc(100% - 24px)); }
  .guest-bar { padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); }
  .guest-tools .lang, .hide-phone { display: none; }
  .guest-main { width: min(760px, calc(100% - 24px)); padding: 28px 0 72px; }
  .guest-main h1, .guest-preview h2 { font-size: 1.7rem; overflow-wrap: anywhere; }
  .guest-empty h2 { font-size: 20px; }
  .chat { left: max(12px, env(safe-area-inset-left)); }
  .log-line { flex-wrap: wrap; }
  code, .id-card, .cred strong, .path-row code { overflow-wrap: anywhere; word-break: break-word; }
}

@media (max-width: 430px) {
  .apptab { flex-basis: 25%; font-size: 9px; }
  .stats-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pink-btn, .ghost-btn { min-height: 40px; }
}
