:root {
  color-scheme: light;
  --ink: #302015;
  --quiet: #66594f;
  --ivory: #f4ead6;
  --weekly: #faf6ee;
  --line: #dfcfb0;
  --border: #a38e70;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", "Meiryo", serif;
  font: 16px/1.6 system-ui, "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: #f7f5f0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { max-width: 500px; min-height: 100dvh; margin: auto; background: #fff; }
.topbar { position: relative; z-index: 2; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; min-height: 64px; padding: env(safe-area-inset-top) 8px 0; border-bottom: 1px solid var(--line); background: #fff; }
h1, h2, h3, .wordmark, .submit, .stats strong { font-family: var(--serif); }
h1, h2, h3, p, figure { margin: 0; }
.wordmark { font-weight: 700; font-size: 25px; text-align: center; grid-column: 2; grid-row: 1; line-height: 1.25; }
.topbar > :first-child { grid-column: 1; grid-row: 1; }
.topbar .wordmark { grid-column: 2; grid-row: 1; }
.topbar .right { grid-column: 3; grid-row: 1; }
.menu { position: absolute; top: 100%; left: 8px; width: min(230px, calc(100% - 16px)); padding: 6px; border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: white; box-shadow: 0 8px 18px #30201518; }
.menu a { display: flex; align-items: center; min-height: 46px; padding: 8px 12px; }
a { color: inherit; }
a.plain, .menu a, .tab { text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, summary, .tab { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #795537; outline-offset: 3px; }
.icon-button { min-height: 46px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 8px; }
.icon { width: 24px; height: 24px; flex: none; }
main { min-width: 0; overflow-wrap: anywhere; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.feed-title { padding: 18px 16px 16px; font-size: 29px; line-height: 1.3; }
.feed-card + .feed-card { border-top: 1px solid var(--line); padding-top: 16px; }
.card-link { display: block; }
.photo { width: 100%; display: block; object-fit: cover; background: var(--weekly); }
.hero { aspect-ratio: 1; }
.thumbnails {
  display: flex;
  gap: 8px;
  margin-left: 16px;
  padding: 8px 16px 4px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.thumbnail {
  flex: 0 0 44%;
  min-width: 0;
  min-height: 44px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: #fff;
}
.thumbnail[aria-pressed=true] { border-color: var(--ink); }
.thumbnail:focus-visible { outline-offset: -2px; }
.thumbnail .photo { aspect-ratio: 4 / 3; border-radius: 2px; }
.card-body { padding: 12px 16px 0; }
.place { font-size: 27px; line-height: 1.3; margin-bottom: 5px; }
.note { white-space: pre-wrap; }
.sample, .help, .empty { color: var(--quiet); font-size: .875rem; }
.sample { margin-top: 5px; }
.actions { display: flex; gap: 10px; padding: 14px 16px 15px; }
.actions > * { flex: 1; min-width: 0; }
.action, .submit, .choose, .hint { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 7px 9px; border-radius: 10px; border: 1px solid transparent; background: var(--ivory); color: var(--ink); text-decoration: none; text-align: center; }
.action[aria-pressed=true] { border-color: var(--border); }
.action[aria-pressed=true] .icon { fill: var(--ink); }
.tabs { position: fixed; z-index: 1; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 500px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 5px 10px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.tab { min-height: 52px; display: flex; gap: 1px; flex-direction: column; justify-content: center; align-items: center; border-radius: 12px; font-size: .875rem; }
.tab[aria-current=page] { background: var(--ivory); }
.shell:has(input:focus, textarea:focus) .tabs { visibility: hidden; }
.content { padding: 16px 16px 0; }
.stack { display: grid; gap: 14px; }
.stack > * { min-width: 0; }
.photo-picker { position: relative; }
.photo-picker .photo { aspect-ratio: 4 / 3; border-radius: 3px; }
.choose { position: absolute; bottom: 9px; right: 9px; border-color: var(--border); background: #fff; cursor: pointer; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-input:focus-visible + .choose { outline: 2px solid #795537; outline-offset: 3px; }
.label { display: grid; gap: 5px; }
.label > span:first-child { font-weight: 650; }
.optional { font-weight: 400; font-size: .875rem; color: var(--quiet); }
input:not([type=file]), textarea { width: 100%; min-width: 0; min-height: 46px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; background: #fff; scroll-margin: 14px; }
textarea { resize: vertical; min-height: 88px; }
details { border: 1px solid var(--line); border-radius: 8px; }
details.hints { background: var(--weekly); border-color: transparent; }
summary { cursor: pointer; min-height: 46px; padding: 10px 12px; font-weight: 650; }
details > .stack, .hint-options { padding: 0 12px 12px; }
.hint-options { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { background: white; border-color: var(--line); }
.submit { font-weight: 700; font-size: 25px; min-height: 52px; width: 100%; border-color: var(--border); }
.submit:disabled { opacity: .65; cursor: wait; }
.week { background: var(--weekly); padding: 10px 16px 14px; border-radius: 15px; text-align: center; margin-bottom: 16px; }
.week h2 { font-size: 21px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; padding-top: 8px; }
.stats > :last-child { border-left: 1px solid var(--line); }
.stats strong { font-size: clamp(24px, 8vw, 38px); line-height: 1.25; }
.record { border-top: 1px solid var(--line); padding: 9px 0 12px; }
.record time { display: block; font: 700 18px/1.4 var(--serif); margin-bottom: 7px; }
.record .photo { aspect-ratio: 2.55; border-radius: 4px; margin-bottom: 5px; }
.record .place { font-size: 20px; }
.metadata, .comment-section { border-top: 1px solid var(--line); padding-top: 12px; }
.metadata dl { margin: 0; }
.metadata dt { font-weight: 650; }
.metadata dd { margin: 0 0 8px; white-space: pre-wrap; }
.comments { list-style: none; padding: 0; margin: 0; }
.comments li { padding: 10px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; }
.comment-section h2 { font-size: 21px; }
.notice { position: fixed; z-index: 3; bottom: calc(78px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 460px); padding: 9px 12px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.error { color: #8b3020; font-size: .9rem; }
.invitation-page { padding-top: 20px; gap: 16px; }
.invitation-page h2 { font-size: 23px; line-height: 1.4; }
.invitation-page h3 { font-size: 19px; }
.invitation-primary { border-color: var(--border); font-weight: 700; min-height: 50px; }
.invitation-panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--weekly); }
.invitation-card { display: grid; gap: 8px; }
.invitation-card .sample { margin: 0; }
.invitation-card span { text-decoration: underline; text-underline-offset: 3px; font-size: .875rem; }
.invitation-panel .action:disabled { cursor: default; background: #fff; border-color: var(--line); }
.preview-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--quiet); font-size: .875rem; text-underline-offset: 3px; }
@media (min-width: 501px) { .shell { box-shadow: 0 0 32px #30201514; } }

.tabs .tab { text-align: center; }
.photo-previews { display: flex; gap: 8px; overflow-x: auto; }
.photo-previews img { flex: 0 0 36%; width: 36%; aspect-ratio: 1; object-fit: cover; }
select { min-height: 46px; font: inherit; color: inherit; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 8px; }
.release-footer { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 14px 16px calc(78px + env(safe-area-inset-bottom)); font-size: .875rem; }
.policy-consent { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.policy-consent input[type=checkbox] { width: 20px; min-height: 20px; flex: 0 0 20px; }

.shell { display: flex; flex-direction: column; }
.shell > main { flex: 1; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.shell:has(.release-footer) > main { padding-bottom: 20px; }
.release-footer { border-top: 1px solid var(--line); color: var(--quiet); font-size: .8125rem; }
.release-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabs .tab { font-size: .8125rem; min-height: 52px; }
.site-menu { position: relative; grid-area: 1 / 1; border: 0; }
.site-menu summary { display: grid; place-items: center; padding: 0; min-height: 46px; list-style: none; border-radius: 8px; font: 20px/1 sans-serif; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary { background: var(--weekly); }
.site-menu nav { position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; width: max-content; min-width: 160px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 18px #30201518; padding: 4px; }
.site-menu nav a { display: flex; align-items: center; min-height: 44px; padding: 5px 12px; text-decoration: none; }
.first-walk { margin: 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--weekly); }
.first-walk img { display: block; width: 100%; height: auto; aspect-ratio: 1.7; object-fit: cover; }
.first-walk-body { display: grid; gap: 8px; padding: 14px 16px 12px; }
.first-walk h2 { font-size: 24px; line-height: 1.3; }
.first-walk-cta { margin-top: 4px; min-height: 49px; border-color: var(--border); font-weight: 700; }
.secondary-link { display: flex; min-height: 44px; align-items: center; justify-content: center; font-size: .875rem; text-underline-offset: 3px; }
