@font-face {
  font-family: "Machino Symbols";
  src: url("./assets/symbols.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: light;
  --paper: #f6f7f1;
  --ink: #202d25;
  --muted: #59695f;
  --green: #123e34;
  --line: #e2e8dd;
  --white: #fff;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; }
button { font: inherit; }
h1, h2, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid #247b60; outline-offset: 4px; }
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  flex: 0 0 auto;
  font: normal 24px/1 "Machino Symbols";
  font-feature-settings: "liga";
  text-transform: none;
  white-space: nowrap;
  user-select: none;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: min(100% - 40px, 1064px); margin-inline: auto; }

.site-header { background: #fbfcf8; border-bottom: 1px solid var(--line); }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .top-actions, .location, .refresh { display: flex; align-items: center; }
.brand { gap: 10px; text-decoration: none; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #f1f9e8; background: var(--green); }
.brand-mark .icon { font-size: 23px; }
.brand strong { display: block; font-size: 20px; font-weight: 850; letter-spacing: .05em; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font: 700 9px/1 system-ui, sans-serif; letter-spacing: .21em; }
.top-actions { gap: 12px; }
.location { gap: 4px; padding: 7px 10px; border-radius: 100px; color: #345848; background: #e9f1e5; font-size: 12px; font-weight: 750; white-space: nowrap; }
.location .icon { font-size: 15px; }
.refresh { justify-content: center; gap: 5px; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid #dce5da; background: #fff; color: var(--green); cursor: pointer; font-size: 13px; font-weight: 750; transition: background .18s, transform .18s; }
.refresh .icon { font-size: 19px; }
.refresh:active:not(:disabled) { transform: scale(.94); }
.refresh:disabled { cursor: wait; }
.refresh:disabled .icon { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { padding: 42px 0 0; }
.intro { margin-bottom: 24px; }
.date-label { display: flex; align-items: center; gap: 7px; color: #347157; font-size: 14px; font-weight: 800; letter-spacing: .06em; margin-bottom: 9px; }
.date-label .icon { font-size: 17px; }
h1 { font-size: clamp(36px, 6vw, 62px); letter-spacing: -.055em; line-height: 1.13; font-weight: 850; }
.intro-copy { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.garbage { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--green); border: 1px solid #20493d; border-radius: 24px; box-shadow: 0 10px 24px #153c2e15; }
.garbage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 47%;
  background: radial-gradient(ellipse at 60% 55%, #3b7960 0, transparent 68%), url("./assets/niigata.webp") center / cover no-repeat;
  background-blend-mode: soft-light, normal;
  mask-image: linear-gradient(to right, transparent, #000 25%);
}
.garbage-content { padding: 25px 28px 20px; }
.garbage-header, .card-header { display: flex; align-items: center; gap: 11px; }
.garbage-header h2, .card-header h2 { font-size: 19px; font-weight: 820; letter-spacing: .015em; }
.section-icon { display: grid; width: 41px; height: 41px; flex-shrink: 0; place-items: center; border-radius: 13px; }
.section-icon .icon { font-size: 22px; }
.garbage .section-icon { background: #ffffff20; color: #d4f6b9; }
.district { color: #e0f3dc; border: 1px solid #c9e7d451; padding: 4px 9px; border-radius: 99px; font-size: 11px; letter-spacing: .03em; white-space: nowrap; }
.garbage-body { min-height: 115px; width: min(100%, 600px); display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; margin: 20px 0 16px; }
.garbage-day { min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 10px; padding: 15px 15px 16px; border-radius: 15px; }
.garbage-day.today { background: #eaf6d8; color: #1b3d2e; }
.garbage-day.tomorrow { background: #184b3ff0; border: 1px solid #9bcdb059; }
.garbage-day-heading { display: flex; gap: 8px; align-items: center; color: inherit; }
.day-badge { color: #fff; background: #215443; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 800; }
.tomorrow .day-badge { color: #eaffde; background: #ffffff21; }
.day-date { font-size: 12px; opacity: .92; }
.garbage-list { display: grid; gap: 4px; font-weight: 800; font-size: clamp(18px, 2.5vw, 27px); line-height: 1.35; }
.garbage-day p, .garbage-list { word-break: auto-phrase; }
.today .no-collection { font-size: clamp(17px, 2vw, 22px); font-weight: 800; }
.tomorrow .no-collection, .tomorrow .garbage-list { font-size: 17px; font-weight: 750; }
.garbage-footer, .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; font-variant-numeric: tabular-nums; }
.garbage-footer { color: #d9eee4; }
.garbage-footer > :first-child { display: inline-flex; align-items: center; gap: 4px; }
.garbage-footer .icon { font-size: 15px; color: #d2efb3; }
.garbage-footer strong { color: #edffd8; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.card { --tint: #eef4fc; --accent: #315b83; display: flex; flex-direction: column; min-width: 0; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 3px 9px #303f2b06; }
.card-header { min-width: 0; }
.card-tag { margin-left: auto; background: #f2f5ef; color: var(--muted); font-size: 11px; font-weight: 750; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.card .section-icon { color: var(--accent); background: var(--tint); }
.warning { --tint: #edf4e7; --accent: #496641; }
.earthquake { --tint: #faf0e2; --accent: #825a26; }
.news { --tint: #f0edf7; --accent: #655187; }
.card-body { flex: 1; min-height: 76px; margin: 16px 0; display: grid; align-content: start; }
.card-footer { padding-top: 12px; border-top: 1px solid #e9eee6; color: var(--muted); }
.card-footer > :last-child, .garbage-footer > :last-child { white-space: nowrap; }
.forecast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.forecast { display: flex; flex-direction: column; padding: 12px; border-radius: 13px; background: #f4f7fb; }
.forecast-day { font-size: 12px; color: #3c5a74; }
.condition { display: flex; gap: 7px; align-items: center; min-height: 44px; margin-top: 3px; font-size: 12px; font-weight: 750; line-height: 1.35; }
.condition .icon { font-size: 26px; color: #3a708e; }
.temperature { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; font: 800 23px/1.1 system-ui, sans-serif; letter-spacing: -.04em; }
.high { color: #a34434; }
.low { color: #2a5a86; }
.temp-divider { color: #637587; font-size: 15px; }
.weather-measures { display: flex; flex-wrap: wrap; gap: 3px 9px; margin-top: 9px; font-size: 11px; color: #435468; }
.forecast-advice { margin-top: 9px; padding-top: 7px; border-top: 1px solid #dae5ee; font-size: 11px; font-weight: 750; color: #395a73; }
.status-message { display: flex; width: 100%; align-items: center; gap: 9px; padding: 15px 12px; border-radius: 13px; background: #f1f6ee; color: #3d604b; font-size: 14px; font-weight: 750; }
.status-message .icon { font-size: 21px; }
.load-failed .status-message { background: #f2f3ef; color: #5a655e; }
.garbage-body .status-message, .garbage-body .loading { grid-column: 1 / -1; }
.garbage-body.load-failed .status-message { background: #eef4e7; color: #354c40; }
.warning-list { display: grid; gap: 7px; }
.warning-list li { display: flex; gap: 8px; align-items: center; border-radius: 10px; padding: 9px 11px; font-size: 14px; }
.warning-list .icon { font-size: 19px; }
.warning-list .advisory { color: #7b510d; background: #fff2cf; }
.warning-list .alert, .highlighted { color: #8e362b; background: #fff0eb; }
.feed li + li { border-top: 1px solid #eaeee8; }
.quake-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 7px 8px; }
.quake-row.highlighted { border-radius: 9px; }
.quake-detail { display: flex; flex-direction: column; gap: 3px; }
.quake-place { font-size: 14px; }
.quake-time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.local-quake { font-size: 11px; font-weight: 800; }
.intensity { flex-shrink: 0; padding: 4px 8px; border-radius: 6px; background: var(--tint); color: var(--accent); font-size: 11px; font-weight: 800; }
.highlighted .intensity { background: #f9dcd3; color: #8e362b; }
.news-feed a { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 8px; padding: 8px; font-size: 14px; line-height: 1.5; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; transition: background .18s; }
.news-feed a .icon { color: var(--accent); font-size: 18px; transition: transform .18s; }
.news-feed a:active { background: var(--tint); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 29px; padding: 20px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer strong { color: var(--green); font-size: 14px; }

.loading { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.shimmer-line { min-height: 72px; border-radius: 12px; background: linear-gradient(105deg, #edf1eb 25%, #f6f8f4 45%, #edf1eb 65%) 100% 0 / 220% 100%; animation: shimmer 1.6s ease-in-out infinite; }
.garbage-body .shimmer-line { background: linear-gradient(105deg, #255247 25%, #386855 45%, #255247 65%) 100% 0 / 220% 100%; }
@keyframes shimmer { to { background-position: -100% 0; } }
.card-body > :not(.loading), .garbage-body > :not(.loading) { animation: appear .26s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (hover: hover) {
  .refresh:hover:not(:disabled) { background: #eaf3e7; }
  .news-feed a:hover { background: var(--tint); }
  .news-feed a:hover .icon { transform: translate(2px, -2px); }
}
@media (max-width: 660px) {
  .shell { width: calc(100% - 32px); }
  .topbar { min-height: 64px; }
  .dashboard { padding-top: 26px; }
  .intro { margin-bottom: 19px; }
  .intro-copy { font-size: 14px; margin-top: 8px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; margin-top: 14px; }
  .card { padding: 15px; border-radius: 17px; }
  .garbage { border-radius: 19px; }
  .garbage-content { padding: 16px 14px 15px; }
  .garbage::before { inset: 0 0 auto 42%; height: 100px; opacity: .65; mask-image: linear-gradient(to right, transparent, #000 52%); }
  .garbage-body { grid-template-columns: 1.24fr 1fr; gap: 8px; margin: 14px 0 13px; }
  .garbage-day { padding: 12px 9px; border-radius: 12px; }
  .garbage-day-heading { gap: 5px; }
  .garbage-list { font-size: clamp(16px, 4.3vw, 21px); }
  .tomorrow .no-collection, .tomorrow .garbage-list { font-size: 15px; }
  .garbage-header, .card-header { gap: 8px; }
  .garbage-header h2, .card-header h2 { font-size: 17px; }
  .section-icon { width: 36px; height: 36px; border-radius: 11px; }
}
@media (max-width: 370px) {
  .refresh-label { display: none; }
  .garbage-body { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
