:root {
  color-scheme: dark;
  --bg: #0b0c14;
  --surface: #151724;
  --deep: #10111c;
  --raised: #1e2031;
  --ink: #f5f4fb;
  --muted: #b3b5ca;
  --line: #343648;
  --accent: #d6caff;
  --accent-hover: #ebe4ff;
  --accent-ink: #1b1232;
  --radius: 22px;
  --shadow: 0 20px 60px rgb(2 3 12 / 30%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 50% 0, #17192b 0%, var(--bg) 48rem);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 4px; }
:where(h1, h2, h3, p, dl, dd, ul) { margin: 0; }
:where(h1, h2, h3) { line-height: 1.17; letter-spacing: -.046em; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 760; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
small { font-size: .875rem; }
.muted, .subtle { color: var(--muted); }
.subtle { margin-top: .55rem; }
.shell { width: min(100%, 1296px); margin-inline: auto; padding-inline: max(clamp(18px, 4vw, 52px), env(safe-area-inset-left), env(safe-area-inset-right)); }
main { padding-block: clamp(30px, 6vw, 78px) max(55px, env(safe-area-inset-bottom)); }
main:has(> .home-heading) { padding-block-start: clamp(18px, 3vw, 36px); }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 8px 14px; border-radius: 8px; color: var(--accent-ink); background: var(--accent); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid #282a3b; background: #10111bcc; padding-top: env(safe-area-inset-top); }
.header-inner { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; width: fit-content; gap: 10px; align-items: center; text-decoration: none; font-weight: 800; font-size: 1.28rem; letter-spacing: -.06em; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: radial-gradient(circle at 68% 28%, #f3eaff 0 11%, #b197f3 28%, #6555c1 50%, #272341 80%);
  box-shadow: inset 0 0 0 1px #e3d5ff66, 0 4px 22px #9b83fd44;
}
.site-nav { display: flex; gap: 3px; align-items: center; }
.site-nav a, .account-menu a, .account-menu button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current], .account-menu a:hover, .account-menu button:hover { color: var(--ink); background: #242637; }
.account { position: relative; justify-self: end; }
.account summary { list-style: none; display: flex; gap: 8px; }
.account summary::-webkit-details-marker { display: none; }
.avatar { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .8rem; }
.chevron { width: 6px; height: 6px; margin: 0 2px 3px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.account-menu { position: absolute; z-index: 3; top: calc(100% + 8px); right: 0; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); box-shadow: var(--shadow); }
.account-menu button { width: 100%; border: 0; background: none; font-family: inherit; cursor: pointer; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  width: fit-content;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.primary { color: var(--accent-ink); background: var(--accent); border-color: #e8e0ff; }
.primary:hover { background: var(--accent-hover); }
.secondary { color: var(--ink); background: #25263a; border-color: #3b3d52; }
.secondary:hover { background: #30334b; border-color: #5e6080; }
button:disabled { opacity: .55; cursor: default; }
.panel { min-width: 0; padding: clamp(18px, 3vw, 31px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.page-heading, .section-heading, .note-info, .pages, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.page-heading, .section-heading, .note-info { justify-content: space-between; }
.page-heading { margin-bottom: clamp(24px, 4vw, 38px); }
.section-heading { margin-bottom: 13px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 6px; color: var(--accent); text-underline-offset: .22em; }

.eyebrow { display: block; color: #e1d8fb; font-weight: 650; font-size: .875rem; letter-spacing: .035em; }
.event-count { color: var(--accent); font-size: clamp(1.85rem, 4vw, 2.7rem); font-weight: 740; line-height: 1.05; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.note-grid, .gallery { list-style: none; padding: 0; display: grid; gap: 16px; }
.note-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-top: 18px; }
.note { display: grid; grid-template-rows: 1fr auto; gap: 16px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #232237, #181a29 90%); }
.note-content, .hobby-notes { white-space: pre-wrap; }
.note-info { border-top: 1px solid var(--line); padding-top: 12px; }
.note-meta { display: grid; gap: 2px; font-size: .875rem; color: var(--muted); }
.note-meta strong { color: var(--ink); }
.empty-line { margin-top: 17px; }
.pages { margin-top: 18px; }

.login {
  width: min(100%, 430px);
  margin: clamp(0px, 3vh, 34px) auto 0;
  padding: clamp(22px, 5vw, 36px);
  background: linear-gradient(145deg, #202235, var(--surface) 58%);
  box-shadow: var(--shadow);
}
.login h1 { font-size: clamp(1.45rem, 4vw, 1.85rem); }
.login p { margin-top: 12px; }
.login .login-help { margin-top: 16px; font-size: .82rem; }
.login .login-form { margin-top: 22px; }
.login .login-form .button { width: 100%; }
.login-form, .composer { display: grid; gap: 13px; }
.login-form { gap: 18px; }
.edit-form { width: min(100%, 760px); }
.composer button { justify-self: end; }
label { display: grid; gap: 7px; font-size: .93rem; font-weight: 650; }
textarea, select, input:not([type="hidden"], [type="checkbox"]) {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #44465d;
  border-radius: 11px;
  background: var(--deep);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 450;
}
input::placeholder, textarea::placeholder { color: #a09fb8; }
textarea { resize: vertical; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--raised); cursor: pointer; }
.field-grid, .project-grid, .travel-grid { display: grid; align-items: start; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); }
.field-grid { gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { justify-content: flex-end; }
.field-help { font-size: .9rem; }
.error { padding: 10px 12px; border-radius: 9px; color: #ffd4dd; background: #492738; }

.gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 244px), 1fr)); }
.gallery-card { display: grid; height: 100%; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; transition: border-color .18s, transform .18s; }
.gallery-card:hover { transform: translateY(-3px); border-color: #8980a8; }
.gallery-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 4 / 3;
  background: radial-gradient(ellipse at 49% 10%, #403754, transparent 72%), #202131;
}
.gallery-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-copy { padding: clamp(15px, 2.8vw, 24px); }
.gallery-copy h2 { margin-bottom: 9px; }
.media-caption { padding: 5px 10px; border: 1px solid #5e576b; border-radius: 99px; color: #e3dced; font-size: .875rem; }
.gallery-note { display: -webkit-box; margin-top: 10px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.spec-tags li { padding: 3px 8px; border: 1px solid #49475e; border-radius: 8px; color: #e4e2f2; background: #242638; font-size: .875rem; }
.empty-card { display: grid; min-height: 255px; justify-items: center; align-content: center; gap: 11px; padding: 30px; border: 1px dashed #4f4d66; border-radius: var(--radius); background: #191b2a; text-align: center; }
.empty-card p { color: var(--muted); }
.empty-symbol { display: grid; place-items: center; width: 49px; height: 49px; margin-bottom: 4px; border: 1px solid #564a7a; border-radius: 15px; color: var(--accent); background: #332a4e; font-size: 1.65rem; }
.record-layout { display: grid; grid-template-columns: 1.2fr 1fr; align-items: start; gap: 18px; }
.detail-media { border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--deep); }
.detail-media img { object-fit: contain; }
.record-specs { display: grid; gap: 8px; margin-block: 17px 22px; }
.record-specs div { display: grid; gap: 12px; grid-template-columns: 88px 1fr; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.record-specs dt { color: var(--muted); }
.record-copy p { margin-top: 7px; }
.form-photo { width: min(100%, 190px); max-height: 170px; object-fit: contain; object-position: left center; border-radius: 9px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 224px), 1fr)); gap: 16px; }
.date-card { display: grid; align-content: start; justify-items: start; gap: 10px; padding: clamp(19px, 3vw, 29px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.date-feature { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; padding: clamp(22px, 4vw, 44px); border-color: #62577e; background: radial-gradient(ellipse at 75% 0, #4a3c71, transparent 85%), #26223e; }
.date-feature .eyebrow { grid-column: 1; grid-row: 1; }
.date-feature .event-count { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: clamp(2.7rem, 7vw, 5.3rem); }
.date-feature h2 { grid-column: 1; grid-row: 2; font-size: clamp(1.6rem, 5vw, 2.8rem); }
.date-feature .date-edit { grid-column: 2; justify-self: end; }
.date-card time { color: var(--muted); }
.date-feature time { color: #e2dbf2; }
.date-edit { margin-top: 6px; }

.hobby-stack { display: grid; gap: 16px; }
.hobby-stack p { margin-block: 7px 14px; }
.hobby-stack details summary { width: fit-content; color: var(--accent); font-weight: 660; cursor: pointer; }
.hobby-stack details form { margin-top: 14px; }
.hobby-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-block: 0 14px; }
.counter { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-block: 15px; }
.counter output { min-width: 55px; text-align: center; font-size: 1.23rem; font-weight: 720; }
.inline-check { display: flex; align-items: center; }
.inline-check input { width: 17px; height: 17px; accent-color: var(--accent); }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; min-height: 64px; padding-block: 10px 5px; gap: 7px; }
  .guest .header-inner { padding-block: 10px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; min-width: 0; overflow-x: auto; padding: 1px 2px 5px; }
  .site-nav a { padding-inline: 10px; }
}
@media (max-width: 620px) {
  .record-layout { grid-template-columns: minmax(0, 1fr); }
  .field-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .page-heading { gap: 10px; }
  .page-heading h1 { font-size: 2.1rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gallery-copy { padding: 12px; }
  .gallery-copy h2 { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.featured-section { margin-top: clamp(24px, 4vw, 42px); }
.featured-work {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
}
.featured-work:hover { border-color: #8980a8; }
.featured-work img { width: clamp(68px, 15vw, 132px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 11px; }
.featured-copy { min-width: 0; padding: 8px; }
.share-status { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); font-size: .875rem; }
.showcase-form { margin-top: 18px; }
.travel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.travel-column { align-content: start; }
.travel-empty { min-height: 170px; }
.travel-card .section-heading { margin: 0; }
.travel-card p:last-child { margin-bottom: 0; }
@media (max-width: 620px) { .travel-grid { grid-template-columns: 1fr; } }

.vault-overview, .amount-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vault-net { background: radial-gradient(ellipse at 92% 0, #46365e, transparent 72%), #211d35; }
.vault-goal { background: radial-gradient(ellipse at 100% 15%, #293c51, transparent 73%), #18212e; }
.vault-overview h2 { color: var(--muted); }
.vault-value { display: block; color: var(--accent); margin-block: 12px 18px; font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 760; letter-spacing: -.06em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.vault-breakdown { display: grid; gap: 6px; }
.vault-breakdown div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-block: 6px; border-top: 1px solid var(--line); }
.vault-breakdown dt, .vault-hint { color: var(--muted); }
.vault-hint { margin-block: 9px 22px; }
.vault-goal progress { width: 100%; height: 14px; accent-color: var(--accent); margin: 5px 0 8px; }
.vault-goal p { margin-top: 5px; }
.amount-editor { margin-top: 20px; }
.amount-editor summary { width: fit-content; cursor: pointer; color: var(--accent); font-weight: 680; }
.amount-editor form, .vault-recovery-action { margin-top: 16px; }
@media (max-width: 620px) { .vault-overview, .amount-fields { grid-template-columns: 1fr; } }

.insights-grid { display: grid; grid-template-columns: minmax(190px, .75fr) minmax(0, 1.8fr); gap: 16px; margin-top: 18px; }
.insights-grid h2 { font-size: 1.13rem; }
.weather-value { color: var(--accent); margin-block: 8px 3px; font-size: 2.35rem; font-weight: 740; line-height: 1.2; }
.insight-source, .insight-market-footer { font-size: .875rem; }
.insight-source { display: inline-block; margin-top: 7px; color: var(--accent); text-underline-offset: .2em; }
.market-frame { display: block; width: 100%; height: 89px; border: 0; margin-top: 8px; }
.insight-market-footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
@media (max-width: 685px) { .insights-grid { grid-template-columns: minmax(0, 1fr); } }

.optional-fields { border-top: 1px solid var(--line); padding-top: 10px; }
.optional-fields summary { width: fit-content; padding-block: 4px; color: var(--accent); cursor: pointer; }
.optional-fields[open] summary { margin-bottom: 13px; }
.optional-fields > label { width: min(100%, 300px); }
.photo-field { display: grid; gap: 9px; }
.photo-drop { display: grid; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px dashed #555371; border-radius: 12px; background: #17182a; }
.photo-drop.is-dragging { border-color: var(--accent); background: #302745; }
.photo-drop p { color: var(--muted); font-size: .875rem; }
.photo-drop input[type="file"] { border: 0; padding: 3px 0; min-height: 42px; background: transparent; }
.photo-status:empty { display: none; }

.collection-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(288px, 30vw, 365px); gap: 18px; align-items: start; }
.collection-main, .collection-side { min-width: 0; }
.collection-side { padding: 16px; }
.collection-side-title, .scene-caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 12px; }
.collection-side-title { margin-bottom: 13px; }
.collection-side-title h2 { font-size: 1.15rem; }
.scene-caption { margin-top: 12px; }
.scene-meta { margin-top: 7px; font-size: .875rem; }
.scene-progress { width: 100%; height: 12px; margin-top: 7px; accent-color: #d6caff; }
[data-club="mint"] { --team: #8fe4b8; }
[data-club="rose"] { --team: #ff93ac; }
[data-club="gold"] { --team: #ffd284; }
[data-club="blue"] { --team: #9cc9ff; }
[data-club="lilac"] { --team: #c6b5ff; }

.yarn-scene, .ballpark { position: relative; overflow: hidden; isolation: isolate; height: 184px; border: 1px solid #514562; border-radius: 13px; }
.yarn-scene { background: radial-gradient(ellipse at 49% 24%, #755d90, transparent 64%), linear-gradient(180deg, #3b365b 0 69%, #664b65 69% 100%); }
.yarn-scene::after { content: ""; position: absolute; inset: auto 6% 8%; height: 21%; z-index: -1; border-radius: 50%; background: #2f2544a3; }
.yarn-pet { position: absolute; width: 117px; height: 118px; bottom: 13%; left: clamp(12%, 5vw, 26%); --fur: #ead1c5; --ear: #c08395; }
.yarn-pet[data-pet="bear"] { --fur: #d2a275; --ear: #9d625b; }
.yarn-pet[data-pet="fox"] { --fur: #efa66f; --ear: #e0846d; }
.yarn-pet[data-pet="cat"] { --fur: #b9bdf6; --ear: #8c7bbe; }
.pet-ear { position: absolute; top: 0; width: 23px; height: 48px; background: var(--ear); border: 5px solid var(--fur); border-radius: 50%; }
.pet-ear.left { left: 25px; rotate: -18deg; }
.pet-ear.right { right: 25px; rotate: 18deg; }
[data-pet="bear"] .pet-ear { height: 26px; top: 21px; }
[data-pet="fox"] .pet-ear, [data-pet="cat"] .pet-ear { height: 33px; top: 16px; border-radius: 70% 25% 35% 20%; }
.pet-face { position: absolute; top: 30px; left: 15px; width: 87px; height: 66px; border-radius: 48% 48% 43% 43%; background: var(--fur); box-shadow: inset 0 -6px #fffbeb38, 0 6px 0 #3b29472b; }
.pet-eyes { position: absolute; top: 30px; left: 21px; width: 6px; height: 8px; border-radius: 50%; background: #312140; box-shadow: 38px 0 #312140; animation: pet-blink 5s ease-in-out infinite; }
.pet-nose { position: absolute; left: 39px; top: 39px; width: 8px; height: 5px; border-radius: 50%; background: #704361; box-shadow: -23px 2px 0 1px #f28f9eb8, 23px 2px 0 1px #f28f9eb8; }
.pet-paws { position: absolute; top: 79px; left: 27px; width: 21px; height: 19px; border-radius: 50%; background: var(--fur); box-shadow: 42px 1px var(--fur); z-index: 1; animation: paw-knit .9s ease-in-out infinite alternate; }
.pet-knitting { position: absolute; top: 79px; left: 32px; width: 54px; height: 39px; }
.pet-knitting span, .yarn-shelf span { background: repeating-linear-gradient(110deg, #0000 0 4px, #20133126 5px 6px), var(--team, #c6b5ff); }
.pet-knitting span { position: absolute; top: 13px; inset-inline: 3px; height: 25px; border-radius: 4px 4px 6px 6px; transform-origin: top; }
.pet-knitting i { position: absolute; z-index: 2; top: 11px; left: 7px; width: 42px; height: 3px; border-radius: 10px; background: #f7d498; rotate: 19deg; animation: needle-knit .9s ease-in-out infinite alternate; }
.pet-knitting i + i { rotate: -22deg; animation-delay: -.4s; }
.yarn-ball { position: absolute; bottom: 13%; left: 11%; width: 26px; height: 26px; border-radius: 50%; background: repeating-linear-gradient(38deg, #d3bcf8 0 3px, #9b80d5 3px 5px); box-shadow: 0 3px 0 #38263d7a; animation: yarn-roll 4s ease-in-out infinite alternate; }
.yarn-shelf { position: absolute; right: 9%; bottom: 15%; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; min-width: 62px; min-height: 6px; padding: 0 5px 4px; border-bottom: 5px solid #bb8b8b; }
.yarn-shelf span { width: 54px; height: 12px; border-radius: 5px; box-shadow: inset 0 -3px #37204d2c; }
.yarn-shelf span:nth-child(even) { width: 48px; }
@keyframes pet-blink { 0%, 45%, 51%, 100% { scale: 1 1; } 48% { scale: 1 .1; } }
@keyframes paw-knit { to { translate: 0 -3px; } }
@keyframes needle-knit { to { transform: rotate(13deg); } }
@keyframes yarn-roll { to { transform: translateX(5px) rotate(30deg); } }

.ballpark { background: linear-gradient(180deg, #4b6281 0 17%, #2b3c67 17% 32%, #2e885f 32% 100%); border-color: #455671; }
.ballpark::before { content: ""; position: absolute; inset: 18% 0 auto; height: 13%; background: radial-gradient(circle, #e0c4f6 0 1.3px, transparent 2px) 0 1px / 13px 10px, radial-gradient(circle, #ffd69a 0 1.2px, transparent 2px) 7px 5px / 17px 8px; border-bottom: 3px solid #bbe0ad73; }
.field-stripe { position: absolute; z-index: -1; inset: 32% 0 0; background: repeating-conic-gradient(from 35deg at 50% 85%, #92d08244 0 18deg, #d7ffd925 18deg 36deg); }
.mini-diamond { position: absolute; top: 66%; left: 50%; width: 27%; aspect-ratio: 1; background: #5aac72; border: 8px solid #cfa36d; border-radius: 22%; transform: translate(-50%, -50%) scaleY(.65) rotate(45deg); box-shadow: 0 0 0 5px #c29b6159; }
.mini-base { position: absolute; width: 7px; height: 7px; background: #fff3d8; border-radius: 2px; rotate: 45deg; transform: translate(-45%, -15%); }
.mini-base.home { left: 50%; top: 85%; }
.mini-base.first { left: 68%; top: 66%; }
.mini-base.second { left: 50%; top: 48%; }
.mini-base.third { left: 32%; top: 66%; }
.mini-base.occupied { background: #ffc96e; outline: 2px solid #3e2a45; box-shadow: 0 0 6px 3px #ffd27a66; }
.mini-player { position: absolute; z-index: 1; width: 23px; height: 29px; transform: translate(-50%, -75%); --fur: #eac6a9; animation: player-bob 2s ease-in-out infinite alternate; }
.mini-player[data-pet="fox"] { --fur: #ffb083; }
.mini-player[data-pet="rabbit"] { --fur: #f1ced9; }
.mini-player[data-pet="cat"] { --fur: #cbc9fa; }
.mini-player::before { content: ""; position: absolute; top: 2px; left: 4px; width: 5px; height: 8px; border-radius: 45%; background: var(--fur); box-shadow: 11px 0 var(--fur); }
.mini-player[data-pet="rabbit"]::before { top: 0; height: 11px; }
.mini-player[data-pet="cat"]::before, .mini-player[data-pet="fox"]::before { border-radius: 50% 10% 60% 15%; }
.player-head { position: absolute; top: 6px; left: 3px; width: 18px; height: 14px; border-radius: 45%; background: var(--fur); border-top: 4px solid var(--team, #8fe4b8); }
.player-head::after { content: ""; position: absolute; top: 4px; left: 4px; width: 2px; height: 2px; border-radius: 50%; background: #34304b; box-shadow: 7px 0 #34304b; }
.player-kit { position: absolute; bottom: 1px; left: 7px; width: 11px; height: 9px; border-radius: 3px; background: var(--team, #8fe4b8); }
.mini-player.left-field { left: 21%; top: 53%; animation-delay: -.3s; }
.mini-player.right-field { left: 79%; top: 53%; animation-delay: -.7s; }
.mini-player.pitcher { left: 50%; top: 67%; }
.mini-player.batter { left: 46%; top: 87%; }
.batter::after { content: ""; position: absolute; width: 12px; height: 2px; border-radius: 2px; background: #ffcf89; bottom: 10px; left: -4px; rotate: 44deg; }
.mini-ball { position: absolute; z-index: 2; top: 64%; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: #fffbea; animation: ball-pitch 2.8s ease-in infinite; }
.game-over .mini-ball { visibility: hidden; }
@keyframes ball-pitch { 0%, 68% { translate: 0 0; opacity: 0; } 70% { opacity: 1; } 94% { translate: -8px 37px; opacity: 1; } 100% { translate: -8px 37px; opacity: 0; } }
@keyframes player-bob { to { margin-top: -2px; } }
.mini-scores { display: grid; gap: 4px; margin-top: 9px; }
.mini-score { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 7px; border-radius: 5px; }
.mini-score.wins { background: #272c42; }
.mini-score strong { font-variant-numeric: tabular-nums; }
.team-color { width: 8px; height: 8px; border-radius: 50%; background: var(--team, #c6b5ff); }
.mini-play { margin-top: 5px; color: var(--accent); }
@media (max-width: 880px) { .collection-layout { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .pet-eyes, .pet-paws, .pet-knitting i, .yarn-ball, .mini-ball, .mini-player { animation: none; }
}

.home-heading, .travel-heading, .calendar-nav, .note-actions, .task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.home-heading, .travel-heading { justify-content: space-between; }
.home-heading { margin-bottom: 18px; }
.home-heading h1 { font-size: 1.25rem; }
.home-anniversary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; color: var(--accent); font-size: .9rem; text-decoration: none; padding-block: 7px; }
.home-anniversary:hover { text-decoration: underline; }
.home-planner, .calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.home-planner > *, .calendar-layout > * { min-width: 0; }
.home-planner .section-heading { min-height: 44px; margin-bottom: 8px; }
.home-planner .panel, .task-panel { padding: clamp(12px, 2vw, 20px); }
.home-planner .note-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.home-planner .note { gap: 8px; padding: 12px; }
.home-planner .note-content { min-height: 0; }
.note-actions, .task-actions { gap: 5px; }
.note-actions .button, .task-actions .button { min-height: 36px; padding: 5px 9px; font-size: .875rem; }
.task-add, .calendar-add { display: grid; gap: 10px; }
.task-add input[type="date"] { width: min(100%, 230px); }
.task-add button, .calendar-add button { justify-self: end; }
.task-panel { margin-top: 10px; }
.task-list, .calendar-entries { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 7px 0; }
.task-row + .task-row { border-top: 1px solid var(--line); }
.task-copy { min-width: 0; flex: 1 1 170px; }
.task-copy p { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-copy time, .task-copy .muted { display: block; font-size: .85rem; }
.task-overdue { color: #ffb3c2; }
.calendar-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.calendar-month { padding: clamp(5px, 1.3vw, 16px); }
.calendar-table { table-layout: fixed; width: 100%; border-spacing: 3px; text-align: center; }
.calendar-table th { color: var(--muted); padding-bottom: 5px; font-size: .9rem; }
.calendar-table td { padding: 0; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: start; min-height: 56px; padding: 4px 1px; border: 1px solid transparent; border-radius: 9px; background: var(--surface); font-size: .95rem; text-decoration: none; }
.calendar-day:hover { background: #25243b; }
.calendar-day.is-today { color: var(--accent); border-color: #62567f; }
.calendar-day[aria-current] { color: var(--accent); border-color: var(--accent); background: #302647; font-weight: 720; }
.calendar-day small { color: var(--accent); font-size: .78rem; }
.calendar-details h2 { margin-bottom: 12px; }
.calendar-entries { display: grid; gap: 7px; }
.calendar-entries li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; }
.calendar-entries a { overflow-wrap: anywhere; text-underline-offset: 3px; }
.calendar-type { color: var(--accent); font-size: .82rem; }
.calendar-done { color: var(--muted); }
.calendar-add { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.release-list { display: grid; gap: 12px; max-width: 780px; }
.release-list ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--muted); }
.site-footer { display: flex; justify-content: flex-end; padding-block: 12px 28px; color: var(--muted); font-size: .9rem; }
.site-footer a { text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
@media (max-width: 740px) {
  .home-planner, .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-day { min-height: 44px; }
}

.photo-drop [hidden] { display: none; }
.knitting-friends-art {
  margin-bottom: 14px;
  border: 1px solid #5d496e;
  border-radius: 16px;
  padding: clamp(11px, 3vw, 23px);
  background: radial-gradient(ellipse at 50% 100%, #776087 0, #302844 70%);
}
.knitting-friends-art img { display: block; width: 100%; height: auto; }

.village-heading { margin-bottom: clamp(14px, 2vw, 24px); }
.village-heading h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.village {
  --village-ink: #392c34;
  --village-paper: #fff5e2;
  --village-line: #d7bb9b;
  overflow: hidden;
  color: var(--village-ink);
  background: var(--village-paper);
  border: 1px solid var(--village-line);
  border-radius: clamp(17px, 3vw, 28px);
  box-shadow: var(--shadow);
}
.village-stage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  height: clamp(320px, 44vw, 550px);
  overflow: hidden;
  background: #d4e5ae;
}
.village-landscape { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.village-resident {
  --sprite-height: clamp(42px, 6.7cqw, 84px);
  position: absolute;
  z-index: var(--depth, 1);
  left: var(--x, 19%);
  top: var(--y, 74%);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0 2px;
  color: var(--village-ink);
  background: none;
  border: 0;
  border-radius: 10px;
  transform: translate(-50%, -100%);
  cursor: pointer;
  font: inherit;
}
.village-resident:nth-of-type(2) { --x: 39%; --y: 82%; }
.village-resident:nth-of-type(3) { --x: 60%; --y: 72%; }
.village-resident:nth-of-type(4) { --x: 81%; --y: 84%; }
.village-resident:nth-of-type(5) { --x: 43%; --y: 58%; }
.village-resident img {
  display: block;
  width: clamp(40px, 7.4cqw, 93px);
  height: var(--sprite-height);
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 3px 2px #452f363b);
  transform-origin: bottom;
}
.village[data-playing="true"] .village-resident img { animation: village-step .62s ease-in-out infinite alternate; }
.village[data-playing="true"] .village-resident:nth-of-type(even) img { animation-delay: -.34s; }
@keyframes village-step {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-3px) rotate(2deg); }
}
.village-resident .village-name {
  max-width: min(18cqw, 110px);
  padding: 1px clamp(3px, .6cqw, 7px);
  border: 1px solid #6e4c5960;
  border-radius: 999px;
  background: #fff7e6f5;
  font-size: clamp(.59rem, 1.3cqw, .72rem);
  font-weight: 700;
  white-space: nowrap;
}
.village-resident:hover .village-name, .village-resident:focus-visible .village-name { background: #fcdcae; }
.village-prop {
  position: absolute;
  left: calc(50% + clamp(7px, 3cqw, 28px));
  top: 35%;
  font-size: clamp(.85rem, 2.2cqw, 1.45rem);
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #4930424d);
}
.village[data-playing="true"] .village-resident[data-activity]:not([data-activity=""]) img {
  animation-name: village-activity;
}
.village[data-playing="true"] .village-prop:not(:empty) { animation: village-prop .62s ease-in-out infinite alternate; }
@keyframes village-activity {
  from { transform: rotate(0); }
  to { transform: rotate(5deg); }
}
@keyframes village-prop {
  from { transform: translateY(0) rotate(-6deg); }
  to { transform: translateY(-3px) rotate(7deg); }
}
.village-resident:focus-visible, .village-control:focus-visible { outline-color: #763e62; }
.village-bubble {
  --bubble-margin: min(29cqw, 124px);
  --bubble-center: clamp(var(--bubble-margin), var(--bubble-anchor, 50cqw), 100cqw - var(--bubble-margin));
  position: absolute;
  z-index: 100;
  left: var(--bubble-center);
  bottom: min(calc(100% - var(--bubble-y, 74%) + clamp(75px, 6.7cqw + 34px, 119px)), calc(100% - 108px));
  width: max-content;
  max-width: min(55cqw, 240px);
  transform: translateX(-50%);
  padding: 6px 10px 7px;
  color: var(--village-ink);
  background: #fffdf7;
  border: 2px solid #593e4c;
  border-radius: 17px;
  box-shadow: 0 5px 0 #593e4c29;
  pointer-events: none;
  font-size: clamp(.78rem, 1.6cqw, .92rem);
  line-height: 1.4;
}
.village-bubble::after {
  content: "";
  position: absolute;
  left: clamp(14px, 50% + var(--bubble-anchor, 50cqw) - var(--bubble-center), 100% - 14px);
  bottom: -7px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.village-bubble strong { display: block; margin-bottom: 2px; color: #8a465f; font-size: .83em; }
.village-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px clamp(8px, 2.5vw, 23px);
  border-top: 1px solid var(--village-line);
}
.village-scene-name { padding-inline: 4px; font-size: clamp(.78rem, 2.7vw, 1rem); font-weight: 760; }
.village-controls { display: flex; gap: 5px; }
.village-control { padding-inline: clamp(6px, 1.5vw, 14px); color: var(--village-ink); background: #fff9ee; border-color: var(--village-line); font-size: .82rem; }
.village-control:hover { background: #fbdcad; }
.village-control:disabled { opacity: .55; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  .village[data-playing="true"] .village-resident img,
  .village[data-playing="true"] .village-resident[data-activity]:not([data-activity=""]) img,
  .village[data-playing="true"] .village-prop:not(:empty) { animation: none; }
}
