@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400-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: Poppins;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500-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: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600-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: Poppins;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700-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;
}

:root {
  color-scheme: light;
  --page: #f9fafb;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --tint: #eff6ff;
  --shadow: 0 8px 34px rgba(20, 35, 70, 0.05);
  --ok: #166534;
  --err: #b91c1c;
  --warn-bg: #fff8e8;
  --warn-ink: #896b22;
  --warn-line: #fae8b9;
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101525;
  --surface: #171e30;
  --ink: #f5f7ff;
  --muted: #c5d0e6;
  --line: #2c3650;
  --accent: #93c5fd;
  --tint: #263450;
  --shadow: 0 8px 34px rgba(0, 0, 0, 0.28);
  --ok: #86efac;
  --err: #fca5a5;
  --warn-bg: #3a3018;
  --warn-ink: #f6e7b2;
  --warn-line: #6b5420;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 50;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 16px;
}

.site-header { position: relative; z-index: 30; flex: none; }
.bar {
  position: relative;
  display: flex;
  min-height: 76px;
  width: min(1840px, calc(100% - 32px));
  max-width: 1840px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
}
.brand-mark { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.brand-mark img { display: block; height: 40px; width: auto; }
.brand-mark-compact img { height: 32px; }
.brand-mark img:last-child { display: none; }
:root[data-theme="dark"] .brand-mark img:first-child { display: none; }
:root[data-theme="dark"] .brand-mark img:last-child { display: block; }
.site-nav {
  display: none;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }
.icon-btn svg[hidden] { display: none !important; }
.bar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.icon-btn {
  display: inline-flex;
  height: 38px;
  width: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
}
.btn-primary {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(120deg, #1d4ed8, #6d28d9);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover { filter: brightness(1.06); }
.menu-btn { display: inline-flex; }
.site-nav.is-open {
  display: flex;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 70px;
  z-index: 40;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}
.site-nav.is-open a { border-radius: 8px; padding: 8px 12px; }

.main { width: min(1840px, calc(100% - 32px)); max-width: 1840px; margin: 28px auto 0; padding: 0; flex: 1 0 auto; }
h1 { font-size: clamp(29px, 4vw, 42px); margin: 0 0 8px; letter-spacing: -0.035em; font-weight: 700; }
p.intro { color: var(--muted); margin: 0 0 24px; line-height: 1.65; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
h2 { font-size: 17px; margin: 0 0 16px; }
label { font-size: 13px; font-weight: 600; display: block; margin: 15px 0 8px; }
input:not([type="file"]), select, textarea {
  font: inherit;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 12px;
  color: var(--ink);
  min-height: 44px;
}
input[type="file"] {
  width: 100%;
  background: var(--tint);
  color: var(--ink);
  padding: 23px;
  border: 2px dashed #b7c7e8;
  border-radius: 12px;
  cursor: pointer;
}
:root[data-theme="dark"] input[type="file"] { border-color: #3d4d73; }
input[type="checkbox"] { accent-color: #1d4ed8; }
.hint { font-size: 12px; color: var(--muted); margin: 9px 0; line-height: 1.55; }
.action, .secondary, .danger {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
}
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #1d4ed8, #6d28d9);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.action:hover { filter: brightness(1.06); }
.action:disabled { opacity: 0.55; cursor: wait; }
.secondary { background: var(--tint); color: var(--accent); }
.danger { background: #fff0f0; color: #b13939; }
:root[data-theme="dark"] .danger { background: #3f2428; color: #fecaca; }
.status { min-height: 23px; color: var(--muted); font-size: 13px; margin-top: 12px; white-space: pre-wrap; }
.status.err { color: var(--err); }
.status.ok { color: var(--ok); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
.items { display: grid; gap: 9px; margin: 18px 0; }
.item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--page);
  padding: 10px;
  border-radius: 10px;
}
.item b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.item .meta { font-size: 12px; color: var(--muted); margin-left: auto; }
.item button, .page .mini button {
  flex: 0 0 auto;
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.item button svg, .page .mini button svg {
  display: block;
  width: 16px;
  height: 16px;
}
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 12px; }
.page {
  border: 2px solid var(--line);
  background: var(--page);
  border-radius: 12px;
  padding: 9px;
  text-align: center;
  user-select: none;
}
.page.selected { border-color: #1d4ed8; background: var(--tint); }
.page img { height: 132px; width: 100%; object-fit: contain; background: #fff; border-radius: 5px; }
.page .title { font-size: 12px; font-weight: 700; margin-top: 8px; }
.page .mini { display: flex; justify-content: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.site-footer {
  width: min(1840px, calc(100% - 32px));
  max-width: 1840px;
  margin: auto auto 0;
  border-top: 1px solid var(--line);
  padding: 24px 20px 28px;
  color: var(--muted);
  font-size: 12px;
  flex: none;
}
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot-note { margin: 16px 0 0; font-size: 11px; line-height: 1.55; }
.warn {
  padding: 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .bar, .main, .site-footer { width: min(1840px, calc(100% - 48px)); }
  .bar { padding: 0 32px; }
  .site-nav, .site-nav.is-open {
    display: flex;
    position: absolute;
    left: 50%;
    top: 50%;
    right: auto;
    z-index: 20;
    width: max-content;
    transform: translate(-50%, -50%);
    flex-direction: row;
    align-items: center;
    gap: 40px;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }
  .site-nav.is-open a { padding: 8px 0; }
  .bar-actions { position: relative; z-index: 30; }
  .menu-btn { display: none; }
  .btn-primary { display: inline-flex; }
  .site-footer { padding: 24px 32px 28px; }
  .foot-links { margin-left: auto; }
}
.lz-guide { max-width: 760px; margin: 28px auto 8px; padding: 8px 0 12px; color: var(--ink); font-size: 14px; line-height: 1.65; }
.lz-guide h2 { font-size: 1.25rem; margin: 1.6rem 0 0.45rem; letter-spacing: -0.02em; color: var(--ink); }
.lz-guide p, .lz-guide li { color: var(--muted); }
.lz-guide a { color: var(--accent); }
.lz-guide ol, .lz-guide ul { margin: 0.4rem 0 0; padding-left: 1.25rem; }
.lz-guide li + li { margin-top: 0.35rem; }
.lz-guide details { border-top: 1px solid var(--line); }
.lz-guide details:last-child { border-bottom: 1px solid var(--line); }
.lz-guide summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 44px; display: flex; align-items: center; }
.lz-guide details p { margin: 0 0 12px; }
@media (max-width: 550px) {
  .panel { padding: 17px; }
  .main { margin-top: 20px; }
  .item { flex-wrap: wrap; }
  .item .meta { margin-left: 0; }
}
