:root {
  color-scheme: light;
  --red: #a72a20;
  --red-deep: #7c1712;
  --cream: #f4efe3;
  --cream-2: #ebe2d2;
  --paper: #fffdf8;
  --ink: #151515;
  --muted: #6f6a60;
  --line: #e5d8c6;
  --blue: #2d75c9;
  --green: #158456;
  --amber: #c57b18;
  --shadow: 0 12px 30px rgba(35, 22, 12, 0.09);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.brand p,
.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 1.45rem;
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.45rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.version-pill {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.view {
  display: none;
}

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

.welcome-card,
.panel,
.quick-card,
.service-card {
  border: 1px solid rgba(167, 42, 32, 0.12);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.welcome-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px;
}

.welcome-card p {
  margin-bottom: 0;
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f2d4cf;
  color: var(--red);
}

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

.quick-card {
  min-height: 128px;
  padding: 18px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  text-align: left;
}

.quick-card span,
.service-icon,
.notice-item span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
}

.quick-card strong {
  font-size: 1.2rem;
}

.quick-card small,
.service-card small {
  color: var(--muted);
  font-weight: 650;
}

.quick-card.red span {
  background: #f1d1cb;
  color: var(--red);
}

.quick-card.blue span {
  background: #d9e9fb;
  color: var(--blue);
}

.quick-card.green span {
  background: #dceee4;
  color: var(--green);
}

.panel {
  padding: 18px;
}

.contact-panel .info-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.contact-panel .info-list > * {
  padding-left: 34px;
  color: var(--muted);
  font-weight: 650;
}

.contact-panel .info-list a {
  color: var(--red);
}

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

.button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 800;
}

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

.button.soft {
  background: #ead0cc;
  color: var(--red-deep);
}

.button.full {
  width: 100%;
}

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

.icon-link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--cream-2);
  color: var(--red);
  font-weight: 900;
}

.notice-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.notice-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: #fff4ef;
}

.notice-item span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
}

.notice-item p {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.link-row {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  padding: 4px 0;
}

.link-row button {
  border: 0;
  background: transparent;
  color: var(--red);
  font-weight: 800;
  padding: 12px;
}

.section-title p {
  margin-bottom: 0;
}

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

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

.service-card,
.topic-card {
  min-height: 154px;
  padding: 16px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 10px;
  border-color: rgba(21, 21, 21, 0.08);
}

.topic-card {
  min-height: 118px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.service-card strong,
.topic-card strong {
  font-size: 1.05rem;
  line-height: 1.08;
}

.topic-card small {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.18;
}

.service-icon,
.topic-card span {
  background: #efe5d3;
  color: var(--red);
}

.topic-card span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
}

.topic-blue span {
  background: #d9e9fb;
  color: var(--blue);
}

.topic-green span {
  background: #dceee4;
  color: var(--green);
}

.topic-amber span {
  background: #f7e4c4;
  color: var(--amber);
}

.topic-purple span {
  background: #e5deef;
  color: #6c4aa3;
}

.tone-1 .service-icon {
  background: #f6d8d2;
}

.tone-2 .service-icon {
  background: #dceaf9;
  color: var(--blue);
}

.tone-3 .service-icon {
  background: #dceee4;
  color: var(--green);
}

.tone-4 .service-icon {
  background: #f7e4c4;
  color: var(--amber);
}

.tone-5 .service-icon {
  background: #e5deef;
  color: #6c4aa3;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(167, 42, 32, 0.12);
}

.consent-row {
  grid-template-columns: 24px 1fr;
  align-items: start;
  font-weight: 650;
  color: var(--muted);
}

.consent-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 12px 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 {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
}

.about-panel img {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.imprint-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fff7ef;
  border: 1px solid var(--line);
}

.imprint-box dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.imprint-box dl > div {
  display: grid;
  gap: 3px;
}

.imprint-box dt {
  color: var(--ink);
  font-weight: 850;
  font-size: 0.82rem;
}

.imprint-box dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.imprint-box a,
.imprint-link {
  color: var(--red);
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(96vw, 540px);
  min-height: 60px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(229, 216, 198, 0.9);
  box-shadow: 0 18px 45px rgba(35, 22, 12, 0.18);
  backdrop-filter: blur(18px);
  z-index: 10;
}

.bottom-nav button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 4px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.78rem, 2.7vw, 0.92rem);
  font-weight: 850;
  line-height: 1.05;
}

.bottom-nav button.is-active {
  background: var(--cream-2);
  color: var(--red);
}

dialog {
  width: min(calc(100vw - 28px), 520px);
  border: 0;
  border-radius: 24px;
  padding: 18px;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(21, 21, 21, 0.28);
}

dialog::backdrop {
  background: rgba(21, 21, 21, 0.38);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#dialogClose {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--cream-2);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 28px;
  }

  .view.is-active {
    gap: 20px;
  }

  .service-grid,
  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .welcome-card {
    grid-template-columns: 54px 1fr;
    padding: 24px;
  }

  .card-icon {
    width: 50px;
    height: 50px;
  }

  .bottom-nav {
    position: sticky;
    bottom: 18px;
    margin: 28px auto 0;
    transform: none;
    left: auto;
  }
}

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

  .quick-card,
  .service-card,
  .panel {
    border-radius: 18px;
  }

  .quick-card strong,
  .service-card strong,
  .topic-card strong {
    font-size: 1rem;
  }

  .topic-grid {
    gap: 8px;
  }

  .topic-card {
    padding: 12px;
    min-height: 112px;
  }

  .bottom-nav {
    width: min(98vw, 360px);
    gap: 2px;
  }

  .bottom-nav button {
    font-size: 0.74rem;
    padding: 0 2px;
  }
}
