@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/geist-mono-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #faf9f5;
  --surface: #ffffff;
  --raised: #efe9de;
  --line: #e6dfd8;
  --fg: #141413;
  --muted: #6c6a64;
  --primary: #141413;
  --on-primary: #faf9f5;
  --accent: #eabd3b;
  --on-accent: #141413;
  --accent-soft: #f6e7b8;
  --success: #2f8a4c;
  --warning: #a66a12;
  --danger: #c64545;
  --logo: #141413;
  --shadow: 0 12px 32px rgb(20 20 19 / 0.14);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181715;
    --surface: #1f1e1b;
    --raised: #252320;
    --line: #3a3833;
    --fg: #faf9f5;
    --muted: #a09d96;
    --primary: #eabd3b;
    --on-primary: #141413;
    --accent-soft: #4d3f14;
    --success: #5db872;
    --warning: #e8a55a;
    --danger: #e0655f;
    --logo: #f6f5f1;
    --shadow: 0 12px 32px rgb(0 0 0 / 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/22px var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.page-title {
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.heading {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.strong {
  font-weight: 500;
}

.small {
  font-size: 13px;
  line-height: 18px;
}

.label {
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.code {
  font-family: var(--mono);
  font-size: 30px;
  line-height: 36px;
  letter-spacing: 0.04em;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grow {
  flex: 1;
  min-width: 0;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}

.icon-sm {
  width: 20px;
  height: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-secondary {
  border-color: var(--line);
}

.btn-secondary:hover,
.btn-text:hover {
  background: var(--raised);
}

.btn-danger {
  border-color: var(--line);
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid #747775;
  border-radius: 999px;
  background: #ffffff;
  color: #1f1f1f;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  text-decoration: none;
}

.btn-google svg {
  width: 20px;
  height: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
}

.input:focus {
  border-color: var(--fg);
  outline: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-pad {
  padding: 16px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 18px;
}

.alert-danger {
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
}

.alert-dark {
  background: var(--primary);
  color: var(--on-primary);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-ok {
  color: var(--success);
}

.status-wait {
  color: var(--warning);
}

.status-off {
  color: var(--muted);
}

.status-error {
  color: var(--danger);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo .mark {
  width: 32px;
  height: auto;
}

.logo-tld {
  color: var(--accent);
}

.mark .mark-body {
  fill: var(--logo);
}

.mark .mark-screen {
  fill: var(--accent);
}

.mark .mark-panel {
  fill: var(--bg);
}

.auth {
  display: flex;
  justify-content: center;
}

.auth-main {
  width: 100%;
  max-width: 420px;
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-main .logo {
  font-size: 26px;
  line-height: 30px;
  margin-bottom: 28px;
}

.auth-main .logo .mark {
  width: 42px;
}

.links {
  display: flex;
  gap: 16px;
  padding-top: 8px;
}

.links a {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
}

.skip:focus {
  top: 12px;
}

.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
}

.sidebar {
  display: none;
}

.app-main {
  min-width: 0;
  padding-bottom: calc(88px + var(--safe-bottom));
}

.page-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: var(--bg);
}

.page-head .page-title {
  font-size: 22px;
  line-height: 28px;
}

.page-head-text {
  flex: 1;
  min-width: 0;
}

.page-sub {
  display: none;
}

.page-actions {
  display: none;
  gap: 12px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--raised);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px 24px;
}

.content-narrow {
  max-width: 640px;
}

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 0 8px var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  text-decoration: none;
}

.tab-pill {
  display: grid;
  place-items: center;
  width: 60px;
  height: 32px;
  border-radius: 16px;
}

.tab[aria-current="page"] {
  color: var(--fg);
}

.tab[aria-current="page"] .tab-pill {
  background: var(--accent-soft);
}

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 14px rgb(20 20 19 / 0.18);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--raised);
}

.nav-item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--fg);
}

.nav-label {
  padding: 20px 14px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 10px 10px;
  border-radius: 14px;
  background: var(--bg);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list {
  margin: 0 -16px;
  padding: 0;
  list-style: none;
}

.list-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.list-row + .list-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--line);
}

.row-link {
  color: inherit;
  text-decoration: none;
}

.row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.row-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.row-extra {
  display: none;
}

.thumb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 54px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--raised);
  color: var(--muted);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tablet-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--raised);
}

.dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--muted);
}

.dot-on {
  background: var(--success);
}

.switch {
  position: relative;
  z-index: 1;
  display: inline-block;
  flex: none;
  width: 52px;
  height: 32px;
}

.switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  border: 2px solid var(--muted);
  border-radius: 16px;
  background: var(--raised);
  transition: background-color 0.15s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s, width 0.15s, height 0.15s, top 0.15s, left 0.15s;
}

.switch input:checked + .switch-track {
  border-color: var(--primary);
  background: var(--primary);
}

.switch input:checked + .switch-track::after {
  top: 2px;
  left: 22px;
  width: 24px;
  height: 24px;
  background: var(--on-primary);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.summary-card {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.empty {
  padding: 32px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  text-align: right;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 4px;
  background: var(--raised);
  -webkit-appearance: none;
  appearance: none;
}

.bar::-webkit-meter-bar,
.bar::-webkit-progress-bar {
  border: 0;
  border-radius: 4px;
  background: var(--raised);
}

.bar::-webkit-meter-optimum-value,
.bar::-webkit-meter-suboptimum-value,
.bar::-webkit-meter-even-less-good-value,
.bar::-webkit-progress-value {
  border-radius: 4px;
  background: var(--accent);
}

.bar::-moz-meter-bar,
.bar::-moz-progress-bar {
  border-radius: 4px;
  background: var(--accent);
}

.preview {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--raised);
}

.preview-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  color: var(--muted);
}

.preview-media img,
.preview-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--raised);
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 18px;
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload[hidden] {
  display: none;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.option-card-active {
  border: 2px solid var(--accent);
  cursor: default;
}

.option-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--raised);
}

.option-icon-accent {
  background: var(--accent);
  color: var(--on-accent);
}

.code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px;
  border-radius: 16px;
  background: var(--bg);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

.choice[aria-pressed="true"] {
  border: 3px solid var(--primary);
  padding: 10px;
}

.choice-pic {
  position: relative;
  display: flex;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--raised);
}

.choice-pic span {
  background: var(--accent);
}

.pic-25 span {
  width: 25%;
}

.pic-50 span {
  width: 50%;
}

.pic-right {
  justify-content: flex-end;
}

.pic-side span {
  width: 25%;
}

.session-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.session-row + .session-row {
  border-top: 1px solid var(--line);
}

dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgb(20 20 19 / 0.45);
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.scanner video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  background: #000;
}

.notice {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.notice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(320px, 100%);
  padding: 28px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--raised);
  box-shadow: var(--shadow);
  text-align: center;
  pointer-events: auto;
  animation: pop 0.2s ease-out;
}

.notice-card .icon {
  width: 56px;
  height: 56px;
  color: var(--success);
}

.notice-error .icon {
  color: var(--danger);
}

.notice[hidden] {
  display: none;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

.danger-text {
  color: var(--danger);
}

.error-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .app {
    grid-template-columns: 264px 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100dvh;
    padding: 24px 16px 20px;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }

  .sidebar .logo {
    margin: 0 6px 20px;
  }

  .sidebar-fill {
    flex: 1;
  }

  .app-main {
    padding: 0 48px 48px;
  }

  .page-head {
    position: static;
    min-height: auto;
    padding: 36px 0 20px;
  }

  .page-head .page-title {
    font-size: 28px;
    line-height: 34px;
  }

  .page-sub {
    display: block;
  }

  .page-actions {
    display: flex;
  }

  .content {
    max-width: 1120px;
    padding: 0;
  }

  .content-narrow {
    max-width: 640px;
  }

  .tabbar,
  .fab {
    display: none;
  }

  .list {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .list-row {
    padding: 14px 20px;
  }

  .list-row + .list-row::before {
    left: 0;
    right: 0;
  }

  .list-ads .list-row {
    grid-template-columns: auto minmax(0, 1fr) 260px 170px auto;
  }

  .list-ads .row-extra {
    display: block;
  }

  .list-ads .row-extra.status {
    display: inline-flex;
  }

  .list-ads .row-status {
    display: none;
  }

  .list-ads-all .list-row {
    grid-template-columns: auto minmax(0, 1fr) 260px 170px 104px;
  }

  .list-ads-all .chip {
    justify-self: end;
  }

  .summary {
    grid-template-columns: repeat(3, minmax(0, 220px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.status-plain::before {
  display: none;
}

@media (min-width: 1024px) {
  .mobile-only {
    display: none;
  }
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats .summary-card {
  color: inherit;
  text-decoration: none;
  padding: 16px 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--raised);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
}

.chip-ok {
  color: var(--success);
}

.chip-accent {
  background: var(--accent-soft);
}

.chip-warning {
  color: var(--warning);
}

.chip-danger {
  color: var(--danger);
}

.avatar-muted {
  background: var(--raised);
  color: var(--fg);
}

.row-mobile {
  display: block;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  outline: none;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.pill[aria-current="page"] {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.columns {
  display: grid;
  gap: 16px;
}

.segmented {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 24px;
  background: var(--raised);
}

.segmented label {
  flex: 1;
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: block;
  padding: 10px 8px;
  border-radius: 20px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--fg);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
}

.upuszczanie {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.drop-hint {
  display: none;
}

.view-switch {
  display: flex;
  padding: 4px;
  border-radius: 24px;
  background: var(--raised);
}

.view-switch a {
  flex: 1;
  padding: 10px 8px;
  border-radius: 20px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.view-switch a[aria-current="page"] {
  background: var(--surface);
  color: var(--fg);
}

.view-switch a:focus-visible {
  outline: 2px solid var(--accent);
}

.group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

.group-title {
  min-width: 0;
}

.danger-card {
  border-color: var(--danger);
}

.event-row,
.list-log .list-row {
  grid-template-columns: 110px 1fr auto;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

select.input {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.qr-box {
  align-self: center;
  width: min(240px, 70vw);
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}

.codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  font-size: 17px;
}

.code-input {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.2em;
}

@media (min-width: 1024px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .toolbar {
    flex-direction: row;
    align-items: center;
  }

  .search {
    width: 380px;
  }

  .list-admin .list-row {
    grid-template-columns: auto minmax(0, 1fr) 120px 240px 90px 140px auto;
  }

  .list-admin .row-extra {
    display: block;
  }

  .list-admin .row-mobile {
    display: none;
  }

  .view-switch {
    width: 360px;
  }

  .drop-hint {
    display: block;
  }

  .columns {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .filters {
    grid-template-columns: 1fr 1fr 180px 180px auto;
  }

  .event-row,
  .list-log .list-row {
    grid-template-columns: 150px 1fr 160px;
  }
}
