body { font-family: "Helvetica Neue", Arial, sans-serif; background: #f4f4f4; padding: 20px; color: #333; margin: 0; }
h1 { text-align: center; margin-bottom: 20px; font-weight: bold; color: #444; font-size: 24px; }

.nav-bar { max-width: 1200px; margin: 0 auto 15px auto; display: flex; align-items: center; justify-content: space-between; }
.nav-link { color: #007bff; text-decoration: none; font-weight: bold; font-size: 14px; background: #fff; padding: 6px 12px; border-radius: 4px; border: 1px solid #ddd; transition: 0.2s; }
.nav-link:hover { background: #eef5ff; }
.nav-current { font-size: 14px; color: #666; font-weight: bold; }

.container { display: flex; flex-wrap: wrap; gap: 20px; max-width: 1200px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); align-items: flex-start; }
.controls { flex: 1; min-width: 340px; border-right: 1px solid #ddd; padding-right: 20px; box-sizing: border-box; }
.action-area { background: #eee; padding: 15px; border-radius: 8px; margin-bottom: 15px; }

.selector-actions { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.btn-sub { font-size: 11px; padding: 3px 6px; border: 1px solid #bbb; background: #fff; border-radius: 3px; cursor: pointer; }
.btn-sub:hover { background: #e9e9e9; }

.city-checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #fff; padding: 8px; border-radius: 4px; border: 1px solid #ccc; max-height: 140px; overflow-y: auto; font-size: 12px; }
.city-group-label { grid-column: 1 / -1; font-weight: bold; color: #555; background: #f0f0f0; padding: 2px 6px; border-radius: 2px; font-size: 11px; margin-top: 4px; }
.city-check-item, .ward-check-item { display: flex; align-items: center; cursor: pointer; }
.city-check-item input, .ward-check-item input { margin-right: 4px; cursor: pointer; }
.ward-checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 100px; overflow-y: auto; font-size: 11px; margin-top: 4px; }

.btn { width: 100%; padding: 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold; margin-top: 10px; transition: 0.2s; }
.btn-reflect { background: #007bff; color: #fff; }
.btn-image { background: #17a2b8; color: #fff; margin-top: 10px; }
.btn-pdf { background: #28a745; color: #fff; margin-top: 10px; }
.btn-toggle { background: #6c757d; color: #fff; font-size: 12px; padding: 5px; cursor: pointer; border: none; border-radius: 4px; }

select { width: 100%; padding: 8px; margin-bottom: 10px; border-radius: 4px; border: 1px solid #ccc; box-sizing: border-box; }
.title-input { width: 100%; padding: 8px; margin-bottom: 10px; border-radius: 4px; border: 1px solid #ccc; font-size: 16px; box-sizing: border-box; }

.toggle-label { display: flex; align-items: center; margin-bottom: 10px; font-weight: bold; cursor: pointer; font-size: 14px; }
.toggle-label input { margin-right: 8px; transform: scale(1.2); }

.inputs-header { display: flex; justify-content: space-between; align-items: center; margin: 15px 0 8px 0; padding-bottom: 4px; border-bottom: 2px solid #007bff; }
#inputs-container { max-height: 600px; overflow-y: auto; padding-right: 5px; margin-bottom: 20px; }
.city-group-title { font-size: 14px; font-weight: bold; color: #fff; background: #007bff; padding: 4px 8px; border-radius: 4px; margin: 14px 0 6px 0; }
.ward-group-title { font-size: 12px; font-weight: bold; color: #007bff; background: #eef5ff; padding: 3px 6px; border-radius: 3px; margin: 8px 0 4px 0; }
.input-group { display: flex; align-items: center; margin-bottom: 4px; padding: 3px 4px; border-radius: 4px; transition: background 0.2s; }
.input-group:hover { background: #f9f9f9; }
.checkbox-wrapper { display: flex; align-items: center; width: 26px; }
.label-wrapper { flex: 1; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input-wrapper input { width: 85px; padding: 3px 5px; text-align: right; border: 1px solid #ccc; border-radius: 4px; font-size: 12px; }

.map-area-wrapper { flex: 2; min-width: 300px; display: flex; flex-direction: column; align-items: center; position: sticky; top: 20px; }
#map-export-target { position: relative; background: #fff; padding: 20px; text-align: center; width: 100%; box-sizing: border-box; }
#map-title { margin-top: 0; margin-bottom: 15px; font-size: 22px; color: #333; }

#yokohama-map { width: 100%; height: auto; background: #f9f9fc; border: 1px solid #ccc; }
path.town-path { fill: #fff; stroke: #999; stroke-width: 0.5px; transition: fill 0.2s, stroke 0.2s; cursor: pointer; vector-effect: non-scaling-stroke; }
path.town-path:hover { stroke: #000; stroke-width: 2px; opacity: 0.9; }

/* ズームコントローラー */
.map-zoom-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
}
.zoom-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: 0.15s;
}
.zoom-btn:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}
.zoom-slider {
    width: 70px;
    transform: rotate(-90deg);
    margin: 25px 0;
    cursor: pointer;
}

/* ラベル：小さくシャープにして縁取りで視認性向上 */
.ward-label {
    font-size: 7px;
    fill: #111;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
    letter-spacing: -0.5px;
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.2s;
}

.footer-credit { margin-top: 20px; text-align: right; font-size: 10px; color: #666; line-height: 1.4; border-top: 1px solid #eee; padding-top: 10px; }
.footer-credit a { color: #666; text-decoration: none; }
.footer-credit .brand { font-weight: bold; font-size: 12px; color: #333; margin-top: 4px; }

.watermark-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 90px; font-weight: bold; color: rgba(200, 200, 200, 0.4); pointer-events: none; z-index: 100; white-space: nowrap; user-select: none; }
.watermark-controls { margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc; }
