:root {
  color-scheme: light;
  --paper: #f3eddd;
  --paper-deep: #e6dcc8;
  --ink: #24221d;
  --sumi: #2f2c26;
  --muted: #776f61;
  --quiet: #9c927f;
  --line: rgba(79, 68, 51, 0.16);
  --hairline: rgba(79, 68, 51, 0.08);
  --panel: rgba(250, 245, 234, 0.82);
  --panel-strong: rgba(248, 240, 222, 0.9);
  --copper: #a65f2b;
  --moss: #5d6b4e;
  --pine: #384332;
  --rain: #607b89;
  --rain-soft: #d9e4e3;
  --sun: #c89a52;
  --sun-soft: #ead8b3;
  --alert: #9d3f2f;
  --alert-soft: #ead0c4;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px),
    linear-gradient(180deg, var(--hairline) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 252, 244, 0.76), rgba(232, 222, 201, 0.58)),
    var(--paper);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background-image:
    repeating-linear-gradient(90deg, rgba(77, 64, 45, 0.025) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 9px);
}

.shell {
  position: relative;
  min-height: 100vh;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
}

.topline {
  min-height: 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--quiet);
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark,
.quiet-nav,
.fullscreen-button {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-mark {
  justify-self: start;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  letter-spacing: 0.18em;
  text-transform: none;
}

.brand-dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--copper);
  border-radius: 999px;
}

.quiet-nav {
  justify-self: center;
}

.fullscreen-button {
  justify-self: end;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 245, 234, 0.74);
  color: var(--sumi);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: none;
}

.fullscreen-button:active {
  transform: translateY(1px);
}

.fullscreen-icon {
  font-size: 24px;
  line-height: 1;
}

.fullscreen-label {
  white-space: nowrap;
}

.is-fullscreen {
  background-color: var(--paper);
}

.panel,
.guidance,
.alert-band {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(69, 56, 36, 0.07);
}

.hero {
  position: relative;
  min-height: 194px;
  padding: clamp(18px, 2.2vw, 26px) clamp(22px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(230px, 260px) minmax(164px, 180px);
  align-items: center;
  gap: 20px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(250, 246, 236, 0.94), rgba(241, 232, 212, 0.76)),
    var(--panel-strong);
}

.hero::before {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 44%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(166, 95, 43, 0.5) 12%, transparent 44%);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--copper);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 560px;
  margin-bottom: 8px;
  color: var(--sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: 0;
}

.subtitle {
  max-width: 660px;
  margin-bottom: 8px;
  color: #343026;
  font-size: clamp(28px, 2.8vw, 34px);
  font-weight: 760;
  line-height: 1.1;
}

.haiku-line {
  margin: 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-style: italic;
}

.hero-art {
  position: relative;
  justify-self: stretch;
  width: min(100%, 260px);
  height: 150px;
  margin-left: auto;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  background:
    linear-gradient(90deg, rgba(89, 74, 52, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(89, 74, 52, 0.045) 1px, transparent 1px),
    rgba(232, 220, 194, 0.44);
  background-size: 38px 38px, 38px 38px, auto;
  overflow: hidden;
}

.vertical-note {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  color: var(--quiet);
  font-size: 18px;
  letter-spacing: 0.11em;
  line-height: 1.5;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.weather-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.enso-stroke {
  fill: rgba(244, 235, 215, 0.35);
  stroke: rgba(166, 95, 43, 0.28);
  stroke-width: 1.25;
}

.wash-sun {
  fill: rgba(200, 154, 82, 0.26);
}

.bamboo {
  fill: none;
  stroke: var(--moss);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.leaf {
  fill: none;
  stroke: var(--moss);
  stroke-linecap: round;
  stroke-width: 1.45;
}

.wind-thread {
  fill: none;
  stroke: rgba(47, 44, 38, 0.44);
  stroke-linecap: round;
  stroke-width: 1.45;
}

.wind-thread.thin {
  stroke: rgba(47, 44, 38, 0.28);
  stroke-width: 1;
}

.cloud-ink {
  fill: rgba(250, 245, 234, 0.42);
  stroke: var(--sumi);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
}

.cloud-accent {
  fill: none;
  stroke: rgba(47, 44, 38, 0.8);
  stroke-linecap: round;
  stroke-width: 2.1;
}

.rain-stroke {
  fill: none;
  stroke: var(--rain);
  stroke-linecap: round;
  stroke-width: 2.5;
}

.rain-stroke.copper {
  stroke: var(--copper);
}

.ground-line {
  fill: none;
  stroke: rgba(47, 44, 38, 0.62);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.jp-title {
  fill: var(--sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.ink-title {
  fill: var(--sumi);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 700;
}

.hanko {
  fill: rgba(166, 95, 43, 0.12);
  stroke: rgba(166, 95, 43, 0.64);
  stroke-width: 1.2;
}

.hanko-text {
  fill: var(--copper);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 23px;
  font-weight: 700;
  text-anchor: middle;
}

.art-current-icon {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(166, 95, 43, 0.42);
  border-radius: 999px;
  background: rgba(250, 245, 234, 0.82);
  color: var(--sumi);
  font-size: 25px;
  line-height: 1;
}

.now-block {
  position: relative;
  z-index: 1;
  justify-self: end;
  min-width: 164px;
  text-align: right;
}

.temp {
  color: var(--sumi);
  font-size: clamp(76px, 7.6vw, 98px);
  font-weight: 860;
  line-height: 0.88;
  letter-spacing: 0;
}

.feels {
  margin-top: 10px;
  color: var(--muted);
  font-size: 26px;
  font-weight: 760;
  line-height: 1.05;
}

.alert-band {
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(157, 63, 47, 0.12), rgba(250, 245, 234, 0.86)),
    var(--alert-soft);
  border-color: rgba(157, 63, 47, 0.28);
}

.alert-title {
  color: var(--alert);
  font-size: 27px;
  font-weight: 900;
}

.alert-copy {
  font-size: 29px;
  line-height: 1.12;
  font-weight: 820;
}

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

.guidance {
  min-height: 136px;
  padding: 15px 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}

.guidance h2,
.section-head h2,
.details h2 {
  margin-bottom: 8px;
  color: var(--sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.guidance p {
  margin-bottom: 0;
  color: #332f27;
  font-size: 24px;
  font-weight: 730;
  line-height: 1.13;
}

.tile-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sumi);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  font-size: 27px;
  background: rgba(255, 250, 240, 0.62);
}

.heat .tile-icon {
  color: var(--copper);
  background: var(--sun-soft);
}

.storm .tile-icon {
  color: var(--rain);
  background: var(--rain-soft);
}

.action .tile-icon {
  color: var(--pine);
  background: #dde5d4;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.58fr);
  gap: 10px;
}

.forecast-panel,
.side-stack .panel {
  padding: 16px;
}

.side-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.side-stack .section-head {
  display: block;
}

.side-stack .section-head h2 {
  margin-bottom: 10px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 760;
}

.forecast-list {
  display: grid;
  gap: 8px;
}

.forecast-day {
  display: grid;
  grid-template-columns: minmax(156px, 0.32fr) minmax(0, 1fr) minmax(138px, 0.24fr);
  gap: 18px;
  align-items: center;
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 252, 244, 0.5);
}

.day-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
}

.day-name {
  color: var(--sumi);
  font-size: 26px;
  font-weight: 880;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.day-icon {
  color: var(--sumi);
  font-size: 32px;
  text-align: center;
}

.day-summary {
  color: #302c25;
  font-size: 25px;
  font-weight: 760;
  line-height: 1.06;
  min-width: 0;
}

.day-measure {
  display: grid;
  gap: 9px;
  justify-items: end;
}

.day-temp {
  color: var(--sumi);
  font-size: 29px;
  font-weight: 900;
  white-space: nowrap;
}

.concern {
  justify-self: end;
  min-width: 118px;
  padding: 7px 9px;
  border: 1px solid rgba(93, 107, 78, 0.22);
  border-radius: 999px;
  color: var(--pine);
  background: #dde5d4;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}

.concern.hot {
  color: #855221;
  border-color: rgba(166, 95, 43, 0.24);
  background: var(--sun-soft);
}

.concern.storm-watch,
.concern.rain {
  color: #3f6472;
  border-color: rgba(96, 123, 137, 0.28);
  background: var(--rain-soft);
}

.hourly {
  display: grid;
  gap: 7px;
}

.hour {
  display: grid;
  grid-template-columns: 76px 32px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  color: #302c25;
  font-size: 20px;
  font-weight: 800;
}

.rain-pill {
  padding: 5px 7px;
  border-radius: 999px;
  color: #3f6472;
  background: var(--rain-soft);
  text-align: center;
}

.details dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.details dl div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.details dt {
  color: var(--muted);
  font-size: 21px;
  font-weight: 820;
}

.details dd {
  margin: 0;
  color: var(--sumi);
  font-size: 24px;
  font-weight: 850;
}

@media (max-width: 900px) {
  .shell {
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .topline {
    grid-template-columns: 1fr auto;
  }

  .quiet-nav {
    display: none;
  }

  .fullscreen-button {
    justify-self: end;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero::before {
    display: none;
  }

  .hero-art {
    height: 180px;
  }

  .now-block {
    justify-self: stretch;
    text-align: left;
  }

  .brief-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .alert-band {
    grid-template-columns: 1fr;
  }

  .forecast-day {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .day-cell {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .day-measure {
    justify-items: start;
  }

  .day-temp,
  .concern {
    justify-self: start;
  }
}
