[hidden] { display: none !important; }
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1d2125;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #2e7d32;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }

header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }
.lists { display: flex; gap: 8px; align-items: center; }
.lists select { min-width: 200px; }

select, input[type=search], input:not([type]), input[type=text], input[type=date], input[type=password] {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff;
}
button, .btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 14px;
  cursor: pointer; color: var(--text); text-decoration: none; font-size: 14px; display: inline-block;
}
button:hover, .btn:hover { background: #f0f2f5; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover { background: #256a29; }
.ghost { background: transparent; }
.muted { color: var(--muted); font-size: 14px; }

main {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px;
  padding: 20px; max-width: 1500px; margin: 0 auto;
}
@media (max-width: 900px) { main { grid-template-columns: 1fr; } }

.map-pane, .list-pane {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.title-input { flex: 1; min-width: 180px; font-size: 18px; font-weight: 600; border-color: transparent !important; }
.title-input:hover, .title-input:focus { border-color: var(--line) !important; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 7px 14px; }
.seg button[aria-checked=true] { background: var(--text); color: #fff; }
.color-pick input { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.color-pick.disabled { opacity: .35; pointer-events: none; }
.toolbar.look { gap: 18px; font-size: 14px; color: var(--muted); margin-top: -4px; }
.labeled-pick { display: inline-flex; align-items: center; gap: 6px; }
.labeled-pick input { width: 32px; height: 28px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.map { width: 100%; min-height: 200px; }
.map svg { width: 100%; height: auto; display: block; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
.small { font-size: 13px; }
.error { color: #b42318; font-size: 14px; margin: 8px 0 0; }
code { background: #f0f2f5; border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }

.user { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
header { position: relative; }
header .lists { margin-left: auto; }

.share { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.share h3 { font-size: 14px; margin: 0 0 8px; }
.url-row { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fafbfc; }
.url-prefix { padding: 7px 0 7px 10px; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; align-self: center; }
.url-row input { border: 0 !important; border-radius: 0; padding-left: 0; flex: 1; min-width: 80px; font-weight: 600; background: #fff; }
.url-row select { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.url-options { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.small-btn { padding: 4px 10px; font-size: 13px; }
.transfer { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.transfer h3 { font-size: 14px; margin: 0 0 8px; }
.transfer p { margin: 0; }
#import-status { margin-top: 10px; }
#import-status.error { color: #b42318; }
#import-warnings { margin: 6px 0 0; padding-left: 20px; }
.url-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

.auth { display: grid; place-items: center; padding: 60px 16px; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; width: min(420px, 100%); }
.auth-card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; }
.auth-card label { display: block; margin: 12px 0; font-size: 14px; }
.auth-card label input { display: block; width: 100%; margin-top: 4px; }
.tabs { display: flex; gap: 4px; margin: 18px 0 4px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 12px; }
.tabs button[aria-selected=true] { border-bottom-color: var(--accent); font-weight: 600; }
.wide { width: 100%; margin-top: 8px; padding: 9px; }

.progress .count { font-size: 15px; margin-bottom: 6px; }
.progress .count strong { font-size: 28px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
#bar-fill { height: 100%; background: var(--accent); width: 0; transition: width .25s; }
.filters { display: flex; gap: 8px; margin: 14px 0 8px; }
.filters input { flex: 1; min-width: 0; }

.regions { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow-y: auto; }
.regions li { border-bottom: 1px solid var(--line); padding: 6px 2px; }
.regions li:last-child { border-bottom: 0; }
.regions .row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.regions .row input { width: 17px; height: 17px; accent-color: var(--accent); }
.regions .flag { width: 27px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.regions .flag.none { background: var(--line); }
.regions .name { flex: 1; }
.regions .extra { color: var(--muted); font-size: 12px; }
.regions .details { display: flex; gap: 6px; margin: 6px 0 2px 27px; }
.regions .details input { font-size: 13px; padding: 4px 8px; min-width: 0; }
.regions .details input[type=date] { flex: 0 0 140px; }
.regions .details input[type=text] { flex: 1; }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); }

dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: min(440px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.3); }
dialog h2 { margin: 0 0 16px; }
dialog label { display: block; margin: 6px 0; }
dialog > form > label input { width: 100%; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.account-section { border-top: 1px solid var(--line); padding: 12px 0; }
#password-form { border-top: 0; padding-top: 0; }
.account-section h3 { font-size: 15px; margin: 0 0 6px; }
.account-section label { font-size: 14px; }
.account-section label input { display: block; width: 100%; margin-top: 4px; }
.account-section p { margin: 6px 0; }
.danger { background: #b42318; color: #fff; border-color: #b42318; }
.danger:hover { background: #912018; }
.share.private .url-row, .share.private #copy-link, .share.private #open-link, .share.private #share-fb { opacity: .4; pointer-events: none; }
