:root { color-scheme: dark; --bg: #11141f; --cream: #f4efe8; --lavender: #c8bddb; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--cream); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; background: radial-gradient(ellipse at 50% 38%, #25233555, transparent 67%); }
.page { max-width: 1680px; margin: auto; padding: max(16px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.intro { text-align: center; padding: 3px 0 21px; }
h1 { margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: clamp(30px, 3.6vw, 53px); line-height: 1.15; font-weight: 400; letter-spacing: -1.3px; text-wrap: balance; }
.subtitle { margin: 10px 0 0; color: var(--lavender); font-size: clamp(12px, 1.2vw, 16px); font-weight: 300; line-height: 1.5; text-wrap: balance; }
.garden { width: 100%; max-width: min(1560px, calc((100svh - 145px) * 16 / 9)); margin: 0 auto; }
.scene-frame { aspect-ratio: 16/9; padding: 3px; border: 1px solid #48414f; background: #1b1d29; box-shadow: 0 18px 60px #0003; }
canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; cursor: crosshair; outline-offset: 3px; background: #292b4d; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
canvas:focus-visible { outline: 2px solid var(--lavender); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 700px) and (orientation: portrait) {
 .page { padding: max(15px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
 .intro { padding: 0 6px 16px; }
 h1 { font-size: clamp(27px, 7vw, 37px); letter-spacing: -.7px; }
 .subtitle { margin-top: 8px; font-size: 12px; }
 .garden { max-width: 430px; }
 .scene-frame { aspect-ratio: auto; height: min(76svh, 680px); min-height: 380px; max-height: calc(100svh - 112px); padding: 2px; }
}
@media (orientation: landscape) and (max-height: 540px) {
 .page { padding: max(5px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
 .intro { padding: 0 0 8px; }
 h1 { font-size: 24px; letter-spacing: -.4px; }
 .subtitle { font-size: 10px; margin-top: 4px; }
 .garden { max-width: none; }
 .scene-frame { aspect-ratio: auto; height: calc(100svh - 75px); padding: 2px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
/* Paper exists only while a world object or a personal invitation is open. */
.post-paper { position: fixed; top: var(--paper-top, 50%); bottom: auto; left: 0; right: 0; transform: translateY(-50%); color-scheme: light; color: #534350; background: #f4e8d2; border: 0; border-radius: 3px; width: min(660px, calc(100vw - 24px)); max-height: min(92dvh, var(--paper-height, 92vh)); margin: 0 auto; padding: 18px; box-shadow: 0 5px 0 #b8a1a0, 0 24px 100px #060a1bb3; overflow: auto; overscroll-behavior: contain; font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.post-paper::backdrop { background: #12182a99; backdrop-filter: blur(3px); }
.paper-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.paper-header h2 { font: 400 clamp(23px,5vw,30px)/1.2 Georgia,serif; margin: 0; }
.post-paper button, .post-paper select { min-height: 44px; min-width: 44px; border: 1px solid #b6a3a5; border-radius: 3px; color: inherit; background: #e7d8c6; padding: 8px 12px; font: inherit; cursor: pointer; touch-action: manipulation; }
.post-paper button:hover { background: #dcc8c0; }
.post-paper button:focus-visible, .post-paper input:focus-visible, .post-paper textarea:focus-visible, .post-paper select:focus-visible { outline: 3px solid #9c8ab7; outline-offset: 2px; }
.post-paper button:disabled { opacity: .5; cursor: wait; }
.paper-body { display: flex; flex-direction: column; gap: 12px; }
.paper-body p { margin: 0; }
.post-paper label { display: flex; flex-direction: column; gap: 6px; }
.post-paper input, .post-paper textarea { display: block; width: 100%; line-height: 1.5; font-family: inherit; font-size: 16px; color: #534350; background: #fff5df; border: 1px solid #c0adab; border-radius: 2px; padding: 10px; resize: vertical; max-height: 150px; }
.pencils { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.color-set { display: flex; flex-wrap: wrap; gap: 3px; width: 100%; }
.post-paper .pencil { flex: 1; max-width: 56px; background: var(--pencil); border: 3px solid #d6c4b7; }
.post-paper [aria-pressed='true'] { outline: 2px solid #77617e; outline-offset: -5px; }
.post-paper .drawing-surface { aspect-ratio: 5/3; height: auto; width: 100%; border: 0; background: #f5e8cf; image-rendering: auto; cursor: crosshair; flex: none; }
.written-message { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 20px/1.5 Georgia, serif; }
.paper-note { font-size: 13px; color: #7a6675; }
.post-status { margin: 12px 0 0; min-height: 0; }
.post-status:empty { display: none; }
.album-pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.post-paper .album-card { height: 92px; color: #b38497; background: #fff4dc; box-shadow: 2px 3px 0 #cbb6a5; font-size: 42px; }
.post-paper .star-card { color: #efddb3; background: #27314a; }
.post-paper.stellar { color: #eee4d2; background: #252e46; box-shadow: 0 5px 0 #5f627e, 0 24px 100px #060a1bb3; }
.stellar .paper-note { color: #b9b4d2; }
.stellar button, .stellar select { color: #eee4d2; background: #3a425c; border-color: #79748c; }
.stellar textarea { color: #eee4d2; background: #303a54; border-color: #79748c; }
@media (max-width: 450px) { .post-paper { padding: 12px; width: calc(100vw - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))); max-height: min(calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px), var(--paper-height, 92vh)); } .pencils { gap: 5px; } .pencils button { padding: 7px 9px; } .album-pages { gap: 8px; } }

.post-paper .pencil:hover { background: var(--pencil); }

.post-paper .album-thumbnail { width: 100%; height: auto; aspect-ratio: 5/3; pointer-events: none; background: transparent; }
.album-excerpt { font: 14px/1.3 Georgia, serif; overflow-wrap: anywhere; display: block; max-height: 65px; overflow: hidden; }
