@font-face {
  font-family: system;
  src: local("Noto Sans JP");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  --bg: #cfc5a0;
  --ink: #303020;
  --green: #535531;
  --hill: #8c895e;
  --sky: #bdb288;
  --grain: 1;
  color: var(--ink);
  background: var(--bg);
  font-family:
    system,
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  font-synthesis: none;
}
body {
  margin: 0;
  background: var(--bg);
  transition: background 700ms ease;
  color: var(--ink);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  min-height: 44px;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button:active {
  transform: translateY(1px);
}
.shell {
  max-width: 580px;
  margin: auto;
  padding: 0 28px;
}
.shell header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  padding-top: env(safe-area-inset-top);
  gap: 12px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.wordmark svg {
  width: 25px;
  height: 25px;
}
.edition {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.heading {
  padding: 25px 0 22px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  margin: 0 0 19px;
}
h1 {
  font-size: clamp(34px, 8vw, 46px);
  line-height: 1.48;
  letter-spacing: -0.065em;
  margin: 0;
  font-weight: 800;
}
p {
  line-height: 1.9;
}
.quiet {
  font-size: 13px;
  margin: 17px 0 0;
}
.landscape {
  height: 216px;
  position: relative;
  overflow: hidden;
  margin: 0 -28px;
}
.landscape svg {
  width: 100%;
  height: 100%;
  display: block;
}
.landscape svg * {
  transition: fill 700ms ease;
}
.scene-caption {
  position: absolute;
  bottom: 17px;
  right: 25px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #fffef1;
  background: #303b2a;
  padding: 7px 10px;
}
.count-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 0 17px;
  font-size: 13px;
}
.count-line strong {
  display: inline-block;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.count-line > span:last-child {
  font-size: 12px;
}
.count-line b {
  font-size: 15px;
  font-weight: 600;
}
.save-button {
  width: 100%;
  min-height: 68px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--bg);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  transition:
    background 500ms,
    transform 150ms;
}
.save-button > span {
  font-size: 27px;
  font-weight: 400;
}
.save-button:hover {
  filter: brightness(1.12);
}
.smoked {
  display: block;
  margin: 3px auto 8px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-width: 100px;
}
.reclaimed {
  border-top: 1px solid #30302038;
  padding-top: 21px;
}
.money > span,
.time-stats span {
  font-size: 12px;
  letter-spacing: 0.03em;
}
.money > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
}
.money strong {
  font-size: 45px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.money small {
  font-size: 23px;
}
.time-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.time-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.time-stats strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.info {
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  font-size: 11px;
  position: relative;
  margin-left: 4px;
}
.info:after {
  content: "";
  position: absolute;
  inset: -12px;
}
.share-link {
  margin: 19px 0 5px;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.share-link span {
  margin-left: 8px;
}
.share-actions {
  display: grid;
  grid-template-columns: max-content;
  gap: 16px;
  margin: 18px 0 4px;
}
.share-actions .share-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  text-align: left;
  font-size: 12px;
  line-height: 1.8;
}
.share-actions .share-link span {
  margin-left: 0;
}
.world-copy {
  font-size: 11px;
  line-height: 1.9;
  margin: 24px 0 35px;
  color: var(--ink);
  opacity: 0.8;
}
nav {
  position: sticky;
  bottom: 0;
  display: flex;
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid #30302038;
  z-index: 5;
}
nav button {
  flex: 1;
  font-size: 12px;
  position: relative;
  opacity: 0.6;
}
nav button[aria-current] {
  opacity: 1;
  font-weight: 700;
}
nav button[aria-current]:before {
  content: "";
  position: absolute;
  top: 1px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  left: calc(50% - 2px);
}
.page {
  padding: 32px 0;
  min-height: calc(100svh - 154px);
}
.page h1 {
  font-size: 32px;
  margin-bottom: 28px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.025em;
  margin: 28px 0 15px;
}
.tabs,
.minute-options {
  display: flex;
  gap: 8px;
}
.tabs button,
.minute-options button {
  flex: 1;
  border: 1px solid #30302040;
  border-radius: 2px;
  font-size: 13px;
}
.tabs button[aria-pressed="true"],
.minute-options button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.record-count {
  margin: 34px 0 25px;
  font-size: 14px;
}
.record-count strong {
  font-size: 70px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}
.event-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #30302025;
  font-size: 12px;
}
.event-list b {
  font-weight: 500;
}
.event-list small {
  margin-left: 8px;
}
.setting-row {
  padding: 21px 0;
  border-bottom: 1px solid #30302030;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setting-row > span,
.setting-row > label {
  font-size: 13px;
  font-weight: 600;
}
.setting-row small,
.footnote {
  font-size: 11px;
  line-height: 1.9;
}
.setting-row h2,
.setting-row p {
  margin: 0;
}
.setting-row p {
  font-size: 13px;
}
.setting-row button {
  text-align: left;
}
.setting-row .minute-options button {
  text-align: center;
}
.setting-row select {
  padding: 12px;
  background: transparent;
  border: 1px solid #30302050;
  border-radius: 2px;
}
#change-product {
  padding: 0;
  display: flex;
  justify-content: space-between;
  text-align: left;
  font-size: 16px;
}
.setting-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 19px 0;
  border-bottom: 1px solid #30302030;
  font-size: 13px;
}
.delete {
  margin: 25px 0;
  color: #71392b;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button {
  padding: 6px 12px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.setting-row .text-button {
  align-self: flex-start;
}
#time-form {
  display: flex;
  gap: 8px;
}
#minutes {
  max-width: 110px;
}
.footnote {
  margin: 20px 0;
}
.onboarding main {
  padding: 25px 0 40px;
}
.intro {
  font-size: 13px;
  margin: 18px 0 35px;
}
.step {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 28px 0 20px;
  display: flex;
  gap: 16px;
}
.step span {
  font-size: 14px;
  letter-spacing: 0;
}
.search-label {
  display: block;
  font-size: 12px;
  margin-bottom: 10px;
}
input {
  border: 1px solid #30302060;
  border-radius: 2px;
  background: #ffffff20;
  min-height: 48px;
  padding: 12px;
  width: 100%;
  font-size: 16px;
}
input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
input::placeholder {
  color: var(--ink);
  opacity: 0.65;
}
.filters {
  display: flex;
  gap: 5px;
  overflow: auto;
  margin: 9px 0;
}
.filters button {
  white-space: nowrap;
  font-size: 11px;
  padding: 0 10px;
}
.filters [aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  font-weight: 700;
}
.products {
  max-height: 225px;
  overflow: auto;
  border-top: 1px solid #30302030;
  border-bottom: 1px solid #30302030;
}
.products > button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid #30302020;
  font-size: 13px;
}
.products > button[aria-pressed="true"] {
  background: #ffffff35;
}
.products small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  font-weight: 400;
}
.products b {
  font-size: 17px;
  white-space: nowrap;
}
.products b small {
  display: inline;
  margin-left: 3px;
}
.manual {
  margin-top: 8px;
  font-size: 12px;
}
.manual summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.manual label {
  display: block;
  margin: 12px 0;
}
.manual input {
  margin-top: 5px;
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.selection {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  border-left: 2px solid var(--ink);
  padding-left: 12px;
  margin-top: 16px;
}
.selection:empty {
  display: none;
}
.selection b {
  font-size: 14px;
}
.tone-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tone-choices button {
  border: 1px solid #30302040;
  text-align: left;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tone-choices b {
  font-size: 16px;
}
.tone-choices span {
  font-size: 10px;
}
.tone-choices [aria-pressed="true"] {
  border-color: var(--ink);
  background: #ffffff25;
}
.start {
  margin-top: 28px;
  font-size: 16px;
}
#notice {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 15px 20px;
  border-radius: 3px;
  max-width: calc(100vw - 32px);
  width: max-content;
  font-size: 12px;
  line-height: 1.8;
  z-index: 30;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  background: var(--bg);
  color: var(--ink);
  border: 0;
  border-radius: 5px;
  max-width: 500px;
  width: calc(100% - 28px);
  max-height: 88svh;
  padding: 28px;
  overflow: auto;
}
dialog::backdrop {
  background: #18201580;
  backdrop-filter: blur(4px);
}
dialog p {
  font-size: 14px;
  line-height: 1.95;
}
dialog h2 {
  font-size: 23px;
  margin: 16px 25px 20px 0;
}
dialog a {
  font-size: 13px;
}
.close {
  position: absolute;
  right: 10px;
  top: 7px;
  font-size: 26px;
  width: 44px;
}
.danger-button {
  background: #71392b;
  color: white;
  width: 100%;
  padding: 14px;
  border-radius: 2px;
  margin: 15px 0;
}
.share-preview {
  width: 100%;
  max-height: 52svh;
  object-fit: contain;
  margin: 0 0 18px;
}
.share-periods {
  margin: 0 0 16px;
}
.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-top: 10px;
}
.share-options button {
  text-align: left;
  border-bottom: 1px solid #30302030;
  padding: 10px 0;
  font-size: 13px;
}
.share-hint {
  font-size: 12px;
  line-height: 1.8;
}
#share-copy-fallback label {
  display: block;
  margin: 12px 0 8px;
  font-size: 12px;
}
#share-copy-text {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: transparent;
  border: 1px solid #30302060;
  padding: 12px;
}
.ripple {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #83b97835;
  pointer-events: none;
  z-index: 20;
  animation: clean 0.75s ease-out forwards;
}
.ripple.milestone {
  animation-duration: 1s;
  background: #e7ffe360;
}
.loading,
.fatal {
  padding: 80px 30px;
  max-width: 600px;
  margin: auto;
}
.loading {
  font-size: 25px;
  font-weight: bold;
}
.loading span {
  display: block;
  font-size: 13px;
  margin-top: 15px;
  font-weight: 400;
}
.fatal h1 {
  font-size: 30px;
}
.fatal button {
  border: 1px solid;
  padding: 10px 20px;
}
@keyframes clean {
  from {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) scale(65);
    opacity: 0;
  }
}
@media (min-width: 760px) {
  body {
    background: color-mix(in srgb, var(--bg) 80%, #89917d);
  }
  .shell {
    background: var(--bg);
    min-height: 100svh;
    padding: 0 42px;
  }
  .landscape {
    margin: 0 -42px;
    height: 260px;
  }
  .heading {
    padding: 32px 0;
  }
  .shell header {
    height: 96px;
  }
  .edition {
    font-size: 10px;
  }
  .world-copy {
    margin-bottom: 35px;
  }
}
@media (max-width: 360px) {
  .shell {
    padding: 0 20px;
  }
  .landscape {
    margin: 0 -20px;
  }
  .edition {
    font-size: 8px;
  }
  .tone-choices span {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .ripple {
    display: none;
  }
}

/* Small editorial chart: no extra cards, one shared period selector. */
.patterns { margin: 36px 0; padding: 22px 0; border-block: 1px solid currentColor; }
.patterns h2 { margin-top: 0; }
.histogram { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); height: 124px; gap: 2px; align-items: end; }
.histogram button { position: relative; padding: 0; height: 100%; border: 0; background: transparent; min-width: 0; border-radius: 0; }
.histogram button span { display: block; position: absolute; bottom: 0; width: 100%; height: max(2px, var(--bar-height)); background: var(--green); opacity: var(--bar-opacity); pointer-events: none; }
.histogram button:focus-visible, .histogram button[aria-pressed=true] { outline: 2px solid var(--ink); outline-offset: 1px; }
.hour-axis { display: flex; justify-content: space-between; font-size: 11px; padding-top: 8px; }
.peak-label { font-size: 12px; margin: 20px 0 0; }
.peak-label strong { display: block; margin-top: 8px; font-size: 17px; font-weight: 500; }
.public-links { position: static; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 20px 0; margin: 12px 0; border-top: 1px solid currentColor; background: none; box-shadow: none; font-size: 12px; width: auto; transform: none; }
.public-links a { padding: 8px 0; color: inherit; text-underline-offset: 4px; }
.advert { margin: 64px 0 32px; }
.advert.pending { height: 0; margin: 0; overflow: hidden; }
.advert-frame { width: 100%; height: 300px; border: 0; }
.article { max-width: 640px; margin: auto; padding: 32px 24px calc(40px + env(safe-area-inset-bottom)); line-height: 1.95; }
.article h1 { font-size: clamp(26px, 7vw, 40px); margin: 36px 0; }
.article h2 { margin-top: 32px; font-size: 20px; }
.article a { color: inherit; overflow-wrap: anywhere; }
.article p { margin: 16px 0; }
.intro { overflow-wrap: anywhere; text-wrap: pretty; }


:is(#home-banner,#record-banner).advert { margin:0; padding:12px 0; overflow:hidden; }
:is(#home-banner,#record-banner)[hidden] { display:none; }

:is(#home-banner,#record-banner) > p { font-size:10px; line-height:1.5; margin:0 0 8px; opacity:.65; }
:is(#home-banner,#record-banner) ins { text-decoration:none; }
