:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --text: #1b2528;
  --muted: #5d6c71;
  --line: #d8e1df;
  --primary: #11685f;
  --primary-strong: #0b4f49;
  --alert-bg: #fff2e0;
  --alert-text: #7a4300;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  line-height: 1.5;
}

.page {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.login-panel {
  width: min(100%, 420px);
  margin: 12vh auto 0;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 37, 40, 0.08);
}

.brand-block,
.app-header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: 0;
}

.user-line {
  margin: 6px 0 0;
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(17, 104, 95, 0.18);
  border-color: var(--primary);
}

button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--primary-strong);
}

button.secondary {
  background: #e9efed;
  color: var(--text);
}

button.secondary:hover,
button.secondary:focus-visible {
  background: #dce6e3;
}

.alert {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--alert-bg);
  color: var(--alert-text);
  font-weight: 700;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.list-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.list-summary .data-date {
  font-size: 0.92rem;
}

.usage-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.supportee-list {
  display: grid;
  gap: 8px;
}

.supportee-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.supportee-main {
  display: grid;
  grid-template-columns: minmax(40px, 56px) minmax(120px, 1fr) minmax(180px, 1.6fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.supportee-main:hover,
.supportee-main:focus-visible {
  background: #eef6f4;
  outline: none;
}

.alt-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 44px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.alt-link:hover,
.alt-link:focus-visible {
  background: #eef6f4;
  outline: none;
}

.display-no {
  color: var(--muted);
  font-weight: 700;
}

.name {
  font-weight: 700;
}

.address {
  color: var(--text);
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e5f2ef;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.map-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.empty {
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .page {
    padding: 18px 12px 32px;
  }

  .login-panel {
    margin-top: 8vh;
    padding: 22px;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header form,
  .app-header button {
    width: 100%;
  }

  .supportee-row {
    grid-template-columns: 1fr;
  }

  .supportee-main {
    grid-template-columns: 48px 1fr auto;
  }

  .alt-link {
    min-width: 0;
    min-height: 48px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .address {
    grid-column: 1 / -1;
  }
}
