:root {
  --bg: #f5efe4;
  --ink: #1f2a37;
  --muted: #5f6b7a;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(31, 42, 55, 0.15);
  --brand: #0f766e;
  --brand-strong: #115e59;
  --warn: #b45309;
  --error: #b42318;
  --ok: #166534;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% 20%, #e3f1ec 0%, transparent 35%),
    radial-gradient(circle at 85% 0%, #ffe4c3 0%, transparent 34%),
    var(--bg);
  color: var(--ink);
}

.bg-shape {
  position: fixed;
  inset: auto -20vw -35vh auto;
  width: 62vw;
  height: 62vw;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(16, 185, 129, 0.28), rgba(249, 115, 22, 0.2));
  filter: blur(20px);
  pointer-events: none;
}

.app-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px 14px 36px;
}

.app-version {
  margin: 4px 2px 0;
  text-align: right;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.03em;
}

.topbar {
  display: block;
  margin-bottom: 14px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 8px;
}

.user-initials-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.logout-icon-btn {
  min-width: 42px;
  padding: 11px 10px;
  font-size: 18px;
  line-height: 1;
}

.nav-icon-btn {
  min-width: 42px;
  padding: 11px 10px;
  font-size: 18px;
  line-height: 1;
}

.home-icon-btn {
  font-size: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.nav-icon-btn-active {
  background: #0c4a6e !important;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.05;
}

h2,
h3 {
  margin: 0 0 10px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  padding: 14px;
  margin-bottom: 12px;
  animation: rise 220ms ease;
}

.narrow-card {
  width: min(420px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.admin-lock-btn {
  background: #7c3aed !important;
}

.admin-lock-btn:hover,
.admin-lock-btn:focus-visible {
  background: #6d28d9 !important;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.narrow-card label {
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.compact {
  margin-top: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.prefixed-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
}

.input-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: #ecfeff;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
}

.prefixed-input input {
  border-radius: 0 10px 10px 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 16px;
}

.initials-input {
  display: block;
  width: 120px !important;
  max-width: 120px !important;
  margin: 0 auto;
  justify-self: center;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 22px;
}

.otp-input {
  display: block;
  width: 152px !important;
  max-width: 152px !important;
  margin: 0 auto;
  justify-self: center;
  text-align: center;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 24px;
}

button,
.link-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 12px;
  background-color: var(--brand) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  padding: 11px 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  opacity: 1 !important;
}

.scan-trigger {
  margin-top: 8px;
  width: 100%;
  background: #0c4a6e;
}

.scan-trigger:hover {
  background: #0a3f5d;
}

button:disabled {
  opacity: 0.7 !important;
  background-color: #64748b !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  cursor: not-allowed;
}

button:hover,
.link-btn:hover {
  background-color: var(--brand-strong) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

button:focus-visible,
.link-btn:focus-visible {
  background-color: var(--brand-strong) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.primary-submit {
  background: #0f766e !important;
  color: #ffffff !important;
  opacity: 1 !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.primary-submit:hover,
.primary-submit:focus-visible {
  background: #115e59 !important;
  color: #ffffff !important;
}

.primary-submit:disabled {
  background: #64748b !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

.flash {
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-weight: 600;
}

.flash.success {
  background: #dcfce7;
  color: var(--ok);
}

.flash.error {
  background: #fee2e2;
  color: var(--error);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.note {
  padding: 10px;
  background: #fff7ed;
  border-radius: 10px;
  border: 1px solid #fed7aa;
}

.debug {
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #dbeafe;
  background: #f0f9ff;
}

.chip.actual {
  border-color: #99f6e4;
  background: #ecfeff;
}

.pack-radio-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.pack-radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.pack-radio-item input {
  width: auto;
  margin: 0;
}

.pack-radio-item.is-checked {
  background: #e5e7eb;
  color: #6b7280;
  border-color: #d1d5db;
}

.pack-radio-item.is-checked span {
  text-decoration: line-through;
}

.pack-radio-item.is-checked input {
  accent-color: #9ca3af;
}

.pack-accessory-row {
  display: grid;
  grid-template-columns: auto 1fr 110px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.pack-accessory-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfeff;
  border: 1px solid #b8e4f4;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.pack-accessory-count:hover,
.pack-accessory-count:focus-visible {
  background: #dff4fb;
  border-color: #7cc3db;
}

.pack-accessory-row input {
  width: 100%;
}

.delta-list {
  margin: 8px 0 12px;
  padding-left: 18px;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.list-item:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(240, 253, 250, 0.98);
}

.idea-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.idea-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.idea-title {
  font-weight: 700;
}

.idea-note {
  margin-top: 6px;
  white-space: pre-wrap;
}

.idea-note-empty {
  color: var(--muted);
  font-style: italic;
}

.idea-image {
  width: 100%;
  max-width: 320px;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.mini-icon-btn {
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.mini-icon-btn-danger {
  background: #b42318 !important;
}

.mini-icon-btn-danger:hover,
.mini-icon-btn-danger:focus-visible {
  background: #991b1b !important;
}

.idea-complete-toggle {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid #94a3b8;
  background: #ffffff !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 16px;
  font-weight: 800;
}

.idea-complete-toggle:hover,
.idea-complete-toggle:focus-visible {
  background: #f8fafc !important;
  border-color: #64748b;
}

.idea-complete-toggle-on {
  background: #16a34a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #15803d;
}

.idea-complete-toggle-on:hover,
.idea-complete-toggle-on:focus-visible {
  background: #15803d !important;
}

.idea-completed {
  background: #ecfdf3;
  border-color: #86efac;
}

.idea-completed .idea-title {
  text-decoration: line-through;
  color: #4b5563;
}

.status {
  align-self: center;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  min-width: 84px;
  text-align: center;
}

.status.draft {
  background: #fef3c7;
  color: var(--warn);
}

.status.completed_match {
  background: #d1fae5;
  color: var(--ok);
}

.status.completed_with_deviation {
  background: #fee2e2;
  color: #991b1b;
}

select option.closed-suitcase-option {
  color: #9ca3af;
}

@media (max-width: 640px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

  .prefixed-input {
    grid-template-columns: auto 1fr;
  }

  .link-btn {
    padding: 10px 12px;
  }

  .topbar .topbar-actions {
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .topbar .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar .topbar-actions .link-btn {
    padding: 8px 10px;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .topbar .topbar-actions .logout-icon-btn {
    min-width: 36px;
    height: 36px;
    padding: 8px 8px;
    font-size: 16px;
  }

  .topbar .topbar-actions .nav-icon-btn {
    min-width: 36px;
    height: 36px;
    padding: 8px 8px;
    font-size: 16px;
  }

  .topbar .topbar-actions .home-icon-btn {
    font-size: 24px;
    font-weight: 700;
  }

  .topbar .topbar-actions .user-initials-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    font-size: 16px;
  }

  .topbar .topbar-actions .festival-current-btn {
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
  }
}

.scanner-sheet {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  display: grid;
  place-items: end center;
  z-index: 999;
}

.scanner-sheet.hidden {
  display: none;
}

.scanner-card {
  width: min(760px, 100%);
  background: #0b1f2a;
  color: #f8fafc;
  border-radius: 16px 16px 0 0;
  padding: 12px;
}

.scanner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#scannerVideo {
  width: 100%;
  min-height: 220px;
  max-height: 46vh;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.95);
}

th, td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

th {
  background: rgba(15, 118, 110, 0.05);
  font-weight: 600;
  color: var(--brand-strong);
  font-size: 13px;
}

tr:last-child td {
  border-bottom: none;
}

.table-wrapper .link-btn {
  display: inline-block;
  padding: 3px 6px;
  font-size: 13px;
  white-space: nowrap;
}

.loan-new-form label {
  font-size: 16px;
}

.loan-radio-search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.loan-name-suggest-wrap {
  position: relative;
}

.loan-name-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 120;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.loan-name-option {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.loan-name-option-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.loan-name-option-meta {
  font-size: 13px;
  color: #475569;
}

.loan-name-option + .loan-name-option {
  border-top: 1px solid #e5e7eb;
}

.loan-name-option:hover,
.loan-name-option:focus-visible {
  background: #f0fdfa;
  outline: none;
}

.loan-name-empty {
  padding: 10px 12px;
  color: #6b7280;
  font-size: 15px;
}

.channel-entry-list {
  display: grid;
  gap: 10px;
}

.channel-entry-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.weather-strip {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.weather-day {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
  display: grid;
  gap: 4px;
  text-align: center;
}

.weather-day-date {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.weather-day-icon {
  font-size: 30px;
  line-height: 1;
}

.weather-day-temps {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.weather-day-rain {
  font-size: 13px;
  color: #475569;
}

.weather-day-wind {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.channel-entry-summary {
  display: grid;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 8px;
}

.channel-edit-toggle {
  width: fit-content;
}

.channel-edit-icon-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.channel-edit-panel {
  margin-top: 8px;
}

.channel-search-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1fr;
}

.channel-search-suggest-wrap {
  position: relative;
}

.channel-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 120;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.channel-search-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  cursor: pointer;
}

.channel-search-option + .channel-search-option {
  border-top: 1px solid #e5e7eb;
}

.channel-search-option:hover,
.channel-search-option:focus-visible {
  background: #f0fdfa;
  outline: none;
}

.channel-search-option-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.channel-search-option-meta {
  font-size: 13px;
  color: #475569;
}

.channel-search-empty {
  padding: 10px 12px;
  color: #6b7280;
  font-size: 14px;
}

.responsible-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.responsible-admin-grid input {
  min-width: 0;
}

.dashboard-quick-actions-card {
  padding: 10px;
}

.dashboard-quick-actions {
  margin-top: 0;
  justify-content: flex-start;
  gap: 8px;
}

.festival-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.festival-year-btn {
  display: grid;
  align-items: end;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.festival-year-btn:not(.festival-year-btn-has-image):hover,
.festival-year-btn:not(.festival-year-btn-has-image):focus-visible {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(240, 253, 250, 0.98);
  outline: none;
}

.festival-year-btn-active:not(.festival-year-btn-has-image) {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.24);
  background: rgba(240, 253, 250, 0.98);
}

.festival-year-btn-year {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 800;
  color: #0f172a;
}

.festival-year-btn-has-image {
  background-size: cover;
  background-position: center;
  border-color: rgba(15, 23, 42, 0.14);
  transition: none;
  transform: none;
  filter: none;
  -webkit-tap-highlight-color: transparent;
}

.festival-year-btn-has-image::before {
  content: none;
}

.festival-year-btn-has-image .festival-year-btn-year {
  position: relative;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(2, 6, 23, 0.7);
}

.festival-year-btn-has-image:hover,
.festival-year-btn-has-image:focus-visible,
.festival-year-btn-has-image:active {
  background-color: transparent;
  border-color: rgba(15, 23, 42, 0.14);
  transform: none;
  filter: none;
  box-shadow: none;
}

.festival-year-btn-has-image:hover::before,
.festival-year-btn-has-image:focus-visible::before,
.festival-year-btn-has-image:active::before {
  content: none;
}

.festival-year-btn-active.festival-year-btn-has-image {
  background-color: transparent;
}

.festival-year-admin-image {
  width: 100%;
  max-width: 320px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.festival-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.festival-gallery-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.card#gallery {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.gallery-delete-icon-btn {
  background: transparent !important;
  color: #b42318 !important;
  -webkit-text-fill-color: #b42318 !important;
  padding: 4px 6px;
  min-width: 32px;
  border-radius: 8px;
}

.gallery-delete-icon-btn:hover,
.gallery-delete-icon-btn:focus-visible {
  background: transparent !important;
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  z-index: 1200;
}

.gallery-lightbox.is-open {
  display: flex;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox-figure {
  margin: 0;
  width: min(100%, 980px);
  max-width: calc(100vw - 84px);
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.gallery-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.gallery-lightbox-caption {
  color: #e2e8f0;
  font-size: 14px;
  text-align: center;
}

.gallery-lightbox-nav,
.gallery-lightbox-close {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.72) !important;
  color: #f8fafc !important;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}

.gallery-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1203;
}

.gallery-lightbox-prev {
  left: 12px;
}

.gallery-lightbox-next {
  right: 12px;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible,
.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible {
  background: rgba(15, 23, 42, 0.92) !important;
}

.gallery-lightbox-close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: 12px;
  font-size: 30px;
  z-index: 1203;
}

.loan-radio-search-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 18px;
}

.loan-radio-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
}

.loan-radio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.loan-accessory-list {
  display: grid;
  gap: 10px;
}

.loan-accessory-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.loan-accessory-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loan-qty-control {
  display: inline-grid;
  grid-template-columns: 44px 74px 44px;
  gap: 8px;
  align-items: center;
}

.loan-qty-btn {
  min-height: 44px;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.loan-qty-input {
  width: 74px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  padding: 8px 6px;
}

@media (max-width: 640px) {
  .app-shell {
    padding: 10px 10px 20px;
  }

  .app-version {
    font-size: 11px;
    margin-top: 2px;
  }

  .card {
    padding: 10px;
    margin-bottom: 10px;
  }

  .loan-new-form h3 {
    font-size: 22px;
  }

  .loan-accessory-label {
    font-size: 20px;
  }

  .channel-search-grid {
    grid-template-columns: 1fr;
  }

  .channel-entry-summary {
    font-size: 15px;
  }

  .responsible-admin-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  .dashboard-quick-actions {
    gap: 6px;
  }

  .dashboard-quick-actions .link-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .festival-year-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .festival-year-btn {
    padding: 10px;
    min-height: 100px;
  }

  .festival-year-btn-year {
    font-size: 28px;
  }

  .festival-gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox {
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 8px 14px;
  }

  .gallery-lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

  .gallery-lightbox-prev {
    left: 8px;
  }

  .gallery-lightbox-next {
    right: 8px;
  }

  .gallery-lightbox-image {
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
  }

  .weather-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  .weather-day {
    min-width: 0;
    padding: 5px 4px;
    border-radius: 9px;
    gap: 2px;
  }

  .weather-day-date {
    font-size: 11px;
  }

  .weather-day-icon {
    font-size: 20px;
  }

  .weather-day-temps {
    font-size: 12px;
  }

  .weather-day-rain {
    font-size: 11px;
  }

  .weather-day-wind {
    font-size: 11px;
  }
}
