:root { --paper: #fbf6ea; --ink: #35324a; --soft: #6d6880; --line: #e6dcc6; --warm: #e8a75d; --rose: #d9786b; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.55 Nunito, system-ui, sans-serif; overflow-x: hidden; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; min-height: 680px; overflow: hidden; background: #c9cdd3; }
#sky, #front { position: absolute; inset: 0; width: 100%; height: 100%; }
#front { pointer-events: none; z-index: 4; }
.flash { position: absolute; inset: 0; background: #eef3ff; opacity: 0; pointer-events: none; z-index: 5; }
.isle { position: absolute; left: 50%; top: 53%; width: min(58vw, 900px); aspect-ratio: 825 / 628; transform: translate(-50%, -50%); z-index: 3; animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { margin-top: -6px; } 50% { margin-top: 8px; } }
.village { position: absolute; inset: 0; width: 100%; height: 100%; transition: filter 3s; user-select: none; -webkit-user-drag: none; }
#lights { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#spots, #people { position: absolute; inset: 0; }
#people { pointer-events: none; transition: filter 3s; }
.spot { position: absolute; border-radius: 40%; transition: background .3s, box-shadow .3s; }
.spot:hover, .spot:focus-visible { background: rgba(255, 246, 214, .18); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 0 40px rgba(255, 236, 180, .45); outline: 0; }
.spot em { position: absolute; left: 50%; top: -8px; transform: translate(-50%, -100%); white-space: nowrap; font: 600 13px Nunito; font-style: normal; background: var(--paper); color: var(--ink); padding: 4px 10px; border-radius: 999px; box-shadow: 0 4px 14px rgba(40, 30, 60, .2); opacity: 0; transition: opacity .2s; pointer-events: none; }
.spot:hover em, .spot:focus-visible em { opacity: 1; }
.who { position: absolute; transform: translate(-50%, -100%); transition: opacity 1.6s, left 2.5s ease-in-out, top 2.5s ease-in-out; opacity: 0; }
.who img { display: block; height: 100%; width: auto; filter: drop-shadow(0 3px 2px rgba(60, 50, 80, .25)); animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.who.on { opacity: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-3px) rotate(1.5deg); } }

header { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 18px 26px; z-index: 8; }
.brand { display: flex; align-items: baseline; gap: 10px; font-family: Fraunces, serif; }
.brand b { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.brand span { font: 700 13px Nunito; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: rgba(251, 246, 234, .9); box-shadow: 0 4px 18px rgba(40, 30, 60, .14); text-decoration: none; font-weight: 700; font-size: 14px; backdrop-filter: blur(6px); }
.pill:hover { background: #fff; }
.ca span { font-size: 11px; color: var(--soft); }
.ca code { font: 600 12.5px ui-monospace, Menlo, monospace; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca b { font-size: 12px; color: var(--rose); }
body.dark header .brand { color: #f4ecdc; }

.wx { position: absolute; left: 26px; top: 86px; width: 280px; z-index: 7; background: rgba(251, 246, 234, .9); border-radius: 22px; padding: 18px 20px 16px; box-shadow: 0 10px 40px rgba(40, 30, 60, .16); backdrop-filter: blur(8px); }
.wxk { font: 700 11px Nunito; text-transform: uppercase; letter-spacing: .12em; color: var(--soft); }
.wxl { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.wxl b { font: 600 30px/1.1 Fraunces, serif; text-transform: capitalize; }
.wxs { font-size: 13px; color: var(--soft); margin-top: 2px; }
.wx p { font-size: 14px; margin-top: 10px; }
.wxh { display: flex; gap: 3px; margin-top: 12px; height: 10px; }
.wxh i { flex: 1; border-radius: 3px; }

.ic { display: inline-block; width: 34px; height: 34px; border-radius: 50%; position: relative; flex: none; }
.ic.sun { background: radial-gradient(circle, #ffd76a 40%, #ffe9a8 42%, transparent 66%); }
.ic.festival { background: radial-gradient(circle at 50% 60%, #ff9f5a 30%, #ffcf8a 34%, transparent 64%), #2b2350; }
.ic.rain { background: linear-gradient(160deg, transparent 45%, #6d8fc4 46% 52%, transparent 53%), radial-gradient(circle at 50% 38%, #9aa6b8 34%, transparent 36%); }
.ic.storm { background: linear-gradient(115deg, transparent 47%, #ffe066 48% 54%, transparent 55%), radial-gradient(circle at 50% 36%, #4c5670 36%, transparent 38%); }
.ic.fog { background: repeating-linear-gradient(0deg, #c8ccd4 0 4px, transparent 4px 8px); border-radius: 30%; }
.ic.snow { background: radial-gradient(circle at 30% 35%, #fff 10%, transparent 12%), radial-gradient(circle at 68% 60%, #fff 10%, transparent 12%), radial-gradient(circle at 40% 75%, #fff 8%, transparent 10%), #2b3a63; }
.ic.cloudy { background: radial-gradient(circle at 40% 55%, #b7c0cc 30%, transparent 32%), radial-gradient(circle at 62% 45%, #cfd5dd 30%, transparent 32%); }

.feed { position: absolute; right: 26px; top: 86px; bottom: 26px; width: 330px; z-index: 7; background: rgba(251, 246, 234, .92); border-radius: 22px; box-shadow: 0 10px 40px rgba(40, 30, 60, .16); display: flex; flex-direction: column; backdrop-filter: blur(8px); overflow: hidden; }
.fh { font: 600 19px Fraunces, serif; padding: 16px 20px 10px; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.fh span { font: 700 12px Nunito; color: var(--soft); }
#feed { overflow-y: auto; padding: 6px 14px 14px; flex: 1; scrollbar-width: thin; }
.en { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 12px 6px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 12px; }
.en:hover { background: rgba(232, 167, 93, .1); }
.en.new { animation: arrive 1.2s ease-out; }
@keyframes arrive { from { background: rgba(232, 167, 93, .35); } to { background: transparent; } }
.av { width: 40px; height: 40px; border-radius: 50%; background: #fff; overflow: hidden; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(40, 30, 60, .15); }
.av img { width: 170%; height: auto; margin: 1px 0 0 -35%; }
.en .nm { font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.en .nm small { font-weight: 600; color: var(--soft); font-size: 12px; }
.tag { font: 700 10.5px Nunito; text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: 999px; background: #eee6d4; }
.en p { font: 500 19px/1.25 Caveat, cursive; color: #3d3956; margin-top: 3px; }
.none { color: var(--soft); font-size: 14px; padding: 20px 6px; }
.hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6; font: 600 13px Nunito; background: rgba(251, 246, 234, .85); padding: 7px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(40, 30, 60, .12); }
.toast { position: absolute; left: 50%; top: 92px; transform: translate(-50%, -12px); z-index: 9; background: var(--ink); color: #fbf6ea; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; opacity: 0; transition: opacity .5s, transform .5s; pointer-events: none; max-width: 80vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* weather tint per state on the tags */
.t-sun { background: #ffe8a6; } .t-festival { background: #ffd0a8; } .t-rain { background: #cfdcf0; } .t-storm { background: #c9cbe0; } .t-fog { background: #e4e5e8; } .t-snow { background: #dfe7fb; } .t-cloudy { background: #e6e9ee; }

/* ---------- sections ---------- */
section:not(.hero) { padding: 100px 26px; max-width: 1180px; margin: 0 auto; }
.sh { max-width: 640px; margin-bottom: 40px; }
.kick { font: 700 12px Nunito; text-transform: uppercase; letter-spacing: .14em; color: var(--rose); }
.sh h2 { font: 600 clamp(30px, 4vw, 44px)/1.1 Fraunces, serif; margin: 8px 0 12px; letter-spacing: -.015em; }
.sh p { color: var(--soft); font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 6px 24px rgba(60, 40, 20, .07); display: grid; grid-template-columns: 92px 1fr; gap: 16px; cursor: pointer; transition: transform .25s, box-shadow .25s; text-align: left; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(60, 40, 20, .12); }
.card .pt { height: 130px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 80%, #fbefd6, transparent 70%); border-radius: 16px; }
.card .pt img { max-height: 120px; max-width: 88px; }
.card h4 { font: 600 22px Fraunces, serif; }
.card .rl { font-size: 13px; color: var(--soft); font-weight: 700; }
.card .st { font-size: 13px; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.card .st i { width: 8px; height: 8px; border-radius: 50%; background: #c9c3b3; }
.card .st i.on { background: #7cc47a; box-shadow: 0 0 0 3px rgba(124, 196, 122, .25); }
.card p { font: 500 18px/1.25 Caveat, cursive; color: #47425e; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.legend div { background: #fff; border-radius: 20px; padding: 20px; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; row-gap: 4px; box-shadow: 0 6px 24px rgba(60, 40, 20, .06); }
.legend b { font: 600 19px Fraunces, serif; align-self: center; }
.legend span { grid-column: 2; font-size: 14.5px; color: var(--soft); }
.lant { margin-top: 30px; font: 500 26px Caveat, cursive; color: var(--soft); }
.lant b { font: 600 34px Fraunces, serif; color: var(--warm); margin: 0 4px; }
.ag { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.ag div { background: #fff; border-radius: 20px; padding: 20px 16px; box-shadow: 0 6px 24px rgba(60, 40, 20, .06); }
.ag span { font-size: 12.5px; color: var(--soft); font-weight: 700; display: block; }
.ag b { font: 600 34px Fraunces, serif; }
footer { max-width: 1180px; margin: 0 auto; padding: 30px 26px 50px; display: flex; justify-content: space-between; gap: 20px; color: var(--soft); font-size: 13.5px; border-top: 1px dashed var(--line); flex-wrap: wrap; }

/* ---------- diary book ---------- */
.book { position: fixed; inset: 0; z-index: 20; background: rgba(40, 34, 60, .45); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.book[hidden] { display: none; }
.page { position: relative; width: min(640px, 100%); max-height: 86vh; background: var(--paper); border-radius: 26px; box-shadow: 0 30px 80px rgba(30, 20, 50, .35); display: flex; flex-direction: column; overflow: hidden;
  background-image: repeating-linear-gradient(transparent 0 33px, #ece2cc 33px 34px); background-position: 0 14px; }
.close { position: absolute; right: 16px; top: 12px; font-size: 28px; line-height: 1; color: var(--soft); z-index: 2; }
.bh { display: flex; gap: 18px; align-items: flex-end; padding: 24px 26px 16px; background: var(--paper); border-bottom: 1px dashed var(--line); }
.bh img { height: 120px; }
.bk { font: 700 12px Nunito; text-transform: uppercase; letter-spacing: .12em; color: var(--rose); }
.bh h3 { font: 600 34px Fraunces, serif; line-height: 1.05; }
.bnow { font-size: 14px; color: var(--soft); margin-top: 4px; }
.entries { overflow-y: auto; padding: 10px 30px 26px; }
.entry { padding: 14px 0 6px; }
.entry .d { font: 700 12px Nunito; color: var(--soft); display: flex; gap: 8px; align-items: center; }
.entry p { font: 500 23px/34px Caveat, cursive; color: #3a3552; }

@media (max-width: 1100px) {
  .isle { width: min(84vw, 760px); top: 46%; }
  .feed { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; height: 30%; }
  .wx { left: 16px; top: 76px; width: auto; right: auto; padding: 12px 16px; }
  .wx p, .wxh { display: none; }
  .hint { display: none; }
  .cards, .legend { grid-template-columns: 1fr 1fr; }
  .ag { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  header { padding: 14px 14px; flex-wrap: wrap; }
  .brand b { font-size: 21px; }
  .ca code { max-width: 90px; }
  .isle { width: 108vw; top: 44%; }
  .wxl b { font-size: 22px; }
  .cards, .legend { grid-template-columns: 1fr; }
  .ag { grid-template-columns: 1fr 1fr; }
  section:not(.hero) { padding: 70px 18px; }
}
