﻿:root {
  --bg: #f4f5f7; --panel: #fff; --line: #d8dbe0; --text: #1f2933; --muted: #6b7280;
  --primary: #1a6fb0; --primary-text: #fff; --warn: #fff3bf; --accent: #e8f1fa;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Segoe UI", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
h1 { font-size: 16px; margin: 0; }
h3 { font-size: 13px; margin: 12px 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.ver { font-weight: normal; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-right { display: flex; gap: 6px; align-items: center; }
.layout { display: grid; grid-template-columns: 340px 1fr 380px;
}
.layout.hide-right { grid-template-columns: 340px 1fr; }
.layout.hide-right .panel.right { display: none; }
.layout { gap: 8px; padding: 8px; height: calc(100vh - 82px); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px; overflow: auto; min-height: 0; }
.panel.map { padding: 0; display: flex; flex-direction: column; }
#map { flex: 1; min-height: 300px; }
.map-hint { padding: 4px 8px; font-size: 12px; }
.row { display: flex; align-items: center; gap: 6px; margin: 5px 0; flex-wrap: wrap; }
.row > label { width: 64px; flex: none; font-size: 12px; color: var(--muted); }
.row > label.clickable { cursor: pointer; text-decoration: underline dotted; }
.row > label.clickable.dms { color: #c0392b; font-weight: bold; }
.row > input, .row > select { flex: 1; min-width: 80px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
.row > input.dirty { background: var(--warn); }
.row.btns { gap: 6px; }
.row.modes .btn { min-width: 32px; }
.btn { padding: 5px 10px; border: 1px solid var(--line); background: #fafafa; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn:hover { background: var(--accent); }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn.primary:hover { background: #155a90; }
.btn.small { padding: 3px 7px; font-size: 12px; }
.btn.toggle { font-weight: bold; }
.btn.toggle.red { background: #e74c3c; color: #fff; border-color: #c0392b; }
.btn.toggle.cyan { background: #d4f1f9; }
.btn.dirty { background: var(--warn); color: var(--text); border-color: #e0c65a; }
.btn.primary.dirty { background: #f4b400; color: #1f2933; border-color: #d99e00; }
.btn.primary.dirty:hover { background: #e0a600; }
.btn.link { text-align: left; white-space: normal; }
.btn.hasurl { background: #fff8d6; }
.btn:disabled { opacity: .45; cursor: default; }
.furigana { font-size: 12px; color: #444; }
.info { margin-top: 8px; font-size: 12px; white-space: pre-wrap; background: #f8f9fb; border: 1px solid var(--line); border-radius: 4px; padding: 6px; min-height: 40px; max-height: 240px; overflow: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tab { padding: 5px 8px; border: 1px solid transparent; border-bottom: none; background: none; cursor: pointer; font-size: 12px; border-radius: 4px 4px 0 0; }
.tab.active { background: var(--accent); border-color: var(--line); font-weight: bold; }
.tabpane { display: none; }
#tab-themes > .row { margin: 0 0 2px; }
#tab-themes .mapgroup:first-child { margin-top: 0; }
#tab-themes .mapitem { margin-bottom: 2px; }
.tabpane.active { display: block; }
.mapgroup { margin: 8px 0; }
.mapgroup.city { border-top: 3px solid #333; padding-top: 6px; margin-top: 12px; }
.leftmaps { margin-top: 10px; }
.leftmaps .mapgroup { border-top: 3px solid #333; padding-top: 6px; margin: 10px 0 0; }
.leftmaps .mapgroup:last-child { border-bottom: 3px solid #333; padding-bottom: 8px; }
.leftmaps .mapgroup h4 { font-size: 14px; }
.manualrow { margin-top: 8px; }
a.btn { text-decoration: none; color: var(--text); display: inline-block; }
.themebtns .inline-note { font-size: 11px; color: #8a6d3b; align-self: center; }
.mapgroup h4 { margin: 4px 0; font-size: 13px; }
.mapgroup h4 .muted { font-weight: normal; }
.themebtns { display: flex; flex-wrap: wrap; gap: 4px; }
.themebtns .btn { font-size: 12px; }
.themebtns .btn.off { opacity: .55; }
.note { font-size: 11px; color: #8a6d3b; margin: 2px 0 0; }
.linkgrid { display: flex; flex-wrap: wrap; gap: 4px; }
.linkgrid .btn { font-size: 12px; max-width: 100%; }
.cpmgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0; }
.cpmgrid .btn { min-height: 34px; }
.cpmgrid .btn.center { background: var(--accent); font-weight: bold; }
.linklist a { display: block; font-size: 12px; margin: 2px 0; word-break: break-all; }
.foot { padding: 4px 12px; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; height: auto; }
  #map { height: 50vh; }
}

.pad20 { padding: 20px; }
.allrow { margin: 3px 0; }
.allname { min-width: 150px; }
.nocursor { cursor: default; }
.coordhelp { margin: 3px 0; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.coordhelp .btn { font-family: Consolas, monospace; min-width: 34px; }
.coordhelp .btn.copied { background: #d4f1f9; border-color: #7cc4d8; }
details.coordhelp { display: block; } details.coordhelp summary { cursor: pointer; font-size: 11px; }
.lslist { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.lsitem { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: #fbfbfc; }
.lsitem .lsnum { font-family: Consolas, monospace; font-weight: bold; }
.lsitem .lsname { font-weight: bold; }
.lsitem.inherited { border-left: 3px solid #b8c4d6; }
