/* Japan Journal 2026 — cherry blossom & shrine theme */
:root {
  --paper: #FFF6F3; --card: #FFFCFA; --blush: #FCE8E8; --line: #F2D3D3; --line-2: #E8BFC1; --dash: #D99AA0;
  --ink: #3A2320; --ink-2: #7A4E4A; --ink-3: #5A3934;
  --red: #C73E2B; --red-dark: #9E2E1F; --sakura: #F7BFC5; --sakura-deep: #E07A8B;
  --sky: #DCEBF0; --navy: #2F4A73; --gold: #8A6A22;
  --head: 'Kaisei Decol', serif; --body: 'M PLUS Rounded 1c', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--body); }
a { color: var(--red); } a:hover { color: var(--red-dark); }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.hide { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); } .small { font-size: 13px; } .strong { font-weight: 700; } .normal { font-weight: 500; }
.italic { font-style: italic; } .center { text-align: center; } .mono { font-family: ui-monospace, monospace; font-size: 14px; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack-xs, .stack-sm, .stack, .stack-lg { display: flex; flex-direction: column; }
.stack-xs { gap: 2px; } .stack-sm { gap: 10px; } .stack { gap: 16px; } .stack-lg { gap: 26px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .row-gap-sm { display: flex; gap: 6px; }
.inline { display: inline; margin: 0; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic .fill { fill: currentColor; stroke: none; }
.iconline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.defs { position: absolute; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* Type */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 3px; color: var(--red); }
.eyebrow-sm { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--red); }
.eyebrow-sm.danger { color: var(--red-dark); }
.display { margin: 0; font: 700 clamp(44px, 7vw, 68px)/1.02 var(--head); letter-spacing: -1px; }
.display-md { margin: 0; font: 700 clamp(34px, 5vw, 52px)/1.08 var(--head); }
.display-sm { margin: 0; font: 700 36px/1.15 var(--head); }
.h2 { margin: 0; font: 700 clamp(30px, 4vw, 40px)/1.2 var(--head); }
.h2-sm { margin: 0; font: 700 24px/1.3 var(--head); }
.h3 { margin: 0; font: 700 24px/1.25 var(--head); }
.lede { margin: 0; font-size: 18px; color: var(--ink-2); max-width: 560px; }
.lede-sm { margin: 0; font-size: 16px; color: var(--ink-3); }
.jp { font-family: var(--head); font-size: .85em; color: var(--ink-2); }
.label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.label-sm { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; background: none; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; } .btn-xs { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-lg { min-height: 56px; font-size: 17px; }
.btn-block { width: 100%; border-radius: 18px; }
.btn-dark { background: var(--ink); color: var(--paper); } .btn-dark:hover { background: #523430; color: var(--paper); }
.btn-red { background: var(--red); color: #fff; } .btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; } .btn-ghost:hover { background: var(--blush); color: var(--ink); }
.btn-outline-red { border-color: var(--red); color: var(--red-dark); } .btn-outline-red:hover { background: var(--blush); }
.btn-on-dark { border-color: #6B3F33; color: var(--paper); } .btn-on-dark:hover { background: #3A2320; color: #fff; }
.link-btn { border: 0; background: none; padding: 8px; font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.link-btn.danger, .danger { color: var(--red-dark); }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; background: #3A2320; color: var(--paper); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.round-lg { width: 56px; height: 56px; }
.round-btn:hover { color: #fff; background: #523430; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--red); background: var(--blush); padding: 3px 7px; border-radius: 999px; vertical-align: 2px; }
.pill { background: rgba(58,35,32,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill-red { background: var(--red); letter-spacing: 1px; font-size: 11px; }

/* Forms */
input[type=text], input[type=email], select, textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line-2); border-radius: 16px; background: #fff; font-size: 16px; }
textarea { resize: vertical; line-height: 1.6; }
.title-input { border: 0 !important; border-bottom: 2px solid var(--ink) !important; border-radius: 0 !important; background: transparent !important; padding: 8px 0 !important; font: 700 clamp(28px, 4vw, 40px) var(--head) !important; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check input, .radio-card input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.radio-card > span { display: flex; flex-direction: column; }
fieldset { margin: 0; padding: 0; border: 0; }
.alert { margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--blush); color: var(--red-dark); font-weight: 700; }
.notice { margin: 0; display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 16px; background: #E3EED8; color: #3F5A2A; font-weight: 700; }
.note-box { display: flex; gap: 12px; padding: 16px; border-radius: 20px; background: var(--blush); font-size: 14px; color: var(--ink-3); }
.note-box .ic { color: var(--red); margin-top: 2px; }

/* Cards & avatars */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 24px; box-shadow: 0 10px 30px -24px rgba(199,62,43,.6); }
.card-flat { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.card-flat.dashed { border-style: dashed; border-color: var(--dash); }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar-sm { width: 34px; height: 34px; font-size: 14px; }
.av-blue { background: var(--sky); color: var(--navy); } .av-green { background: #E3EED8; color: #3F5A2A; }
.av-grey { background: #EEE6E4; color: #7A6A67; } .av-dashed { border: 1.5px dashed var(--dash); color: var(--red); }
.stamp { flex: none; border-radius: 50%; border: 2px solid var(--red); color: var(--red); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; transform: rotate(-6deg); }
.stamp-sm { width: 38px; height: 38px; font-size: 15px; transform: none; font-family: var(--body); border-width: 1.5px; }
.stamp-lg { width: 64px; height: 64px; } .stamp-lg .stamp-k { font-size: 24px; line-height: 1; }
.stamp-xl { width: 96px; height: 96px; border-width: 3px; } .stamp-xl .stamp-k { font-size: 38px; line-height: 1; }
.stamp-s { font-size: 11px; }
.empty { padding: 20px; border: 1px dashed var(--dash); border-radius: 22px; color: var(--ink-2); margin: 0; }

/* Header */
/* The header stays at the top while scrolling. Its height is kept in --hdr
   (set by app.js) so anchors and the editor's save bar sit below it. */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 30; transition: transform .22s ease, box-shadow .22s ease; }
.site-header.scrolled { box-shadow: 0 8px 22px -16px rgba(58,35,32,.55); }
.site-header.tucked { transform: translateY(-100%); }
html { scroll-padding-top: calc(var(--hdr, 0px) + 12px); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-badge { width: 48px; height: 48px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 4px var(--sakura); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-badge-lg { width: 68px; height: 68px; box-shadow: 0 0 0 5px var(--sakura); } .brand-badge-lg svg { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font: 700 21px/1.1 var(--head); } .brand-sub { font-size: 12px; color: var(--ink-2); letter-spacing: 2px; }
.torii .t-cap { fill: var(--ink); } .torii-white .t-body { fill: #fff; } .torii-red .t-body { fill: var(--red); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav > a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; }
.nav > a[aria-current=page] { color: var(--ink); font-weight: 700; border-bottom-color: var(--red); }
.nav form { margin-left: 6px; }
.account { position: relative; margin-left: 6px; }
.account summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; cursor: pointer; }
.account summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 40px -20px rgba(58,35,32,.45); padding: 8px; display: flex; flex-direction: column; z-index: 20; }
.menu-head { padding: 12px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 12px; border-radius: 14px; text-decoration: none; color: var(--ink); background: none; border: 0; font-weight: 500; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--blush); }
.menu form { margin: 0; } .menu .danger { color: var(--red-dark); }
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding-top: 26px; padding-bottom: 40px; font-size: 14px; color: var(--ink-2); }
.lockline { display: inline-flex; gap: 10px; align-items: center; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.seigaiha { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave { fill: none; stroke: var(--sakura-deep); stroke-width: 1.2; opacity: .28; }
.branch { position: absolute; top: 0; right: 0; width: 420px; max-width: 60%; height: auto; }
.bl-p { fill: var(--sakura); stroke: var(--sakura-deep); stroke-width: .8; } .bl-c { fill: var(--red); }
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petal { position: absolute; top: -20px; width: 13px; height: 10px; background: var(--sakura); border-radius: 13px 0 13px 0; opacity: .85; animation: fall 14s linear infinite; }
.p1 { left: 70%; } .p2 { left: 82%; animation-delay: -3s; animation-duration: 17s; } .p3 { left: 58%; animation-delay: -7s; animation-duration: 19s; }
.p4 { left: 92%; animation-delay: -10s; } .p5 { left: 40%; animation-delay: -5s; animation-duration: 21s; } .p6 { left: 76%; animation-delay: -12s; animation-duration: 16s; }
@keyframes fall { 0% { transform: translate(0,-20px) rotate(0deg); } 100% { transform: translate(-160px,640px) rotate(540deg); } }
.hero-row { position: relative; display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-end; padding-top: 60px; padding-bottom: 64px; }
.hero-main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.progress { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin-top: 6px; }
.progress-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.bar { height: 8px; background: #F6D9DA; border-radius: 999px; overflow: hidden; } .bar-fill { height: 100%; width: 0; background: var(--red); border-radius: 999px; }
.progress-legs { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.today { flex: 1 1 340px; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.today-head { display: flex; align-items: center; gap: 16px; } .today-text { display: flex; flex-direction: column; gap: 2px; }
.today-place { font: 700 26px var(--head); } .today-plan { margin: 0; font-size: 15px; }

/* Map */
.map-section { background: var(--blush); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 54px 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.legend { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-3); }
.legend li { display: flex; align-items: center; gap: 8px; }
.status { background: var(--ink); color: var(--paper); border-radius: 22px; padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.status-main { flex: 999 1 300px; display: flex; flex-direction: column; gap: 2px; }
.status-title { font: 700 22px var(--head); } .status-sub { font-size: 14px; color: #EFCACB; }
.status-clocks { flex: 1 1 200px; display: flex; flex-direction: column; font-size: 13px; color: #EFCACB; text-align: right; }
.maps { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.map-card { margin: 0; background: #DCEBF0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-2); position: relative; display: flex; flex-direction: column; }
.map-card:first-child { flex: 1 1 240px; max-width: 320px; } .map-card:last-child { flex: 999 1 520px; min-width: 0; }
.map-card figcaption { padding: 16px 18px 0; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: #23395B; }
.map-card:last-child figcaption { position: absolute; top: 16px; left: 18px; padding: 0; }
.map-card svg { width: 100%; height: auto; display: block; }
.sea { fill: #DCEBF0; } .grat { stroke: #C8DCE3; stroke-width: 1; }
.land { fill: #FFF8EE; stroke: #C9A9A0; stroke-width: 1; stroke-linejoin: round; }
.land-o { fill: #FCE8E8; stroke: #C9A9A0; stroke-width: .8; stroke-linejoin: round; }
.cruise-done { fill: none; stroke: var(--red); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.cruise-next { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-dasharray: 1 7; stroke-linecap: round; stroke-linejoin: round; }
.flight-done { fill: none; stroke: #23395B; stroke-width: 2; stroke-linecap: round; }
.flight-next { fill: none; stroke: #23395B; stroke-width: 1.6; stroke-dasharray: 7 6; stroke-linecap: round; }
.train { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-dasharray: 10 5; stroke-linecap: round; }
.train-next { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-dasharray: 10 5; stroke-linecap: round; opacity: .45; }
.port-done { fill: var(--red); stroke: #fff; stroke-width: 2; } .port-next { fill: #fff; stroke: var(--red); stroke-width: 2; }
.stay { fill: #23395B; stroke: #fff; stroke-width: 2; } .stay-next { fill: #fff; stroke: var(--navy); stroke-width: 2; }
.blossom-p { fill: var(--sakura); stroke: var(--sakura-deep); stroke-width: .8; } .blossom-c { fill: var(--red); }
.bud { fill: #fff; stroke: var(--sakura-deep); stroke-width: 2; }
.lbl { font: 700 13px var(--body); fill: var(--ink); paint-order: stroke; stroke: #FFF8EE; stroke-width: 4px; stroke-linejoin: round; }
.lbl-s { font: 700 13px var(--body); fill: var(--ink); paint-order: stroke; stroke: #DCEBF0; stroke-width: 4px; stroke-linejoin: round; }
.jp { }
text.jp { font: 600 11px var(--head); fill: var(--ink-2); paint-order: stroke; stroke: #FFF8EE; stroke-width: 3px; }
.ocean { font: italic 500 13px var(--head); fill: #5F7F8A; letter-spacing: 3px; }
.note { font-weight: 500; font-size: 11px; } .note-blue { fill: #23395B; } .compass-n { font: 700 10px var(--body); fill: var(--ink-2); }
.pulse { fill: var(--red); transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(3.6); opacity: 0; } }
.cloud { fill: #fff; opacity: .85; animation: drift 40s ease-in-out infinite alternate; }
.cloud[data-slow="1"] { animation-duration: 55s; } .cloud[data-slow="2"] { animation-duration: 70s; }
@keyframes drift { 0% { transform: translateX(-30px); } 100% { transform: translateX(40px); } }
.badge { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; }
.hull { fill: var(--red); } .cabin { fill: #fff; stroke: var(--ink); stroke-width: 1; } .funnel { fill: #23395B; } .plane { fill: #23395B; }
.trainbody { fill: #fff; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; } .trainstripe { fill: var(--navy); }
.tag { } svg .tag { fill: var(--red); } .tagtext { font: 700 11px var(--body); fill: var(--paper); }
.wave-none {}

/* Scrubber */
.scrubber { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border-radius: 20px; box-shadow: none; }
.scrub-track { position: relative; flex: 999 1 280px; height: 36px; }
.scrub-rail { position: absolute; left: 0; right: 0; top: 15px; height: 6px; border-radius: 999px; background: #F6D9DA; }
.scrub-fill, .scrub-ghost-fill { position: absolute; left: 0; top: 15px; height: 6px; border-radius: 999px; pointer-events: none; }
.scrub-fill { background: var(--red); } .scrub-ghost-fill { background: var(--sakura-deep); opacity: .35; }
.scrub-ghost-knob { position: absolute; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2.5px dashed var(--sakura-deep); pointer-events: none; }
.scrub-ghost-knob span { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--red); }
input.scrub { position: absolute; inset: 0; width: 100%; height: 36px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
input.scrub::-webkit-slider-runnable-track { height: 36px; background: transparent; }
input.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: 6px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(58,35,32,.35); }
input.scrub::-moz-range-track { background: transparent; }
input.scrub::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(58,35,32,.35); }
.scrub-when { flex: 0 0 16.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-variant-numeric: tabular-nums; }
#scrub-live.live { color: var(--ink-2); } #scrub-live.replay { background: var(--red); color: #fff; border-color: var(--red); }

/* Days */
.days { display: flex; flex-direction: column; gap: 14px; }
.day-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px 8px 20px; margin: 0 -8px; scroll-padding: 0 8px; }
.day-chip { flex: none; width: 116px; min-height: 112px; padding: 12px 10px; border-radius: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer; background: transparent; border: 1px dashed var(--dash); }
.chip-top { display: flex; width: 100%; justify-content: space-between; align-items: center; }
.chip-num { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 1.5px solid var(--red); color: var(--red); }
.chip-ic path { fill: none; stroke: #D99AA0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chip-date { font-size: 12px; font-weight: 700; } .chip-place { font-size: 12px; line-height: 1.25; }
.day-chip.done { background: var(--card); border: 1px solid #EFCACB; }
.day-chip.done .chip-num, .day-chip.today .chip-num { background: var(--red); color: #fff; border-color: var(--red); }
.day-chip.done .chip-ic path { stroke: var(--red); }
.day-chip.today { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.day-chip.today .chip-num { box-shadow: 0 0 0 3px var(--sakura); } .day-chip.today .chip-ic path { stroke: var(--sakura); }
.day-chip[aria-pressed=true] { outline: 3px solid var(--navy); outline-offset: 2px; }
.day-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 18px 22px; box-shadow: none; border-radius: 20px; }
.day-detail-title { font: 700 22px var(--head); } .day-detail-plan { flex: 1 1 320px; font-size: 15px; }

/* Journal */
.journal { padding-top: 60px; padding-bottom: 30px; display: flex; flex-direction: column; gap: 28px; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.entry-wrap { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 20px; }
.entry-wrap .entry-card { flex: 1; }
.order-bar { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.order-bar .muted { flex: 1; }
.order-bar .icon-btn { width: 40px; height: 40px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.entry-card { text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 30px -22px rgba(199,62,43,.6); }
.entry-card:hover { color: var(--ink); border-color: var(--line-2); }
.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 120px 120px; gap: 4px; background: var(--blush); }
.mosaic-1 .mosaic-tile { grid-column: span 2; grid-row: span 2; }
.mosaic-2 .mosaic-tile { grid-row: span 2; }
.mosaic-3 .mosaic-tile:first-child { grid-row: span 2; }
.mosaic-0 { grid-template-columns: 1fr; }
.mosaic-tile, .g-tile { position: relative; overflow: hidden; background: #F6D9DA; }
.mosaic-tile img, .g-tile img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-empty { grid-row: span 2; display: flex; align-items: center; justify-content: center; }
.tile-video { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; z-index: 1; }
.tile-video .ic { width: 34px; height: 34px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.entry-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.entry-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.excerpt { margin: 0; font-size: 15px; color: var(--ink-3); }
.counts { display: flex; align-items: center; gap: 6px; }

/* Entry page */
.admin-bar { background: var(--blush); border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-bar.sticky { position: sticky; top: var(--hdr, 0px); z-index: 20; transition: top .22s ease; }
.site-header.tucked ~ main .admin-bar.sticky { top: 0; }
.admin-bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 44px; padding-bottom: 28px; }
.entry-title-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.prevnext { display: flex; gap: 10px; }
.pn { padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; font-size: 14px; }
.pn-next { text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 8px; border-radius: 28px; overflow: hidden; }
.gallery-1 { grid-template-columns: 1fr; grid-auto-rows: 460px; }
.gallery-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 400px; }
.gallery-3 .g-first, .gallery-4 .g-first, .gallery-5 .g-first { grid-column: span 2; grid-row: span 2; }
.gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-3 .g-first { grid-column: span 2; }
.g-more { position: absolute; inset: 0; background: rgba(58,35,32,.7); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; z-index: 2; }
.g-more-n { font: 700 30px var(--head); }
.entry-body { padding-top: 44px; padding-bottom: 40px; }
.story { max-width: 760px; display: flex; flex-direction: column; gap: 22px; }
.story-lead { margin: 0; font: 400 22px/1.7 var(--head); white-space: pre-line; }
.story-p { margin: 0; font-size: 17px; line-height: 1.8; color: var(--ink-3); white-space: pre-line; }
.comments { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 10px; display: flex; flex-direction: column; gap: 18px; }
.thread { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; box-shadow: none; border-radius: 22px; }
.comment { display: flex; gap: 14px; } .comment.reply { margin-left: 54px; }
.comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.comment-head { font-size: 14px; } .comment-text { white-space: pre-line; overflow-wrap: anywhere; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; margin-left: -8px; }
.inline-edit summary, .reply-box summary { list-style: none; cursor: pointer; } .inline-edit summary::-webkit-details-marker, .reply-box summary::-webkit-details-marker { display: none; }
.inline-edit[open] { flex-basis: 100%; } .inline-edit form { padding: 4px 8px; }
.reply-box { margin-left: 54px; } .reply-box[open] summary { display: none; }

/* Edit page */
.edit-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 36px; padding-bottom: 30px; }
.edit-main { flex: 999 1 600px; min-width: 0; } .edit-side { flex: 1 1 280px; max-width: 360px; }
.media-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.media-item { background: var(--card); border: 2px solid var(--line); border-radius: 22px; overflow: hidden; cursor: grab; }
.media-item.dragging { opacity: .5; } .media-item.over { border-color: var(--red); box-shadow: 0 0 0 4px var(--sakura); }
.media-item.uploading { cursor: default; }

/* Cards you can click or drag: lift with a stronger shadow on hover */
.media-item, .entry-card, .day-chip { transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.entry-card:hover, .entry-card:focus-visible,
.media-item:not(.uploading):not(.dragging):hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -14px rgba(199,62,43,.45), 0 4px 10px -4px rgba(58,35,32,.18);
  border-color: var(--line-2);
}
.day-chip:hover, .day-chip:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px -8px rgba(199,62,43,.45), 0 2px 6px -2px rgba(58,35,32,.18);
}
.day-chip:not(.done):not(.today):hover { background: var(--card); border-style: solid; border-color: var(--line-2); }
.entry-card:active, .day-chip:active { transform: translateY(0); }
.media-thumb { position: relative; height: 150px; background: #F6D9DA; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-pos { position: absolute; top: 10px; left: 10px; z-index: 2; } .media-cover { position: absolute; top: 10px; right: 10px; z-index: 2; display: none; }
.media-item.is-cover .media-cover { display: inline; }
.media-item.is-cover { border-color: var(--sakura-deep); }
.media-tools .btn:disabled { opacity: .45; cursor: default; background: transparent; }
.media-progress { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.5); overflow: hidden; z-index: 2; }
.media-progress span { display: block; height: 100%; width: 0; background: var(--red); }
.media-tools { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.media-tools input { padding: 9px 11px; border-radius: 12px; font-size: 14px; border-color: var(--line); }
.media-tools .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; min-width: 0; }
.media-drop { min-height: 260px; }
.dropzone { height: 100%; min-height: 260px; border: 2px dashed var(--dash); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--red); font-weight: 700; cursor: pointer; text-align: center; padding: 16px; }
.dropzone.over { background: var(--blush); }
.upload-errors { font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
.upload-errors-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.upload-errors ul { margin: 0; padding-left: 20px; font-size: 14px; }
.danger-card { border-color: var(--line-2); box-shadow: none; margin-top: 10px; max-width: 520px; }

/* Viewer */
.viewer { min-height: 100vh; background: #2A1917; color: var(--paper); display: flex; flex-direction: column; }
.viewer-top { padding: 16px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.viewer-title { font: 700 20px var(--head); } .viewer-sub { font-size: 13px; color: #E8BFC1; }
.viewer-stage { flex: 1; display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.viewer-fig { margin: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.viewer-fig img, .viewer-fig video { max-height: calc(100vh - 230px); border-radius: 16px; }
.viewer-fig figcaption { color: #F2D3D3; text-align: center; }
.viewer-thumbs { padding: 16px 24px 24px; display: flex; gap: 8px; justify-content: center; overflow-x: auto; }
.v-thumb { flex: none; width: 76px; height: 54px; border-radius: 12px; overflow: hidden; border: 3px solid transparent; opacity: .6; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; } .v-thumb.current { border-color: var(--sakura); opacity: 1; }

/* Admin */
.page-head { padding-top: 44px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 8px 0 4px; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current=page] { color: var(--ink); font-weight: 700; border-bottom-color: var(--red); }
.admin-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-bottom: 40px; }
.invite-card { flex: 1 1 320px; max-width: 400px; }
.invite-card .field { flex: none; } /* stacked, so no 220px basis (that is for side-by-side rows) */ .admin-lists { flex: 999 1 560px; min-width: 0; }
.list-row { display: flex; align-items: center; gap: 12px 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; } .wrap-row { flex-wrap: wrap; } .list-row .grow { flex-basis: 200px; }
.list-empty { margin: 0; padding: 16px 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); background: var(--ink); color: var(--paper); padding: 14px 18px; border-radius: 18px; font-size: 14px; z-index: 50; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5); }

/* Sign-in screens */
body.plain { min-height: 100vh; }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px 200px; position: relative;
  background-image: url('/static/seigaiha.svg'); background-repeat: repeat-x; background-position: bottom; background-size: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.vertical-jp { writing-mode: vertical-rl; font: 400 18px var(--head); letter-spacing: 6px; color: var(--ink-2); }

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  /* Header: smaller brand, links in one row, actions on the next */
  .header-row { gap: 10px 12px; padding-top: 12px; padding-bottom: 14px; }
  .brand { gap: 12px; }
  .brand-badge { width: 40px; height: 40px; box-shadow: 0 0 0 3px var(--sakura); } .brand-badge svg { width: 24px; height: 24px; }
  .brand-name { font-size: 19px; } .brand-sub { font-size: 10px; letter-spacing: 1.5px; }
  .nav { width: 100%; gap: 8px 2px; }
  .nav > a { padding: 8px 10px; font-size: 15px; }
  .nav > a:first-child { margin-left: -10px; }
  .nav form { margin-left: 0; }
  .account { margin-left: auto; }
  .acct-name { display: none; }
  .account summary { padding: 3px 8px 3px 3px; }
  /* Admin bars: note on one line, buttons sharing the row below */
  .admin-bar-row { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 12px; padding-bottom: 14px; }
  .admin-bar-row > .row-gap { width: 100%; flex-wrap: nowrap; }
  .admin-bar-row > .row-gap > * { flex: 1 1 0; }
  .admin-bar-row > .row-gap form .btn, .admin-bar-row > .row-gap > .btn { width: 100%; }
  /* Entry page */
  .entry-head { padding-top: 24px; padding-bottom: 20px; gap: 18px; }
  .entry-title-row { flex-wrap: nowrap; align-items: flex-start; gap: 14px; }
  .entry-title-row > .stack-sm { min-width: 0; }
  .stamp-xl { width: 60px; height: 60px; border-width: 2px; } .stamp-xl .stamp-k { font-size: 24px; } .stamp-xl .stamp-s { font-size: 10px; }
  .display-md { font-size: 30px; }
  .prevnext { width: 100%; } .pn { flex: 1 1 0; min-width: 0; }
  .entry-body { padding-top: 28px; }
  .story-lead { font-size: 19px; } .story-p { font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; border-radius: 20px; }
  .gallery-1 { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .gallery .g-first { grid-column: span 2; grid-row: span 2; }
  .comment.reply, .reply-box { margin-left: 24px; }
  .thread { padding: 16px; }
  /* Home */
  .hero-row { padding-top: 36px; padding-bottom: 40px; gap: 28px; }
  .display { font-size: 44px; } .lede { font-size: 16px; }
  .today { max-width: none; padding: 20px; }
  .map-section { padding: 36px 0; }
  .map-section .stack-lg { gap: 20px; }
  .status { padding: 14px 16px; } .status-title { font-size: 19px; } .status-clocks { text-align: left; }
  .scrubber { padding: 12px 14px; }
  .scrub-when { flex: 1 1 auto; }
  .journal { padding-top: 40px; gap: 20px; }
  .entry-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .card { padding: 18px; }
  /* Editor, admin, sign-in */
  .edit-layout { padding-top: 24px; gap: 24px; }
  .edit-side { max-width: none; }
  .page-head { padding-top: 28px; }
  .admin-layout { gap: 24px; } .invite-card { max-width: none; }
  .list-row { padding: 12px 16px; }
  .auth { padding: 28px 18px 160px; align-items: flex-start; }
  .viewer-stage { padding: 0 8px; gap: 8px; } .round-lg { width: 44px; height: 44px; }
  .footer-row { padding-top: 20px; padding-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .admin-bar.sticky { transition: none; }
  .entry-card, .media-item, .day-chip { transition: none; transform: none !important; }
  .petal { display: none; } .pulse, .cloud { animation: none; } html { scroll-behavior: auto; }
}
