:root {
  color-scheme: light;
  --ink: #17312d;
  --muted: #61706d;
  --line: #d9e1dd;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --brand: #0f6d58;
  --brand-dark: #0f2f2b;
  --accent: #d7472f;
  --gold: #d9a33a;
  --sky: #dceff0;
  --shadow: 0 16px 40px rgba(15, 47, 43, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: linear-gradient(180deg, #e7f1ee 0%, var(--paper) 36%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 28px;
}

.app-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 26px;
  padding: 18px 8px 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.app-footer span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 10px 2px 0;
  border-radius: 50%;
  background: rgba(97, 112, 109, 0.7);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.language-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(34px, 1fr));
  padding: 3px;
  border: 1px solid rgba(15, 47, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.language-switch button {
  min-width: 34px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.language-switch button.is-selected {
  background: var(--brand-dark);
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.logo-slot {
  display: grid;
  place-items: center;
  width: 92px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 47, 43, 0.12);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px 7px;
}

.logo-slot span {
  display: none;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 900;
}

.logo-slot.logo-fallback span {
  display: block;
}

.eyebrow,
.muted,
.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.eyebrow {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 12vw, 3rem);
  line-height: 0.95;
}

h2 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.12;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.icon-button,
.tab,
.primary-button,
.secondary-button,
.ghost-button,
.quick-action,
.choice-grid button,
.accordion-trigger {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 109, 88, 0.92), rgba(15, 47, 43, 0.96)),
    radial-gradient(circle at 90% 20%, rgba(217, 163, 58, 0.5), transparent 35%);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-panel p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.status-pill,
.mini-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.tabbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 16px -2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.86);
  backdrop-filter: blur(14px);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 4px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-align: center;
}

.tab.is-active {
  background: var(--brand-dark);
  color: #fff;
}

.view {
  display: none;
  animation: rise 180ms ease-out;
}

.view.is-active {
  display: grid;
  gap: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-heading,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.machine-card,
.content-panel,
.place-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15, 47, 43, 0.06);
}

.machine-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.machine-metrics {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.warranty-box,
.progress-ring {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border: 7px solid var(--sky);
  border-top-color: var(--brand);
  border-radius: 50%;
  text-align: center;
}

.descale-status-box {
  border-color: #f0dfd7;
  border-top-color: var(--accent);
}

.warranty-box span,
.progress-ring span {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
}

.warranty-box small {
  display: block;
  margin-top: -10px;
  color: var(--muted);
  font-size: 0.66rem;
}

.descale-status-box small {
  max-width: 58px;
  margin-top: -8px;
  line-height: 1.08;
  text-align: center;
  overflow-wrap: break-word;
}

.warranty-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

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

.quick-action {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.quick-action span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
}

.quick-action strong {
  display: block;
  line-height: 1.16;
}

.quick-action.is-locked {
  background: #f4f1ec;
  color: #7f8581;
}

.express-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.express-card.is-locked {
  background: #f3f4f2;
  opacity: 0.78;
}

.express-card.is-locked .primary-button {
  background: #a9b1ad;
  color: #fff;
  cursor: not-allowed;
}

.express-card.is-active {
  border-color: rgba(215, 71, 47, 0.42);
  background:
    linear-gradient(135deg, rgba(215, 71, 47, 0.1), rgba(15, 109, 88, 0.08)),
    #fff;
}

.express-card.is-active .primary-button {
  background: var(--accent);
}

.service-cases-card.is-locked {
  background: #f6f7f5;
}

.empty-service-state {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #b8c2bd;
  border-radius: 8px;
  color: var(--muted);
}

.empty-service-state p {
  margin: 6px 0 0;
}

.service-case {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.service-case-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-case-head p,
.service-case > p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.service-case-head span {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(215, 71, 47, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
}

.service-timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px 10px;
  align-items: start;
  color: var(--muted);
}

.service-timeline li::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 2px solid #b8c2bd;
  border-radius: 50%;
  background: #fff;
}

.service-timeline li.is-done::before {
  border-color: var(--brand);
  background: var(--brand);
}

.service-timeline span {
  color: var(--ink);
  font-weight: 900;
}

.service-timeline small {
  grid-column: 2;
  margin-top: -4px;
}

.current-service-state {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 109, 88, 0.2);
  border-radius: 8px;
  background: #eef7f2;
}

.current-service-state span {
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.current-service-state strong {
  line-height: 1.25;
}

.current-service-state small {
  color: var(--muted);
}

.content-panel {
  padding: 16px;
}

.content-panel h4 {
  margin: 18px 0 10px;
  font-size: 0.92rem;
}

.field {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 109, 88, 0.12);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 900;
  text-decoration: none;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  opacity: 0.78;
  cursor: default;
}

.secondary-button {
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand-dark);
}

.ghost-button {
  background: transparent;
  color: var(--brand);
}

.range-readout,
.maintenance-result,
.recipe-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f2f6f3;
  line-height: 1.4;
}

.maintenance-result strong,
.recipe-result strong {
  display: block;
  margin-bottom: 4px;
}

.mini-badge {
  background: #eff6f2;
  color: var(--brand);
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion:first-of-type {
  border-top: 0;
}

.accordion-trigger {
  width: 100%;
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.accordion p {
  display: none;
  margin: 0 0 12px;
  color: var(--muted);
}

.accordion.is-open p {
  display: block;
}

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

.maintenance-tabs button,
.maintenance-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.maintenance-tabs button.is-selected {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.maintenance-panel {
  display: none;
}

.maintenance-panel.is-active {
  display: block;
}

.service-notice-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 109, 88, 0.28);
  border-radius: 8px;
  background: #edf6f2;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.4;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand);
  content: "✓";
  font-weight: 900;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.info-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.info-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-dark);
}

.info-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.38;
}

.compact-list,
.step-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
}

.step-list {
  display: grid;
  gap: 10px;
}

.step-list li::marker {
  color: var(--brand);
  font-weight: 900;
}

.option-stack {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.option-stack label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
}

.option-stack input {
  width: auto;
  min-height: 0;
}

.descale-meter {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border-radius: 8px;
  background: #f2f6f3;
}

.descale-meter p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.descale-ring {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 57%, transparent 58%),
    conic-gradient(var(--brand) var(--progress, 0deg), var(--sky) 0);
  text-align: center;
}

.descale-ring span {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
}

.descale-ring small {
  display: block;
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.service-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.service-box h4 {
  margin: 0 0 8px;
}

.service-box p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.service-box p:last-child {
  margin-bottom: 0;
}

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

.choice-grid button {
  min-height: 50px;
  padding: 10px;
  border-radius: 7px;
  background: #eff6f2;
  color: var(--brand-dark);
  font-weight: 900;
}

.choice-grid button.is-selected {
  background: var(--brand-dark);
  color: #fff;
}

.map-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.place-list {
  display: grid;
  gap: 10px;
}

.place-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.place-card.is-community {
  padding: 10px;
  gap: 8px;
  background: #fbfcfa;
}

.place-card.is-community .place-summary {
  grid-template-columns: 58px 1fr;
  gap: 10px;
}

.place-card.is-community .place-photo {
  width: 58px;
  height: 58px;
}

.place-card.is-community .place-summary p {
  display: none;
}

.place-card.is-community .place-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.danger-button {
  border-color: rgba(215, 71, 47, 0.55);
  color: #b23622;
}

.place-card h3 {
  margin-bottom: 2px;
}

.place-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.place-actions a,
.place-actions button {
  min-height: 38px;
}

.place-actions button:disabled {
  opacity: 0.72;
  cursor: default;
}

.list-title {
  margin: 2px 0 -4px;
  font-size: 1rem;
}

.reward-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reward-claim-button {
  margin-top: 12px;
}

.reward-reset-button {
  margin-top: 10px;
}

.reward-claim-button:disabled {
  background: #a9b1ad;
}

.reward-fallback textarea {
  min-height: 170px;
  margin-top: 10px;
  font-size: 0.85rem;
}

.arcade-card {
  display: grid;
  gap: 12px;
}

.arcade-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#arcadeCanvas {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 5 / 6;
  justify-self: center;
  border: 1px solid rgba(15, 47, 43, 0.16);
  border-radius: 8px;
  background: #102f2b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.arcade-score {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.arcade-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 300px;
  justify-self: center;
  width: 100%;
}

.arcade-controls button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
}

#arcadeStart {
  background: var(--brand-dark);
  color: #fff;
}

.activation-dialog {
  width: min(calc(100% - 28px), 480px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.activation-dialog::backdrop,
.place-dialog::backdrop {
  background: rgba(15, 47, 43, 0.48);
}

.activation-dialog form,
.place-dialog form {
  padding: 18px;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-header .icon-button {
  background: #edf3f0;
  color: var(--ink);
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.place-filter-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 47, 43, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.place-filter-panel.is-subfilter {
  margin-top: -4px;
  background: rgba(237, 245, 241, 0.72);
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-row,
.subfilter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.filter-row button,
.subfilter-row button {
  min-height: 38px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: normal;
  line-height: 1.12;
}

.filter-row button.is-selected,
.subfilter-row button.is-selected {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.subfilter-row {
  margin-top: 0;
}

.subfilter-row button {
  min-height: 34px;
  font-size: 0.78rem;
}

.view-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.view-toggle button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.view-toggle button.is-selected {
  background: var(--brand-dark);
  color: #fff;
}

.map-preview {
  display: grid;
  gap: 8px;
}

.map-canvas {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 109, 88, 0.12), rgba(217, 163, 58, 0.18)),
    #eef5f1;
  box-shadow: 0 8px 24px rgba(15, 47, 43, 0.06);
}

.map-canvas.is-real-map {
  background: #eef5f1;
}

.map-canvas .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.map-canvas.is-real-map .leaflet-container,
.map-canvas.is-real-map {
  font-family: inherit;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 47, 43, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 47, 43, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.map-marker {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--brand-dark);
  color: #fff;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 9px 20px rgba(15, 47, 43, 0.24);
  transform: translate(-50%, -50%);
}

.map-marker.parking,
.map-marker.power {
  background: #2d5a83;
}

.map-marker.water,
.map-marker.viewpoint {
  background: #0f6d58;
}

.map-marker.coffee,
.map-marker.picnic {
  background: var(--accent);
}

.map-marker.camp,
.map-marker.camper,
.map-marker.trailhead {
  background: #6f4a2f;
}

.empty-map {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.place-summary {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.place-summary p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.place-photo,
.detail-photo {
  overflow: hidden;
  border-radius: 8px;
  background: #e7f1ee;
}

.place-photo {
  width: 92px;
  height: 92px;
}

.place-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
}

.place-photo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(15, 109, 88, 0.16), rgba(217, 163, 58, 0.22)),
    #f2f6f3;
  color: var(--brand-dark);
  font-size: 1rem;
  font-weight: 900;
}

.place-photo-fallback.large {
  min-height: 190px;
  font-size: 1.4rem;
}

.place-dialog {
  width: min(calc(100% - 28px), 520px);
  max-height: min(760px, calc(100vh - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.place-detail-hero {
  position: relative;
}

.detail-photo {
  display: grid;
  place-items: center;
  min-height: 190px;
  max-height: 62vh;
  margin-bottom: 12px;
}

.place-detail-badge {
  position: absolute;
  left: 12px;
  bottom: 24px;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 47, 43, 0.92);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.detail-meta {
  margin-bottom: 12px;
}

.place-dialog p {
  line-height: 1.45;
}

.place-detail-description {
  margin-bottom: 12px;
}

.place-detail-info {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.place-detail-info div {
  display: grid;
  gap: 2px;
}

.place-detail-info strong {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--brand);
}

.place-detail-info span {
  color: var(--ink);
}

.detail-actions {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

.travel-weather-card {
  display: grid;
  gap: 14px;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.weather-tile {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.weather-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.weather-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 1.05rem;
}

.trip-summary {
  margin-top: 12px;
}

.trip-archive {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.content-panel > .button-row {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

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

.trip-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.trip-points li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.trip-point-actions {
  display: inline-flex;
  gap: 5px;
}

.trip-point-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.trip-poi-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.trip-poi-results h4 {
  margin: 0;
}

.trip-poi-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.trip-poi-list {
  display: grid;
  gap: 7px;
}

.trip-poi-tools {
  display: flex;
  justify-content: flex-end;
}

.trip-poi-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.trip-poi-item label {
  display: grid;
  place-items: center;
  width: 54px;
  min-width: 0;
  padding: 7px 4px;
  border: 1px solid rgba(18, 64, 55, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
}

.trip-poi-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.trip-poi-list button {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(18, 64, 55, 0.22);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.trip-poi-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #dce8dd, #efe8c9);
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.trip-poi-thumb strong {
  max-width: 100%;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-poi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-poi-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.trip-poi-copy span {
  font-weight: 900;
}

.trip-poi-copy small {
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.checklist {
  display: grid;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
  font-weight: 800;
}

.checklist-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.checklist-item input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.checklist-manager {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.checklist-add input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.compact-button {
  min-height: 36px;
  padding: 8px 12px;
}

.button-feedback {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  transform: translateY(1px);
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 12px;
  }

  .quick-grid,
  .express-card,
  .button-row,
  .choice-grid,
  .map-tools,
  .weather-grid,
  .checklist-add,
  .stay-links,
  .field-pair,
  .place-actions,
  .filter-row,
  .subfilter-row,
  .maintenance-tabs,
  .descale-meter,
  .info-grid,
  .compact-list {
    grid-template-columns: 1fr;
  }

  .trip-poi-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .trip-poi-item label {
    width: 48px;
    font-size: 0.58rem;
  }

  .trip-poi-list button {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
  }

  .trip-poi-thumb {
    width: 54px;
    height: 54px;
    font-size: 0.62rem;
  }

  .brand-lockup {
    gap: 9px;
  }

  .logo-slot {
    width: 74px;
    height: 46px;
  }

  .place-summary {
    grid-template-columns: 76px 1fr;
  }

  .place-photo {
    width: 76px;
    height: 76px;
  }

  .tab {
    min-height: 38px;
    font-size: 0.6rem;
  }

  .reward-panel,
  .machine-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-case-head {
    display: grid;
  }

  .machine-metrics {
    width: 100%;
    justify-content: space-between;
  }

  .warranty-box {
    width: min(46vw, 94px);
    height: min(46vw, 94px);
  }
}
