:root {
  --hm-bg: #f6f8f4;
  --hm-surface: #ffffff;
  --hm-surface-strong: #fdfefb;
  --hm-text: #17211a;
  --hm-muted: #59645e;
  --hm-line: rgba(18, 59, 42, 0.16);
  --hm-green: #2e6b47;
  --hm-green-dark: #123b2a;
  --hm-green-soft: #eaf4e4;
  --hm-blue: #2563a8;
  --hm-red: #b33a3a;
  --hm-amber: #a76518;
  --hm-gray-pin: #717b74;
  --hm-marker-blue: #006bff;
  --hm-marker-yellow: #ffd400;
  --hm-marker-red: #f5223d;
  --hm-marker-gray: #414a54;
  --hm-shadow: 0 14px 34px rgba(18, 33, 26, 0.16);
  --hm-panel-width: 388px;
  --hm-topbar-height: 76px;
  --hm-radius: 8px;
  --hm-mobile-breakpoint: 760px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  color: var(--hm-text);
  background: var(--hm-bg);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.material-symbols-outlined {
  display: inline-block;
  font-family: "Material Symbols Outlined";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--hm-green-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(147, 201, 107, 0.86);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr);
  width: 100vw;
  height: 100svh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.has-panel {
  grid-template-columns: var(--hm-panel-width) minmax(0, 1fr);
}

.map-stage {
  position: relative;
  min-width: 0;
  height: 100svh;
  overflow: hidden;
  background: #dfe6dd;
}

.side-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--hm-surface);
  border-right: 1px solid var(--hm-line);
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.app-shell.has-panel .side-panel {
  transform: translateX(0);
}

.panel-bar {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hm-line);
}

.sheet-bar {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hm-line);
  touch-action: none;
}

.panel-bar h2,
.sheet-bar h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0;
  color: var(--hm-green);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.panel-content,
.sheet-content {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
}

.topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(300px, 520px) 44px max-content;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.app-shell.has-panel .topbar {
  grid-template-columns: minmax(280px, 520px) 44px max-content;
}

.app-shell.has-panel .brand-mark {
  display: none;
}

.brand-mark,
.search-form,
.header-icon-action,
.registration-action,
.filter-panel,
.search-results,
.map-fallback {
  box-shadow: var(--hm-shadow);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 10px 13px;
  color: #f7fff9;
  background: rgba(18, 59, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--hm-radius);
}

.brand-mark p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-mark h1 {
  margin: 2px 0 0;
  font-size: 0.96rem;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-icon {
  display: block;
  width: 42px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  min-width: 0;
  padding: 2px 3px 2px 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 0;
  border-bottom: 2px solid rgba(18, 59, 42, 0.38);
  border-radius: 6px 6px 2px 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.search-form:focus-within {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--hm-green);
  box-shadow: 0 4px 18px rgba(18, 33, 26, 0.18);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--hm-text);
  background: var(--hm-surface-strong);
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.search-form input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 7px 5px 6px 0;
  color: var(--hm-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
}

.search-form input::placeholder {
  color: rgba(60, 72, 65, 0.78);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.header-icon-action,
.registration-action {
  min-height: 40px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-button {
  padding: 0 14px;
  color: #ffffff;
  background: var(--hm-green);
  border: 1px solid var(--hm-green);
}

.ghost-button,
.filter-toggle {
  padding: 0 14px;
  color: var(--hm-green-dark);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--hm-line);
}

.header-icon-action {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--hm-green-dark);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(18, 59, 42, 0.16);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.header-icon-action:hover,
.header-icon-action[aria-expanded="true"] {
  color: #ffffff;
  background: var(--hm-green-dark);
}

.search-submit {
  background: transparent;
  border-color: transparent;
  border-radius: 50%;
  box-shadow: none;
}

.search-submit:hover {
  color: #ffffff;
  background: var(--hm-green);
}

.map-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.registration-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--hm-green);
  border: 1px solid var(--hm-green);
  white-space: nowrap;
}

.registration-action:hover {
  background: var(--hm-green-dark);
  border-color: var(--hm-green-dark);
}

.registration-action .material-symbols-outlined {
  font-size: 1.25rem;
}

.registration-mobile-label {
  display: none;
}

.legal-menu {
  position: relative;
}

.legal-menu > summary {
  list-style: none;
  cursor: pointer;
}

.legal-menu > summary::-webkit-details-marker {
  display: none;
}

.legal-menu nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 190px;
  padding: 6px 0;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: 6px;
  box-shadow: var(--hm-shadow);
}

.legal-menu nav a {
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-menu nav a:hover {
  background: var(--hm-green-soft);
}

.danger-button {
  min-height: 40px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--hm-red);
  border: 1px solid var(--hm-red);
}

.icon-button {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 40px;
  padding: 0;
  color: var(--hm-text);
  background: rgba(18, 59, 42, 0.07);
  border: 1px solid var(--hm-line);
}

.filter-panel {
  position: absolute;
  top: 76px;
  left: 16px;
  z-index: 19;
  width: min(760px, calc(100% - 32px));
  padding: 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(2, minmax(140px, 1fr));
  gap: 16px;
}

.filter-block,
.filter-fields,
.filter-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.filter-block h2 {
  margin: 0 0 2px;
  font-size: 0.88rem;
  line-height: 1.3;
}

.filter-location-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filter-grid label {
  color: var(--hm-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.map-wrap,
.map-canvas {
  width: 100%;
  height: 100%;
}

.map-canvas {
  background:
    linear-gradient(135deg, rgba(46, 107, 71, 0.08), rgba(37, 99, 168, 0.1)),
    repeating-linear-gradient(0deg, rgba(18, 59, 42, 0.08), rgba(18, 59, 42, 0.08) 1px, transparent 1px, transparent 44px),
    repeating-linear-gradient(90deg, rgba(18, 59, 42, 0.08), rgba(18, 59, 42, 0.08) 1px, transparent 1px, transparent 44px);
}

.map-stage.maps-disabled-production .map-canvas {
  background: #e4e8e1;
}

.map-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 12;
  width: min(430px, calc(100% - 32px));
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  transform: translate(-50%, -50%);
}

.fallback-title {
  margin: 0 0 8px;
  color: var(--hm-green-dark);
  font-weight: 800;
}

.map-fallback p:last-child {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.search-results {
  position: absolute;
  top: 76px;
  left: calc(16px + 248px);
  z-index: 18;
  width: min(430px, calc(100% - 32px));
  max-height: min(420px, calc(100svh - 126px));
  overflow: auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
}

.app-shell.has-panel .search-results {
  left: 16px;
}

.result-button {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px;
  color: var(--hm-text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.result-button:hover,
.result-button:focus-visible {
  background: var(--hm-green-soft);
}

.result-button strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.result-button span {
  color: var(--hm-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.result-button .result-range {
  color: var(--hm-text);
}

.target-count-missing {
  color: #8a938d;
}

.empty-note,
.muted {
  margin: 0;
  color: var(--hm-muted);
  line-height: 1.6;
}

.detail-stack {
  display: grid;
  gap: 0;
}

.detail-share-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--hm-muted);
}

.detail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
}

.detail-information {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.share-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  translate: -50% 0;
  max-width: min(360px, calc(100% - 32px));
  padding: 10px 14px;
  color: #ffffff;
  background: var(--hm-green-dark);
  border-radius: 6px;
  box-shadow: var(--hm-shadow);
  font-size: 0.86rem;
  font-weight: 700;
}

.share-toast.is-error {
  background: var(--hm-red);
}

.route-error {
  width: min(560px, calc(100% - 32px));
  margin: 14svh auto 0;
  padding-top: 24px;
  border-top: 3px solid var(--hm-green);
}

.route-error h1 {
  margin: 8px 0 12px;
  color: var(--hm-green-dark);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: 0;
}

.route-error p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--hm-muted);
  line-height: 1.7;
}

.route-error-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  color: var(--hm-green-dark);
  background: var(--hm-green-soft);
  border: 1px solid rgba(46, 107, 71, 0.14);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge.attribute-badge {
  color: var(--hm-muted);
  background: transparent;
  border-color: rgba(77, 91, 82, 0.18);
  font-weight: 700;
}

.badge.attribute-badge.is-unconfirmed {
  border-style: dashed;
}

.badge.status-temporarily_closed,
.badge.status-relocated {
  color: #5d3710;
  background: #fff3dc;
  border-color: rgba(167, 101, 24, 0.2);
}

.badge.status-closed {
  color: #711d1d;
  background: #fff0f0;
  border-color: rgba(179, 58, 58, 0.2);
}

.rating-panel {
  padding: 20px 0;
  border-top: 1px solid var(--hm-line);
  border-bottom: 1px solid var(--hm-line);
}

.rating-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rating-button {
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: center;
  row-gap: 3px;
  min-width: 0;
  min-height: 76px;
  padding: 10px;
  color: var(--hm-text);
  background: transparent;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
  font-weight: 800;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.rating-button:hover:not(:disabled) {
  background: var(--hm-green-soft);
  border-color: rgba(46, 107, 71, 0.38);
}

.rating-button:focus-visible {
  outline: 3px solid rgba(46, 107, 71, 0.28);
  outline-offset: 2px;
}

.rating-button .material-symbols-outlined {
  font-size: 1.9rem;
}

.rating-count {
  min-width: 1ch;
  color: var(--hm-muted);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rating-button[data-vote-value="high"].is-selected {
  color: #ffffff;
  background: var(--hm-green-dark);
  border-color: var(--hm-green-dark);
}

.rating-button[data-vote-value="low"].is-selected {
  color: #ffffff;
  background: var(--hm-green-dark);
  border-color: var(--hm-green-dark);
}

.rating-button.is-selected .rating-count {
  color: rgba(255, 255, 255, 0.78);
}

.rating-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.rating-button.is-selected {
  box-shadow: 0 0 0 3px rgba(18, 59, 42, 0.14);
}

.comment-form,
.reply-form,
.request-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #fbfdf9;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
}

.request-form .request-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.registration-request-form {
  gap: 10px;
  margin-top: 8px;
}

.registration-target-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.registration-target-counts > label {
  min-width: 0;
}

.registration-target-counts > label > span {
  white-space: nowrap;
}

.correction-target-counts {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.correction-form [hidden] {
  display: none !important;
}

.correction-target-value,
.correction-location {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.correction-current-value {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--hm-muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.correction-current-value strong,
.correction-location > strong {
  color: var(--hm-text);
  font-size: 0.82rem;
}

.correction-location {
  padding: 12px;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.correction-location-frame {
  display: block;
  width: 100%;
  height: 300px;
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.correction-location-status {
  min-height: 1.4em;
  margin: 0;
}

.correction-target-counts legend,
.correction-target-count-change-title {
  color: var(--hm-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.correction-target-count-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 14px;
  align-items: center;
  color: var(--hm-muted);
  font-size: 0.78rem;
}

.correction-target-count-current strong {
  color: var(--hm-text);
}

.correction-target-count-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.request-form .correction-target-count-inputs label {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.correction-target-count-inputs input {
  min-width: 0;
}

.correction-target-count-suffix {
  color: var(--hm-text);
  font-weight: 700;
}

.correction-closure-field {
  padding: 10px;
  background: rgba(18, 59, 42, 0.04);
  border-radius: 6px;
}

.correction-form .comment-modal-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  margin: 8px -18px -18px;
  padding: 12px 18px 18px;
  background: var(--hm-surface);
  border-top: 1px solid var(--hm-line);
}

.request-field-note {
  margin: -5px 0 2px;
  color: var(--hm-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.comments-panel,
.request-panel {
  display: grid;
  gap: 10px;
}

.comments-panel {
  padding-top: 18px;
}

.detail-overview .request-panel {
  justify-items: start;
  gap: 7px;
  padding: 0;
  border: 0;
}

.comments-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.comments-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--hm-green-dark);
  font-size: 1rem;
  line-height: 1.35;
}

.comments-header h3 .material-symbols-outlined {
  font-size: 1.25rem;
}

.comment-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}

.comment-sort .ghost-button {
  min-height: 30px;
  padding: 0 9px;
  color: var(--hm-muted);
  background: transparent;
  font-size: 0.74rem;
}

.ghost-button.is-selected {
  color: #ffffff;
  background: var(--hm-green);
  border-color: var(--hm-green);
}

.comment-policy,
.char-counter,
.form-success {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.form-success {
  color: var(--hm-green-dark);
  font-weight: 800;
}

.comment-deletion-criteria-link {
  color: var(--hm-green);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.comment-deletion-criteria-link:hover {
  color: var(--hm-green-dark);
}

.comment-deletion-criteria-link:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--hm-green);
  outline-offset: 2px;
}

.comment-policy-link {
  justify-self: start;
  margin-top: -6px;
}

.comment-list {
  display: grid;
  gap: 0;
}

.comment-item,
.reply-item {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(18, 59, 42, 0.1);
  border-radius: 0;
}

.comment-item:first-child,
.reply-item:first-child {
  border-top: 0;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.comment-meta span,
.comment-meta-line,
.edited-label {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.comment-meta span {
  padding: 0;
}

.comment-text {
  max-width: 68ch;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  color: var(--hm-muted);
  background: transparent;
  border-color: transparent;
}

.comment-icon-action .material-symbols-outlined {
  font-size: 1.15rem;
}

.comment-action-count {
  min-width: 1ch;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.comment-icon-action:hover,
.comment-icon-action:focus-visible {
  color: var(--hm-green-dark);
  background: rgba(46, 107, 71, 0.08);
}

.comment-icon-action:focus-visible {
  outline: 2px solid var(--hm-green);
  outline-offset: 2px;
}

.comment-report-action:hover,
.comment-report-action:focus-visible,
.comment-report-action.is-active {
  color: var(--hm-red);
  background: rgba(173, 49, 37, 0.08);
}

.edited-label {
  color: var(--hm-amber);
  font-weight: 800;
}

.reply-list {
  display: grid;
  gap: 8px;
  padding-left: 10px;
  border-left: 3px solid rgba(46, 107, 71, 0.18);
}

.comment-form label,
.reply-form label,
.request-form label {
  display: grid;
  gap: 5px;
  color: var(--hm-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.comment-form select,
.comment-form input,
.comment-form textarea,
.reply-form textarea,
.request-form select,
.request-form input,
.request-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--hm-text);
  background: var(--hm-surface-strong);
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.comment-form textarea,
.reply-form textarea,
.request-form textarea {
  resize: vertical;
}

.request-entry-button {
  white-space: nowrap;
}

.account-button {
  white-space: nowrap;
}

.request-panel {
  justify-items: start;
}

.compact-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  color: var(--hm-muted);
  font-size: 0.78rem;
}

.compact-request-form {
  margin-top: 8px;
  padding: 10px;
}

.delete-reason-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.delete-reason-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  min-width: 0;
}

.delete-reason-label {
  color: var(--hm-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.delete-reason-heading .comment-deletion-criteria-link {
  margin-left: auto;
}

.delete-request-panel {
  display: grid;
  gap: 8px;
}

.comment-expand-button {
  justify-self: stretch;
}

.comment-write-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.comment-write-button--header {
  display: none;
}

.comment-write-button .material-symbols-outlined {
  font-size: 1.2rem;
}

.detail-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  padding: 0;
  border: 0;
}

.detail-row dt {
  color: var(--hm-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.55;
}

.detail-row dd {
  min-width: 0;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.safe-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 3px 8px;
  color: var(--hm-green-dark);
  background: transparent;
  border: 1px solid rgba(46, 107, 71, 0.18);
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.pin-shell {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  background: var(--pin-color, var(--hm-gray-pin));
  border: 2px solid #ffffff;
  border-radius: 999px 999px 999px 3px;
  box-shadow: 0 4px 10px rgba(20, 31, 26, 0.28);
  transform: rotate(45deg);
}

.pin-shell::after {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  content: "";
}

.pin-shell.is-selected {
  width: 30px;
  height: 30px;
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(46, 107, 71, 0.22), 0 8px 18px rgba(20, 31, 26, 0.36);
}

.pin-shell.is-selected::after {
  width: 9px;
  height: 9px;
}

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 24;
  display: none;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(76svh, 620px);
  overflow: hidden;
  color: var(--hm-text);
  background: var(--hm-surface);
  border-top: 1px solid var(--hm-line);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -12px 28px rgba(18, 33, 26, 0.22);
  transform: translateY(100%);
  transition: transform 180ms ease;
}

.bottom-sheet.is-open {
  transform: translateY(var(--sheet-drag-y, 0));
}

.bottom-sheet.is-dragging {
  transition: none;
}

.sheet-handle {
  width: 46px;
  height: 4px;
  margin: 9px auto 0;
  background: rgba(18, 59, 42, 0.22);
  border-radius: 999px;
  touch-action: none;
}

.sheet-content {
  max-height: none;
  overscroll-behavior: contain;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 40;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--hm-line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 18, 13, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.auth-modal {
  width: min(420px, 100%);
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
}

.comment-modal {
  width: min(620px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow);
}

.comment-modal-dojo-name {
  margin: 4px 0 0;
  color: var(--hm-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.comment-modal-body {
  max-height: calc(100dvh - 122px);
  overflow: auto;
  padding: 18px;
}

.comment-modal .comment-form,
.comment-modal .request-form {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.comment-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.has-open-modal {
  overflow: hidden;
}

.modal-bar {
  display: flex;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--hm-line);
}

.modal-bar h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
}

.login-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 0.84rem;
}

.auth-links a,
.auth-route-back,
.auth-route-brand {
  color: var(--hm-green-deep);
  text-underline-offset: 3px;
}

.auth-route {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px 16px;
  background: var(--hm-bg);
}

.auth-route-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-route-brand img {
  display: block;
  width: 36px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
}

.auth-route-panel {
  width: min(440px, 100%);
  padding: 24px;
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
}

.auth-route-panel h1 {
  margin: 4px 0 20px;
  font-size: 1.35rem;
}

.auth-route-form {
  display: grid;
  gap: 14px;
}

.auth-route-form label {
  display: grid;
  gap: 6px;
  color: var(--hm-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-route-form input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--hm-text);
  background: var(--hm-surface-strong);
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.auth-route-form .legal-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--hm-text);
  font-weight: 600;
  line-height: 1.6;
}

.auth-route-form .legal-consent input {
  width: 18px;
  min-height: 18px;
  margin: 3px 0 0;
}

.auth-route-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  font-size: 0.84rem;
}

.auth-route-links .auth-route-back {
  margin-top: 0;
}

.legal-page-body {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

.legal-page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--hm-line);
}

.legal-page-header a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-page-header img {
  display: block;
  width: 36px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
}

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.legal-page article > h1 {
  margin: 6px 0 4px;
  font-size: 2.1rem;
  line-height: 1.3;
}

.legal-effective-date {
  margin: 0 0 32px;
  color: var(--hm-muted);
  font-size: 0.84rem;
}

.legal-document {
  line-height: 1.85;
}

.legal-document h2 {
  margin: 34px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hm-line);
  font-size: 1.15rem;
  line-height: 1.5;
}

.legal-document p {
  margin: 0 0 14px;
}

.legal-document ol {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding-left: 1.5em;
}

.legal-document dl {
  display: grid;
  gap: 8px;
}

.legal-document dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
}

.legal-document dt {
  color: var(--hm-muted);
  font-weight: 800;
}

.legal-document dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.legal-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--hm-line);
  font-size: 0.86rem;
}

.auth-route-note,
.auth-route-status {
  margin: 16px 0 0;
  color: var(--hm-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.auth-route-status {
  white-space: pre-line;
}

.auth-route-completion-link {
  width: fit-content;
  margin-top: 14px;
  text-decoration: none;
}

.auth-route-status.is-error {
  color: var(--hm-red);
}

.auth-route-back {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.88rem;
}

.account-actions,
.withdrawal-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.account-email,
.withdrawal-form p {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.withdrawal-form label {
  display: grid;
  gap: 6px;
  color: var(--hm-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.withdrawal-form input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--hm-text);
  background: var(--hm-surface-strong);
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.withdrawal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--hm-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--hm-text);
  background: var(--hm-surface-strong);
  border: 1px solid var(--hm-line);
  border-radius: 6px;
}

.form-error {
  margin: 0;
  color: var(--hm-red);
  font-size: 0.86rem;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .topbar,
  .app-shell.has-panel .topbar {
    grid-template-columns: minmax(0, 1fr) 44px max-content;
  }

  .brand-mark {
    display: none;
  }

  .search-results {
    left: 16px;
  }

  .filter-grid {
    grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .app-shell,
  .app-shell.has-panel {
    display: block;
  }

  .side-panel {
    display: none;
  }

  .map-stage {
    height: 100svh;
  }

  .topbar,
  .app-shell.has-panel .topbar {
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr) 44px;
    padding: 1px 2px 1px 11px;
  }

  .primary-button,
  .ghost-button,
  .icon-button,
  .filter-panel input,
  .filter-panel select {
    min-height: 40px;
  }

  .search-form input {
    min-height: 44px;
  }

  .header-icon-action,
  .filter-toggle {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .map-actions {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 21;
    display: grid;
    width: 56px;
    grid-template-columns: 56px;
    grid-template-rows: 44px 56px;
    gap: 12px;
    align-items: end;
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  }

  .map-actions .account-button {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .map-actions .legal-menu {
    position: fixed;
    left: calc(max(4px, env(safe-area-inset-left)) + 68px);
    bottom: max(2px, env(safe-area-inset-bottom));
    z-index: 21;
  }

  .map-actions .legal-menu > summary {
    position: relative;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    color: var(--hm-green-dark);
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .map-actions .legal-menu > summary:hover,
  .map-actions .legal-menu[open] > summary {
    color: var(--hm-green-dark);
    background: transparent;
  }

  .map-actions .legal-menu > summary .material-symbols-outlined {
    position: relative;
    top: 10px;
    left: -6px;
    font-size: 16px;
  }

  .map-actions .registration-action {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    width: 56px;
    min-width: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(18, 59, 42, 0.3);
  }

  .map-actions .registration-action .material-symbols-outlined {
    font-size: 1.55rem;
  }

  .registration-label {
    display: none;
  }

  .registration-mobile-label {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    display: block;
    width: max-content;
    color: var(--hm-green-dark);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    background: transparent;
    border: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translateX(-50%);
  }

  .legal-menu nav {
    top: auto;
    right: auto;
    left: 0;
    bottom: calc(100% + 8px);
  }

  .app-shell.has-panel .map-actions {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
  }

  .filter-panel {
    top: calc(66px + env(safe-area-inset-top));
    left: 10px;
    width: calc(100% - 20px);
    max-height: calc(100svh - 86px - env(safe-area-inset-top));
    overflow: auto;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-location-fields {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .search-results {
    top: calc(66px + env(safe-area-inset-top));
    left: 10px;
    width: calc(100% - 20px);
    max-height: min(48svh, 360px);
  }

  .bottom-sheet {
    display: grid;
  }

  .bottom-sheet[aria-hidden="true"] {
    pointer-events: none;
  }

  #bottomSheet .registration-request-form input,
  #bottomSheet .registration-request-form select,
  #bottomSheet .registration-request-form textarea {
    font-size: 16px;
  }

  .correction-form input,
  .correction-form select,
  .correction-form textarea {
    font-size: 16px;
  }

  .detail-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  .comments-header {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 6px;
  }

  .comments-panel {
    gap: 7px;
    padding-top: 14px;
  }

  .comments-header h3 {
    font-size: 0.92rem;
  }

  .comments-header h3 .material-symbols-outlined {
    font-size: 1.1rem;
  }

  .comment-write-button--header {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .comment-write-button--header .material-symbols-outlined {
    font-size: 1.05rem;
  }

  .comment-write-button--footer {
    display: none;
  }

  .comment-sort {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
    flex-wrap: nowrap;
  }

  .comment-sort .ghost-button {
    min-height: 40px;
    padding: 0 9px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .comment-item,
  .reply-item {
    gap: 6px;
    padding: 10px 0;
  }

  .comment-meta span,
  .comment-meta-line,
  .edited-label {
    font-size: 0.7rem;
    line-height: 1.4;
  }

  .comment-text {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .comments-panel .comment-list > .muted,
  .comment-expand-button {
    font-size: 0.78rem;
  }

  .reply-list {
    gap: 6px;
  }

  .comment-icon-action {
    min-width: 44px;
    min-height: 44px;
  }

  .correction-target-count-current,
  .correction-target-count-inputs {
    grid-template-columns: 1fr;
  }

  .correction-location-frame {
    height: 260px;
  }

  .comment-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .comment-modal-body {
    max-height: calc(100dvh - 108px);
    padding: 14px;
  }

  .legal-page {
    padding-top: 28px;
  }

  .legal-page article > h1 {
    font-size: 1.65rem;
  }
}

@media (max-width: 420px) {
  .legal-document dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
