:root {
  --bg-1: #ecf3ff;
  --bg-2: #f6f8fc;
  --ink: #162136;
  --muted: #55647c;
  --line: #d5dfee;
  --panel: #ffffff;
  --accent: #2563eb;
  --accent-soft: #e7f0ff;
  --today: #fff1df;
  --week: #eaf3ff;
  --after: #eaf9ef;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  background:
    radial-gradient(1200px 520px at -15% -20%, #c9e1ff 0%, rgba(201, 225, 255, 0) 55%),
    radial-gradient(1000px 420px at 110% -10%, #d8e3ff 0%, rgba(216, 227, 255, 0) 50%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 46%, #f9fbff 100%);
}

.hero {
  padding: 24px 18px 4px;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid #cfdcf4;
  border-radius: 18px;
  background:
    radial-gradient(600px 280px at 10% 0%, rgba(70, 126, 255, 0.2), transparent 55%),
    linear-gradient(120deg, #143156 0%, #1a4a80 45%, #2d5fa2 100%);
  padding: 20px 22px;
  color: #f4f8ff;
}

.hero-tag {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.hero h1 {
  margin: 0;
  font-family: "M PLUS Rounded 1c", "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(1.35rem, 3.1vw, 2rem);
  line-height: 1.4;
}

.hero-lead {
  margin: 10px 0 0;
  color: rgba(244, 248, 255, 0.9);
  font-size: 0.96rem;
  line-height: 1.7;
}

.layout {
  max-width: 1180px;
  margin: 14px auto 50px;
  padding: 0 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
}

.left-stack {
  display: grid;
  gap: 16px;
  align-content: start;
  position: sticky;
  top: 14px;
  align-self: start;
}

.right-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(30, 66, 126, 0.05);
}

.input-panel,
.business-panel,
.result-panel {
  padding: 16px;
}

.input-panel h2,
.business-panel h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.section-kicker {
  margin-bottom: 6px;
  color: #4b6fa9;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: #334053;
}

select {
  width: 100%;
  border: 1px solid #cfd9ea;
  border-radius: 9px;
  padding: 9px 10px;
  background: #fff;
  color: #22324a;
}

select:focus-visible {
  outline: 2px solid #9cb9ff;
  outline-offset: 1px;
}

.button-row {
  margin-top: 12px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 11px 15px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-family: "M PLUS Rounded 1c", "Zen Kaku Gothic New", sans-serif;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.04);
}

.business-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #334053;
  font-size: 0.86rem;
  display: grid;
  gap: 7px;
}

.helper-note {
  margin-top: 14px;
  border-top: 1px dashed #d7e1f0;
  padding-top: 12px;
  display: grid;
  gap: 4px;
}

.helper-note strong {
  font-size: 0.84rem;
}

.helper-note span {
  color: #566884;
  font-size: 0.85rem;
  line-height: 1.6;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  align-items: baseline;
}

.meta strong {
  color: #13203a;
  font-size: 1.08rem;
}

.count-strip {
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.count-item {
  border-radius: 10px;
  border: 1px solid #d6e1f3;
  background: #fbfdff;
  display: grid;
  place-items: center;
  padding: 8px;
}

.count-item b {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.15rem;
  color: #17325f;
}

.count-item span {
  font-size: 0.77rem;
  color: #51627f;
}

.progress-panel {
  border: 1px solid #d3e0f6;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px 11px;
  margin-bottom: 12px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.progress-head h2 {
  margin: 0;
  font-size: 0.96rem;
}

.progress-head span {
  font-size: 0.83rem;
  color: #46608a;
}

.progress-track {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dde7f8;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3f83ff 0%, #2556d8 100%);
  transition: width 0.2s ease;
}

.action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid #d4def0;
  border-radius: 10px;
  padding: 9px 10px;
  background: #fbfdff;
  margin-bottom: 12px;
}

.toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #32445f;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ghost-btn {
  border: 1px solid #c1d1eb;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: #2c4a7a;
  font-size: 0.8rem;
  font-weight: 600;
}

.toolbar-feedback {
  margin-left: auto;
  font-size: 0.8rem;
  color: #3f5f92;
}

.first-action {
  margin-bottom: 14px;
}

.first-action h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.first-action-card {
  border: 1px solid #c7d8f9;
  border-radius: 14px;
  background:
    radial-gradient(280px 120px at 0% 0%, rgba(72, 120, 255, 0.14), transparent 60%),
    linear-gradient(135deg, #f3f8ff 0%, #f9fbff 100%);
  padding: 14px;
}

.first-action-title {
  font-size: 1.12rem;
  font-weight: 700;
}

.first-action-card p {
  margin: 6px 0 0;
  color: #3c4d69;
  font-size: 0.92rem;
  line-height: 1.6;
}

.sponsored-slot {
  border: 1px dashed #c2d2ec;
  border-radius: 11px;
  padding: 9px 12px;
  background: #fbfdff;
  margin-bottom: 14px;
}

.sponsored-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.sponsored-badge {
  display: inline-block;
  border: 1px solid #90abd6;
  color: #365b95;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 700;
}

.sponsored-frame {
  margin-top: 8px;
  border: 1px solid #d9e4f5;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(88, 123, 190, 0.05) 0,
      rgba(88, 123, 190, 0.05) 10px,
      rgba(88, 123, 190, 0.1) 10px,
      rgba(88, 123, 190, 0.1) 20px
    );
  display: grid;
  place-items: center;
  text-align: center;
}

.sponsored-slot--result_top .sponsored-frame {
  max-width: 728px;
  min-height: 90px;
}

.sponsored-slot--related_before .sponsored-frame {
  width: min(300px, 100%);
  min-height: 250px;
  justify-self: center;
}

.sponsored-size {
  color: #35598e;
  font-size: 0.78rem;
  font-weight: 700;
}

.sponsored-copy {
  margin-top: 4px;
  color: #536987;
  font-size: 0.82rem;
}

.sponsored-note {
  margin: 8px 0 0;
  color: #4a5b73;
  font-size: 0.81rem;
}

.sponsored-subnote {
  margin: 6px 0 0;
  color: #60718b;
  font-size: 0.78rem;
}

.sequence-section {
  margin-bottom: 14px;
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.section-copy {
  margin: 0;
  color: #576a84;
  font-size: 0.89rem;
  line-height: 1.6;
}

.lane-stack {
  display: grid;
  gap: 10px;
}

.lane {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 12px 10px;
  animation: rise-in 0.32s ease;
}

.lane h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lane-badge {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(22, 33, 54, 0.08);
  color: #21395f;
}

.lane.today {
  background: var(--today);
}

.lane.week {
  background: var(--week);
}

.lane.after {
  background: var(--after);
}

.action {
  border: 1px solid #d0d7e1;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  margin-bottom: 8px;
}

.action:last-child {
  margin-bottom: 0;
}

.action-title {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 5px;
}

.action-check {
  margin-top: 2px;
}

.action-reason {
  font-size: 0.9rem;
  color: #3f4b5b;
  line-height: 1.6;
}

.action.is-done {
  opacity: 0.66;
}

.action.is-done .action-title span {
  text-decoration: line-through;
}

.action.is-hidden-by-filter {
  display: none;
}

.conditional-notes {
  margin: 8px 0 0;
  padding-left: 18px;
}

.conditional-notes li {
  margin-bottom: 6px;
  color: #455773;
  font-size: 0.82rem;
  line-height: 1.5;
}

.action-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-links a,
.official-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.83rem;
  text-decoration: none;
  color: #0f5fd4;
  border-bottom: 1px solid rgba(15, 95, 212, 0.35);
}

.official-links {
  margin-top: 12px;
}

.official-links h3,
.notes h3,
.affiliate-section h3 {
  margin: 2px 0 8px;
  font-size: 0.95rem;
}

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

.official-card {
  min-height: 84px;
  border: 1px solid #d7e2f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 11px 12px;
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.official-card:hover {
  border-color: #b8caea;
}

.official-label {
  padding-right: 20px;
  color: #1d3359;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.official-meta {
  color: #577090;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.official-arrow {
  position: absolute;
  right: 12px;
  top: 12px;
  color: #3e6fc0;
}

.note-list {
  margin: 0;
  padding-left: 18px;
}

.note-item {
  margin-bottom: 10px;
  color: #435268;
}

.note-copy {
  font-size: 0.87rem;
  line-height: 1.6;
}

.note-action-btn {
  margin-top: 6px;
  border: 1px solid #c6d4ec;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: #2e538d;
  font-size: 0.8rem;
  font-weight: 700;
}

.note-action-btn[disabled] {
  background: #eef3fb;
  color: #6b7f9f;
  cursor: default;
}

.affiliate-section {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.affiliate-desc {
  margin: 0 0 10px;
  color: #4f5e72;
  font-size: 0.88rem;
}

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

.affiliate-card {
  border: 1px solid #d5deec;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.affiliate-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.affiliate-card h4 {
  margin: 0;
  font-size: 0.9rem;
}

.affiliate-card p {
  margin: 0;
  font-size: 0.86rem;
  color: #445264;
  line-height: 1.55;
}

.affiliate-link {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f5fd4;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}

.affiliate-link::after {
  content: "→";
}

.affiliate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef4ff;
  color: #4668a2;
  font-size: 0.73rem;
  font-weight: 700;
}

.notes {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.loading,
.empty {
  color: #5f6b7a;
  font-size: 0.88rem;
}

.site-note {
  border-radius: 12px;
  background: #fbfdff;
}

.site-note summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: #223a63;
}

.site-note summary::-webkit-details-marker {
  display: none;
}

.site-note summary::after {
  content: "＋";
  float: right;
  color: #4a6fa9;
}

.site-note[open] summary::after {
  content: "−";
}

.site-note-lead {
  margin: 10px 0 0;
  color: #53647d;
  font-size: 0.87rem;
  line-height: 1.6;
}

.loading {
  border: 1px dashed #c7d5ee;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbff;
}

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

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .left-stack {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 18px;
  }

  .hero-inner {
    padding: 16px;
  }

  .count-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .sponsored-slot--result_top .sponsored-frame {
    max-width: 320px;
    min-height: 100px;
  }

  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .toolbar-actions .ghost-btn {
    flex: 1 1 48%;
  }

  .toolbar-feedback {
    margin-left: 0;
  }
}
