.hk-grid{display:grid;gap:20px;color:#294f65}.pane{border:1px solid #cadce4;border-radius:24px;padding:24px;min-width:0;box-shadow:0 8px 22px #294f6506;background:#fff}.pane h2{margin:0;font-size:23px}.pane small{font-size:11px;letter-spacing:1px;color:#648798}.panel-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.pill{font-size:11px;background:#ffffffbb;padding:8px 12px;border-radius:25px;white-space:nowrap}.hk-map{background:#e7f2f8;display:flex;flex-direction:column}.map-canvas{flex:1;min-height:0;display:flex;justify-content:center;align-items:center;background-image:radial-gradient(#8aaabb38 .8px,transparent .8px);background-size:18px 18px;margin:10px 0;border-radius:16px}.map-canvas svg{width:100%;height:100%;max-height:470px}.district{stroke:white;stroke-width:1.1;cursor:pointer}.district:hover,.district.selected{stroke:#245c75;stroke-width:2.2;filter:brightness(1.05)}.labels{font-size:16px;font-weight:700;fill:#385b71;pointer-events:none}.legend{display:flex;gap:20px;justify-content:center;font-size:12px}.hk-controls{background:#d6e6d4;border-color:#c0d5bd;display:flex;flex-direction:column;justify-content:center}.hk-controls h2{font-size:25px;margin:7px 0 15px}.tabs{display:flex;gap:8px;margin-bottom:12px}.tabs button{border:1px solid #aec6a9;border-radius:10px;padding:8px 16px;background:#ffffff85;color:#456449}.tabs .on{background:#fff;border-color:#648f69}.hk-controls label{font-size:12px;margin-bottom:7px}.hk-controls select{background:#fff;border:1px solid #a9c2a7;border-radius:10px;padding:12px;width:100%;font-size:14px;color:#345a43}.generate{margin-top:15px;background:#345d4c;color:#fff;border:0;border-radius:13px;padding:15px;font-size:20px;font-weight:bold;display:flex;justify-content:center;align-items:center;gap:10px}.status{font-size:11px;color:#5f7d65;margin:10px 0}.postal-note{border-top:1px solid #b9ceba;padding-top:12px;margin-top:5px;font-size:12px;color:#47654f}.postal-note p{margin:6px 0 0;line-height:1.65}.hk-address{background:#e4f1fb;border-color:#bbd7ea}.pane dl{margin:18px 0 0;display:grid;gap:10px}.field{background:#ffffffc4;border-radius:12px;display:grid;grid-template-columns:75px 1fr;align-items:center;padding:12px 14px;min-width:0}.field dt{font-size:12px;color:#6c8799}.field dd{margin:0;display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0}.field dd>span{font-size:22px;font-weight:650;overflow-wrap:anywhere}.copy{background:#fff;border:1px solid #c5d9e4;border-radius:8px;color:#41657c;padding:7px 9px;font-size:11px;display:inline-flex;gap:4px;align-items:center;white-space:nowrap}.copy .icon{width:14px;height:14px}.foot{font-size:11px;color:#6b879a;margin-bottom:0}.hk-name{background:#fffdf6;border-color:#e4dfcb}.hk-name .field{background:#f5f2e8;padding:8px 12px}.hk-name .field dd>span{font-size:16px}.name-tip{font-size:12px;line-height:1.7;background:#f3eaca;padding:11px 14px;border-radius:10px;margin-bottom:0}.hk-name .panel-top h2{font-size:22px}.tool-notice{margin:18px 0 35px}.hk-address-page .hk-grid{grid-template-columns:1.12fr 1fr;grid-template-rows:425px 405px}.hk-address-page .hk-map{grid-area:1/1}.hk-address-page .hk-controls{grid-area:1/2}.hk-address-page .hk-address{grid-area:2/1}.hk-address-page .hk-name{grid-area:2/2}
@media(max-width:800px){body .hk-grid{display:flex;flex-direction:column;gap:14px}.pane{padding:18px;border-radius:19px}.hk-map{min-height:360px}.map-canvas{height:280px;flex:auto}.pane h2{font-size:20px}.hk-controls h2{font-size:22px}.hk-name{order:4}.hk-address{order:3}.hk-controls{order:2}.hk-map{order:1}.field{grid-template-columns:62px 1fr;padding:10px}.field dd>span{font-size:18px}.legend{gap:9px;font-size:10px}.panel-top .copy{font-size:10px}.tool-heading{display:block}.tool-heading p{margin-top:10px}.hk-map .panel-top{align-items:start}.pill{padding:6px;font-size:10px}}
.hk-name dl{gap:7px}.hk-name .field{padding:6px 12px}.hk-name .name-tip{margin-top:10px;padding:8px 12px;font-size:11px}


.hk-address-page .hk-grid{grid-template-rows:auto auto;align-items:stretch}.hk-map{min-height:455px}.hk-controls{min-height:455px}.hk-address,.hk-name{min-height:420px}.map-canvas{height:320px;flex:1}.map-canvas svg{min-height:300px}.hk-address .field{padding:12px 14px;min-height:60px}.hk-address .field:first-child dd>span{font-size:20px;line-height:1.45}.panel-top h2{display:flex;align-items:center;gap:8px}.hk-name .field{min-height:47px}.hk-address-page .tabs{flex-wrap:wrap}.tabs button[aria-pressed=true]{background:#fff;border-color:#547c5a;box-shadow:inset 0 0 0 1px #547c5a}.district[aria-pressed=true]{stroke:#245c75;stroke-width:2.5;filter:brightness(1.05)}.district:focus-visible{stroke:#182c3a;stroke-width:3;outline:none}.copy:focus-visible,.tabs button:focus-visible,.generate:focus-visible,select:focus-visible{outline:3px solid #287faf;outline-offset:3px}.copy:disabled,.generate:disabled{opacity:.5;cursor:not-allowed}.legend span{display:flex;align-items:center;gap:6px}.legend i{height:10px;width:10px;border-radius:3px;display:inline-block}.legend-island{background:#b6c9ea}.legend-kowloon{background:#efbb92}.legend-nt{background:#b8d3bd}.hk-sources{font-size:12px;color:var(--muted);line-height:1.8;margin:22px 0}.hk-sources a{text-decoration:underline}.hk-controls .postal-note{margin-top:8px}.hk-map .pill{max-width:140px;white-space:normal;text-align:center}.hk-address-page .tool-help{margin-top:28px}.hk-address-page .name-tip a{white-space:normal}.hk-address-page #copyDialog{max-width:calc(100vw - 40px)}
[data-theme=dark] .hk-grid{color:#e5eff5}[data-theme=dark] .pane{background:#243945;border-color:#45606e}[data-theme=dark] .hk-map{background:#233b49}[data-theme=dark] .hk-controls{background:#2e4739}[data-theme=dark] .hk-address{background:#264353}[data-theme=dark] .hk-name{background:#423f34}[data-theme=dark] .field,[data-theme=dark] .hk-name .field{background:#ffffff0d}[data-theme=dark] .field dt,[data-theme=dark] .pane small,[data-theme=dark] .foot{color:#b7cbd5}[data-theme=dark] .labels{fill:#254557}[data-theme=dark] .copy{background:#263d4c;color:#e3eff5;border-color:#526c7b}[data-theme=dark] .name-tip{background:#61542e;color:#f5edcf}[data-theme=dark] .postal-note,[data-theme=dark] .status{color:#d6e6d5}[data-theme=dark] .pill{background:#1b3446;color:#deebf3}[data-theme=dark] .hk-controls label{color:#d7e6d6}
@media(max-width:1100px) and (min-width:801px){.pane{padding:18px}.pane h2{font-size:21px}.hk-controls h2{font-size:22px}.field{grid-template-columns:62px 1fr}.field dd>span{font-size:19px}.hk-address .field:first-child dd>span{font-size:17px}.tabs button{padding:8px 10px}}
@media(max-width:800px){.hk-address-page .hk-grid{display:flex;flex-direction:column}.hk-address-page .hk-map{min-height:360px}.hk-address-page .hk-controls{min-height:0}.hk-address-page .hk-address,.hk-address-page .hk-name{min-height:0}.map-canvas{height:290px;flex:auto}.map-canvas svg{min-height:0}.field{grid-template-columns:56px 1fr}.hk-address .field:first-child dd>span{font-size:16px}.hk-address .field{padding:10px}.hk-name .field{padding:8px 10px}.pane{padding:16px}.pane h2{font-size:20px}.tool-heading p{line-height:1.7}.hk-grid .panel-top>.copy{font-size:10px;padding:7px}.hk-controls select{font-size:16px}.legend{gap:12px}.hk-map .panel-top h2{font-size:18px}}

.hk-address-page .hk-map .map-canvas{height:320px;flex:none}.hk-address-page .hk-map .map-canvas svg{height:320px;min-height:0}.hk-address-page .hk-map .legend{margin-top:auto}.hk-address-page .hk-map{min-height:455px}@media(max-width:800px){.hk-address-page .hk-map .map-canvas,.hk-address-page .hk-map .map-canvas svg{height:285px}.hk-address-page .hk-map{min-height:0}}
