:root {
  color-scheme: light;
  --page-bg: #f6f3ee;
  --ink: #3b302b;
  --muted: #7b706b;
  --accent: #df625b;
  --accent-dark: #bd4540;
  --progress-blue: #2f7fd3;
  --progress-track: rgba(47, 127, 211, 0.14);
  --surface: #ffffff;
  --shadow: 0 12px 30px rgba(59, 48, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-block: 10px;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(246, 243, 238, 0.9) 26rem),
    var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 4px;
  background: var(--progress-track);
}

.progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--progress-blue);
  transition: width 120ms linear;
}

.page {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 12px max(28px, env(safe-area-inset-bottom));
}

.home {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 18px max(36px, env(safe-area-inset-bottom));
}

.home__header {
  margin: 0 0 22px;
}

.home__label {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.home__title {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.home__description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.home__nav {
  display: grid;
  gap: 10px;
}

.home__link {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 128px;
  padding: 12px;
  border-radius: 8px;
  color: inherit;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.home__thumbnail {
  display: block;
  width: 104px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #e9f6fb;
}

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

.home__thumbnail-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--progress-blue);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.home__link-body {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.home__link-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.home__link-day {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 28px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.home__link-title {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.home__link-summary {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.home__link-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.slides {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slide {
  display: grid;
  place-items: center;
  padding: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.empty-content {
  display: grid;
  place-items: center;
  min-height: min(78vh, 560px);
  padding: 32px 18px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.empty-content__day {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.empty-content__title {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.4;
}

.feedback {
  display: grid;
  align-content: center;
  min-height: 280px;
  margin: 10px 0 0;
  padding: 20px 14px max(28px, env(safe-area-inset-bottom));
  scroll-snap-align: center;
  scroll-snap-stop: always;
  text-align: center;
}

.feedback__label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.feedback__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0 auto;
}

.feedback__button {
  appearance: none;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  width: 100%;
  min-height: 94px;
  padding: 10px 6px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 22px rgba(189, 69, 64, 0.28);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.feedback__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.feedback__icon svg {
  display: block;
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.feedback__text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback__button:active {
  transform: translateY(1px);
  box-shadow: 0 7px 16px rgba(189, 69, 64, 0.25);
}

.feedback__button--secondary {
  color: var(--ink);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(59, 48, 43, 0.2), 0 8px 18px rgba(59, 48, 43, 0.08);
}

.feedback__button--negative {
  color: #655a55;
  background: #ebe6df;
  box-shadow: inset 0 0 0 1px rgba(59, 48, 43, 0.16);
}

.feedback__button[aria-pressed="true"] {
  background: #655a55;
  color: #ffffff;
  box-shadow: none;
}

.feedback__button:disabled {
  cursor: default;
  transform: none;
}

.feedback__button:disabled:not([aria-pressed="true"]) {
  opacity: 0.48;
  box-shadow: inset 0 0 0 1px rgba(59, 48, 43, 0.14);
}

.feedback__thanks {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

@media (min-width: 560px) {
  .page {
    padding-inline: 18px;
  }
}

@media (max-width: 430px) {
  .home__link {
    grid-template-columns: 88px 1fr;
    gap: 12px;
    min-height: 112px;
  }

  .home__thumbnail {
    width: 88px;
  }

  .home__link-title {
    font-size: 16px;
  }

  .home__link-summary {
    font-size: 12px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  .progress__bar,
  .feedback__button {
    transition: none;
  }
}
