:root{color-scheme:light;--ink:#183f3d;--muted:#6d807b;--line:#e2eae5;--paper:#f8faf7}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Arial,'Noto Sans JP',sans-serif}main{max-width:1064px;padding:0 36px;margin:auto}header{height:104px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{text-decoration:none;color:var(--ink);font-size:25px;letter-spacing:4px;font-weight:800;display:flex;align-items:center;gap:12px}.brand-star{color:#ed8956;font-size:33px;letter-spacing:0}.planet-name{font-size:14px;color:var(--muted);letter-spacing:1px}.world-heading{display:flex;align-items:center;justify-content:space-between;padding:34px 0 25px}.eyebrow{font-size:13px;color:var(--muted);margin:0 0 8px;letter-spacing:2px}h1{font-size:24px;font-weight:500;margin:0;letter-spacing:2px}.live{display:flex;align-items:center;gap:8px;font-size:13px}.live>span{height:6px;width:6px;background:#3a916c;border-radius:50%}.world{position:relative;width:100%;aspect-ratio:3/2;background:#c5e1bb;overflow:hidden;border-radius:4px}.world>img{display:block;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.world canvas{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}.world-label{position:absolute;left:24px;right:24px;top:20px;display:flex;justify-content:space-between;font-size:13px;font-weight:600;letter-spacing:1px}.world-label span{padding:8px 10px;background:#f8faf7e8;border-radius:3px}.activity{position:absolute;bottom:20px;left:24px;display:flex;gap:9px;align-items:center;background:#173f3de8;color:white;padding:12px 15px;border-radius:3px;font-size:14px}.activity-dot{width:5px;height:5px;background:#a9d886;border-radius:50%}.stats{display:grid;grid-template-columns:repeat(4,1fr);padding:29px 0;border-bottom:1px solid var(--line)}.stats>div{border-right:1px solid var(--line);padding:0 30px}.stats>div:first-child{padding-left:0}.stats>div:last-child{border:0}.stats span{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}.stats strong{font-size:28px;font-weight:500;font-variant-numeric:tabular-nums}.stats small{font-size:13px;margin-left:8px;color:var(--muted);font-weight:400}.journal{padding-top:30px}.journal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}h2{font-size:16px;font-weight:500;margin:0}.journal-head>span{font-size:12px;color:var(--muted)}.entry{display:grid;grid-template-columns:80px 1fr;gap:12px;padding:17px 0;border-bottom:1px solid var(--line);font-size:14px;line-height:1.8}.entry time{font-size:12px;letter-spacing:1px;color:var(--muted)}.entry p{margin:0}footer{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;padding:32px 0 16px}details{font-size:12px;color:var(--muted);padding-bottom:32px;line-height:1.8}summary{cursor:pointer}details p{max-width:650px;font-size:14px}@media(min-width:1000px){.world{aspect-ratio:1.85}.world>img{object-position:50% 55%}}@media(max-width:600px){main{padding:0 18px}header{height:76px}.brand{font-size:19px;letter-spacing:2px}.planet-name{font-size:12px}.world-heading{padding:26px 0 20px}h1{font-size:20px}.live{font-size:12px}.world{aspect-ratio:1.15}.world>img{object-fit:fill}.world-label{left:12px;right:12px;top:12px;font-size:11px}.activity{left:12px;bottom:12px;font-size:12px;padding:10px}.stats>div{padding:0 14px}.stats strong{font-size:24px}.stats small{margin-left:4px}.stats{padding:24px 0}.entry{grid-template-columns:65px 1fr}footer{gap:18px;line-height:1.8}footer span:last-child{text-align:right}}@media(prefers-reduced-motion:reduce){canvas{visibility:hidden}}

.live[data-severity=trouble]{color:#9c681e}.live[data-severity=invasion],.live[data-severity=crisis]{color:#af3830}.live[data-severity=trouble]>span{background:#c68e37}.live[data-severity=invasion]>span,.live[data-severity=crisis]>span{background:#bd483b}.event-invasion p,.event-crisis p{color:#a53830}.event-trouble p{color:#886426}

.history{padding:18px 0 0;font-size:14px}.history>summary{color:var(--ink);width:fit-content;padding:8px 0}.history[open]>summary{margin-bottom:10px}.history button{font:inherit;color:var(--ink);background:transparent;border:1px solid #b7c7be;border-radius:4px;padding:11px 18px;margin-top:20px;cursor:pointer}.history button:hover{background:#eaf0e8}.history button:focus-visible,.history summary:focus-visible{outline:2px solid #207969;outline-offset:4px}.history [hidden]{display:none}.history #history-end{margin:18px 0 0;font-size:14px}

.history[open] #past-logs{margin-top:14px;padding:0 24px;border-left:2px solid #d5e0d7}.history #past-logs .entry{display:block;padding:22px 0}.history #past-logs time{display:block;margin-bottom:10px;font-size:13px}.history #past-logs p{font-size:16px;line-height:2.05;letter-spacing:.03em;max-width:720px}@media(max-width:600px){.history[open] #past-logs{padding:0 16px}.history #past-logs p{font-size:15px}}

.journal-chapter{font-size:12px;color:var(--muted);margin-bottom:10px}.entry.event-arrival p{color:#24685d}

.fullscreen{position:absolute;right:24px;bottom:20px;min-height:42px;padding:10px 14px;border:1px solid #ffffff80;border-radius:3px;background:#f8faf7f0;color:var(--ink);font:inherit;font-size:14px;cursor:pointer}.fullscreen:hover{background:white}.fullscreen:focus-visible{outline:3px solid #207969;outline-offset:3px}.world:fullscreen,.world.fullscreen-fallback{width:100vw;height:100dvh;aspect-ratio:auto;border-radius:0;background:#183f3d}.world:fullscreen>img,.world.fullscreen-fallback>img{object-fit:fill}.world.fullscreen-fallback{position:fixed;inset:0;z-index:1000}.world-expanded{overflow:hidden}@media(max-width:600px){.fullscreen{right:12px;bottom:62px;font-size:13px;padding:8px 12px}}

.fullscreen-hint{position:absolute;right:24px;bottom:72px;max-width:calc(100% - 48px);margin:0;padding:10px 14px;background:#173f3de8;color:#fff;border-radius:3px;font-size:14px;line-height:1.7}.fullscreen-hint[hidden]{display:none}@media(max-width:600px){.fullscreen-hint{right:12px;bottom:112px;max-width:calc(100% - 24px);font-size:13px}}

.history #past-logs p{white-space:pre-line}
/* Phone layout and enlarged-text support */
main{width:100%;min-width:0}.brand,.planet-name,.journal-head>*{min-width:0}.entry p{overflow-wrap:anywhere}.journal-head{gap:12px;flex-wrap:wrap}.journal-head>span{font-size:14px}.history button{min-height:44px}.world-heading{gap:16px}.live{flex-shrink:0}
@media(max-width:600px){
 main{padding:0 16px}header{gap:12px}.brand{font-size:20px}.brand-star{font-size:28px}.planet-name{font-size:13px;letter-spacing:0}h1{font-size:21px;letter-spacing:.04em}.eyebrow{font-size:14px;letter-spacing:.06em}.live{font-size:14px}.world-heading{flex-wrap:wrap;row-gap:12px}
 .world{aspect-ratio:1/1.05}.world-label{gap:8px;font-size:12px;letter-spacing:0}.world-label span{padding:7px 8px}.activity{right:12px;left:12px;bottom:12px;min-height:44px;font-size:14px;line-height:1.5}.activity-dot{flex-shrink:0}.fullscreen{bottom:68px;min-height:44px;font-size:14px}.fullscreen-hint{bottom:122px;font-size:14px;line-height:1.7}
 .stats{gap:20px 0;grid-template-columns:repeat(2,minmax(0,1fr))}.stats>div{padding:0 16px;border-right:0}.stats>div:nth-child(odd){padding-left:0;border-right:1px solid var(--line)}.stats span,.stats small{font-size:14px}.stats strong{font-size:28px}.journal{padding-top:24px}.journal-head{align-items:baseline}.journal-head h2{font-size:18px}.journal-head>span{font-size:14px}.journal-chapter{font-size:14px}.entry{grid-template-columns:72px minmax(0,1fr);gap:8px;font-size:16px}.entry time{font-size:12px;overflow-wrap:anywhere}.history{font-size:16px}.history>summary{min-height:44px;line-height:1.7}.history[open] #past-logs{padding:0 14px}.history #past-logs p{font-size:16px;line-height:1.95}.history button{width:100%;padding:12px}.history #history-end{font-size:14px}
 footer{flex-direction:column;gap:4px;font-size:14px;padding-top:26px}footer span:last-child{text-align:left}details{font-size:14px}details>summary{min-height:44px;display:list-item;padding-top:9px}details p{font-size:16px}
 .world:fullscreen,.world.fullscreen-fallback{height:100dvh;aspect-ratio:auto}.world:fullscreen .world-label,.world.fullscreen-fallback .world-label{top:max(12px,env(safe-area-inset-top))}.world:fullscreen .activity,.world.fullscreen-fallback .activity{bottom:max(12px,env(safe-area-inset-bottom))}
}
@media(max-width:360px){.brand{font-size:18px;letter-spacing:1px}.brand-star{font-size:24px}.planet-name{font-size:12px}header{gap:8px}.world-label{left:8px;right:8px}.fullscreen-hint{right:8px;max-width:calc(100% - 16px)}}
@media(max-height:500px) and (orientation:landscape){.world:fullscreen .fullscreen,.world.fullscreen-fallback .fullscreen{bottom:14px;right:14px}.world:fullscreen .activity,.world.fullscreen-fallback .activity{right:160px;left:14px;bottom:14px}.world:fullscreen .fullscreen-hint,.world.fullscreen-fallback .fullscreen-hint{bottom:68px;right:14px;max-width:calc(100% - 28px)}}

.header-tools{display:flex;align-items:center;gap:20px}.header-tools select{min-height:44px;border:1px solid #cbd8cf;border-radius:4px;background:transparent;color:var(--ink);font:inherit;font-size:14px;padding:8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}html:not([lang=ja]) .activity{line-height:1.5;max-width:calc(100% - 170px)}html:not([lang=ja]) .stats small{font-size:12px}@media(max-width:600px){header{height:auto;min-height:80px;flex-wrap:wrap;padding:16px 0;gap:10px}.header-tools{gap:12px;flex-wrap:wrap}.header-tools select{font-size:14px}html:not([lang=ja]) .activity{max-width:none}html:not([lang=ja]) .world-heading h1{font-size:21px}html:not([lang=ja]) .fullscreen-hint{bottom:138px}html:not([lang=ja]) .fullscreen{bottom:84px}.activity{max-height:70px;overflow:auto}}

.scene-terrain{position:absolute;inset:0;background-image:url('scene-atlas.webp');background-size:300% 200%;image-rendering:pixelated}.scene-terrain[hidden],#terrain[hidden]{display:none}.location-label{position:absolute;left:24px;top:72px;padding:8px 10px;background:#f8faf7e8;border-radius:3px;font-size:14px;color:var(--ink)}@media(max-width:600px){.location-label{left:12px;top:58px;font-size:14px}}

.brand{letter-spacing:.04em}@media(max-width:600px){.brand{font-size:21px;letter-spacing:.025em}}

.media-panel,.youtube-panel{margin-top:28px;padding:24px 0;border-top:1px solid var(--line)}.media-panel[hidden],.youtube-panel[hidden]{display:none}.media-panel p{font-size:14px;line-height:1.8}.video-row a{display:inline-block;min-height:44px;padding:12px 16px;margin:8px 0;border:1px solid #b7c7be;border-radius:4px;color:var(--ink);text-decoration:none;font-size:16px}.video-row a:focus-visible{outline:2px solid #207969;outline-offset:3px}.youtube-panel iframe{display:block;margin-top:18px;width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:4px}

/* Keep the background and canvas in the same 3:2 frame in fullscreen. */
.world:fullscreen>img,.world.fullscreen-fallback>img,.world:fullscreen canvas,.world.fullscreen-fallback canvas,.world:fullscreen .scene-terrain,.world.fullscreen-fallback .scene-terrain{position:absolute;inset:auto;left:50%;top:50%;width:var(--scene-fit-width,100%);height:var(--scene-fit-height,100%);transform:translate(-50%,-50%);object-fit:contain;object-position:center}
.world-label #day{white-space:normal;line-height:1.6}.entry time .journal-clock{display:block;font-size:12px;letter-spacing:0;line-height:1.6}

/* Shared JST light cycle; illustration geometry is unchanged. */
.world>img,.world .scene-terrain{transition:filter 2s ease}
.world[data-light="morning"]>img,.world[data-light="morning"] .scene-terrain{filter:brightness(.88) sepia(.16)}
.world[data-light="evening"]>img,.world[data-light="evening"] .scene-terrain{filter:brightness(.73) sepia(.28)}
.world[data-light="night"]>img,.world[data-light="night"] .scene-terrain{filter:brightness(.32) saturate(.65)}
.routine-clock{position:absolute;z-index:4;top:72px;left:20px;max-width:calc(100% - 40px);padding:7px 10px;background:#173643eb;color:#f3f6e9;font-size:14px;line-height:1.4;border-radius:5px;pointer-events:none}
@media(max-width:600px){.routine-clock{top:62px;left:10px;font-size:12px;max-width:calc(100% - 20px)}}

/* Each diary record carries its own timestamp directly after DAY. */
.entry{grid-template-columns:minmax(0,1fr);gap:6px}.entry time{display:block;font-size:14px;letter-spacing:0;overflow-wrap:normal;line-height:1.6}.entry time .journal-clock{display:inline;font-size:inherit;white-space:nowrap}

.world[data-light]>img,.world[data-light] .scene-terrain{filter:brightness(var(--time-brightness,1)) saturate(var(--time-saturation,1)) sepia(var(--time-sepia,0)) hue-rotate(var(--time-hue,0deg));transition:filter 1s linear}

/* Stack routine and location in normal flow so translated labels never overlap. */
.world-context{position:absolute;z-index:4;top:72px;left:24px;right:24px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;pointer-events:none}
.world-context .routine-clock,.world-context .location-label{position:static;max-width:100%;margin:0;overflow-wrap:anywhere;line-height:1.5}
@media(max-width:600px){.world-context{top:64px;left:12px;right:12px;gap:6px}.world-context .routine-clock,.world-context .location-label{font-size:12px}}
