@font-face{font-family:Nunito;src:url(art/fonts/nunito.woff) format("woff");font-weight:200 1000;font-display:swap}
@font-face{font-family:DM;src:url(art/fonts/dm-serif-text.woff) format("woff");font-display:swap}
:root{color-scheme:light;--ink:#493328;--brass:#8c5c2f;--paper:#fff0ce;font:16px/1.45 Nunito,system-ui,sans-serif;color:var(--ink);background:#a87f50}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select{font:inherit;color:inherit}button{min-height:44px;border:0;background:transparent;cursor:pointer;font-weight:850;touch-action:manipulation}button:disabled{opacity:.56;cursor:wait}
button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #174c68;outline-offset:3px;box-shadow:0 0 0 5px #ffedb8}
[hidden]{display:none!important}img{display:block;max-width:100%}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:DM,Georgia,serif;font-weight:400;line-height:1.08}
h2{font-size:clamp(2rem,4.5vw,3rem)}h3{font-size:1.38rem}p{line-height:1.5}a{color:#69412c;text-underline-offset:3px}.icon{width:1.2em;height:1.2em;flex:none}.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}#view:focus{outline:0}
#view,.village{height:100vh;height:100dvh;position:relative;isolation:isolate}
.village{overflow:hidden;--scenery:url(art/village/valley.webp);background:#bd9b68}
.paint{position:absolute;inset:0;margin:auto;width:clamp(128dvh,100%,210dvh);height:100%;left:50%;right:auto;transform:translateX(-50%)}
.paint picture,.village-art{display:block;width:100%;height:100%;user-select:none;pointer-events:none}
.world-brand{position:absolute;pointer-events:none;top:max(1.5dvh,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:clamp(138px,18vw,285px);filter:drop-shadow(0 5px 5px #653f3b60);margin:0}.world-brand img{width:100%;max-height:13dvh;object-fit:contain}
.valley-settings{position:absolute;z-index:3;top:max(12px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right));display:grid;place-items:center;width:clamp(44px,6.5vmin,52px);aspect-ratio:1;padding:0;border:1px solid #a68359;border-radius:50%;background:#fff0cd;color:#5b3b2a;box-shadow:0 2px #7b5634,0 4px 10px #4f321c50;font:700 25px/1 system-ui,sans-serif}
.valley-settings:hover{background:#fff9e8}
.village[data-motion="off"] *{animation-play-state:paused!important}
.landmark{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);padding:0 8px;white-space:nowrap;z-index:1;isolation:isolate;display:grid;place-items:center}
.landmark::before{content:"";position:absolute;bottom:50%;height:clamp(42px,12dvh,130px);left:-7%;right:-7%}
.landmark::after{content:"";position:absolute;left:50%;top:64%;width:9px;height:clamp(13px,2.4vh,26px);background:linear-gradient(90deg,#50341f,#8c6238 45%,#6f4528);border-radius:0 0 2px 2px;box-shadow:3px 5px 4px #40281f48;z-index:-1}
.signboard{position:relative;display:grid;place-items:center;min-width:clamp(90px,9.4vw,155px);min-height:clamp(34px,4.7vh,51px);padding:8px clamp(15px,1.8vw,28px);font:850 clamp(.86rem,1.47vw,1.37rem)/1.1 Nunito,sans-serif;color:#3a2315;text-shadow:0 1px #ffe3aa;filter:drop-shadow(1px 3px 2px #55311799);transform:rotate(-2deg);transition:transform .18s,filter .18s;isolation:isolate}
.signboard::before{content:"";position:absolute;inset:-2px -2px;background:url(art/village/plank.webp) center/100% 100% no-repeat;z-index:-1}
.landmark-demo{position:absolute;left:50%;top:calc(100% - 4px);translate:-50% 0;padding:2px 8px;border:1px solid #f1ce8b;border-radius:5px;background:#4e3260;color:#fff6de;text-shadow:none;font:900 clamp(.68rem,1.6vmin,.85rem)/1.05 Nunito,sans-serif;box-shadow:0 1px 2px #3a231566}
.landmark:nth-of-type(even) .signboard{transform:rotate(2deg)}.landmark:hover .signboard,.landmark:focus-visible .signboard{transform:translateY(-3px) rotate(0) scale(1.06);filter:drop-shadow(0 4px 6px #5e3a16)}
.valley-footer{
  position:absolute;z-index:2;
  left:max(15px,env(safe-area-inset-left));right:max(15px,env(safe-area-inset-right));
  bottom:max(13px,env(safe-area-inset-bottom));
  display:grid;grid-template-areas:"journal credits daily";
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:end;gap:5px 8px;pointer-events:none;
}
.desk-left{grid-area:journal;justify-self:start}.desk-right{grid-area:daily;justify-self:end}
.village:not(.departing) .valley-footer button{pointer-events:auto}
.valley-credits{
  grid-area:credits;justify-self:center;display:grid;justify-items:center;gap:2px;
  padding:5px 10px;border-radius:11px;background:#3b2530e8;color:#fff3d7;
  text-align:center;white-space:nowrap;font:800 clamp(.67rem,1.7vmin,.86rem)/1.15 Nunito,system-ui,sans-serif;
}
.valley-credits small{color:#f7ddaf;font-size:.88em;font-weight:700}
@media(max-width:520px){
  .valley-footer{grid-template-areas:"journal daily" "credits credits";grid-template-columns:repeat(2,minmax(0,1fr))}
}
.keepsake{display:grid;justify-items:center;padding:0 4px;filter:drop-shadow(0 5px 4px #35230a70)}
.keepsake img{width:clamp(72px,7.7vw,125px);height:clamp(56px,7.2vw,100px);object-fit:contain;transition:transform .25s}.keepsake:hover img,.keepsake:focus-visible img{transform:rotate(-4deg) translateY(-4px)}
.keepsake span{background:#fff0cf;color:#4d3225;border:1px solid #ab8259;box-shadow:0 2px 1px #715037;font-weight:850}
.keepsake span{padding:3px 13px;margin-top:-4px;z-index:1;border-radius:2px 6px 3px 5px;font-size:clamp(.75rem,1.2vw,1rem);transform:rotate(-2deg)}.desk-right .keepsake span{transform:rotate(2deg)}
.landscape{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
#sheet{background:radial-gradient(ellipse at 20% 5%,#fff9e6,transparent 65%),linear-gradient(108deg,#e3be82,#fae9c4 8%,#fff2d2 83%,#ecd3a3)}
.actions,.bindings{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}
.wood-button,.primary,.purchase{padding:10px 24px;background:linear-gradient(#907342,#6a4b2c);border:1px solid #563d25;border-radius:8px 9px 6px 7px;color:#fff5dc;box-shadow:inset 0 1px #c6a466,0 3px 0 #483320}
.ink-button,.secondary{padding:9px 15px;border:1px solid #aa8655;background:#f7e1b5;border-radius:8px 5px 8px 6px}.text-action,.tool{padding:6px 10px;text-decoration:underline;text-decoration-color:#b79b72;text-underline-offset:4px}
#sheet{color:var(--ink);border:1px solid #825d3a;border-left:8px solid #587052;border-radius:8px 13px 11px 7px;width:min(540px,94vw);margin:auto;max-height:calc(94dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:13px clamp(17px,3vw,32px) 26px;box-shadow:3px 5px #d0aa71,5px 7px #8c6741,0 24px 90px #33251d77;overscroll-behavior:contain}
#sheet:is([data-kind="preview"],[data-kind="offer"]){width:min(710px,calc(100vw - 20px));padding-inline:clamp(12px,3vw,28px)}
#sheet::backdrop{background:#4a351b66;backdrop-filter:blur(3px)}
#sheet[data-kind="daily-page"]{border-left:2px solid #bc965e;transform:rotate(-.3deg)}
.folio-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:5px;margin-bottom:15px;border-bottom:1px solid #aa885685}
#page-name{font:italic 1.02rem Georgia,serif;color:#715539}#close{margin-left:auto}#panel p{margin:10px 0}.stampbook{display:grid;gap:3px;padding:0;margin:12px 0}
.stamp{display:flex;align-items:center;gap:13px;padding:8px 0;text-align:left;border-bottom:1px dashed #a58c6080}
.stamp img{width:47px;height:47px;object-fit:cover;border-radius:50%;border:2px solid #b89254}.stamp b,.stamp small{display:block}.stamp small{color:#74553d}.stamp::after{content:"›";font-size:1.4rem;margin-left:auto}
.bindings{justify-content:flex-start;margin:15px 0 0}.letter-heading{display:flex;justify-content:space-between;align-items:center;color:#74553d;font-family:Georgia,serif;font-style:italic}.letter-heading img{width:55px;max-height:48px;object-fit:contain}.invitation{text-align:center;padding:14px 0 20px}.invitation img{height:90px;max-width:85%;object-fit:contain;margin:auto}
.eyeline{font-size:.78rem;letter-spacing:.06em;color:#765636;font-weight:800;display:flex;align-items:center;gap:8px;margin-bottom:7px}
.purchase-options,.test-list{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:14px 0 9px}
.purchase-option,.test-entry{display:grid;grid-template-rows:1fr auto;gap:8px;min-width:0;padding:13px;border:1px solid #c4a476;border-radius:11px;background:#fff3d7;box-shadow:0 2px 0 #b98c4c30}
.purchase-option-bundle{border-color:#9d76a8;background:linear-gradient(145deg,#f8eadf,#ecdaf0);box-shadow:0 2px 0 #72488038}
.purchase-heading{display:flex;align-items:center;gap:9px;min-width:0}
.purchase-heading h3{font-size:clamp(1.06rem,2.65vmin,1.28rem);overflow-wrap:anywhere}
.purchase-heading img{display:block;flex:none;width:39px;height:39px;border:1px solid #bd9b71;border-radius:50%;object-fit:cover}
.purchase-heading small{display:block;color:#6e5139;margin-top:3px;font-size:.78rem;line-height:1.23}
.bundle-marks{display:flex;align-items:center;flex:none;padding-inline-end:2px}
.bundle-marks img{width:22px;height:22px;border:1px solid #fff4df;box-shadow:0 0 0 1px #956a9b}
.bundle-marks img+img{margin-inline-start:-9px}
#panel :is(.purchase-option,.test-entry) p{margin:0;font-size:.9rem;line-height:1.36}
:is(.purchase-option,.test-entry) button{align-self:end;width:100%;padding:7px 10px;font-size:.87rem;line-height:1.2;overflow-wrap:anywhere}
.purchase-game{background:#f6e2b7;border-color:#b98b53;color:#4b2e1c;box-shadow:0 2px 0 #b78952}
.purchase-game:hover:not(:disabled){background:#ffedc9}
.purchase-bundle{background:linear-gradient(#744a87,#5c346e);border-color:#4f295e;color:#fff6e6;box-shadow:inset 0 1px #ad82b8,0 2px 0 #472454}
.purchase-bundle:hover:not(:disabled){background:#532963}
.bundle-price{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 9px;width:100%;margin:6px 0 12px;font-size:.89rem;line-height:1.3}
.bundle-price dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.bundle-price :nth-last-child(-n+2){border-top:1px solid #ae8b5c;padding-top:6px;font-weight:950}
#panel .store-note{font-size:.88rem}
.game-detail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:16px}
.game-detail-actions button{min-width:0;padding:9px 12px;line-height:1.2}
@media(min-width:430px){.game-detail-actions:has(button+button){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:540px){.purchase-options:has(.purchase-option-bundle),.test-list{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-options .purchase-option-bundle:nth-child(odd){grid-column:1/-1}}
@media(min-width:760px){.test-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:539px){.test-entry:not(.purchase-option-bundle){grid-template-columns:minmax(0,1fr) minmax(6rem,.59fr);grid-template-rows:auto;align-items:center;padding:8px}.test-entry:not(.purchase-option-bundle) button{align-self:center}.test-entry .purchase-heading>img{width:34px;height:34px}}
.detail-banner{position:relative;isolation:isolate;display:grid;place-items:center;overflow:hidden;height:112px;border-radius:6px}.detail-logo{width:70%;max-height:102px;object-fit:contain}.rule{text-align:center}.still{width:100%;max-height:170px;object-fit:contain;background:#e7cea5;border-radius:5px}.offer,.language{background:#e6c89465;border:1px solid #ae8b5c;border-radius:7px;padding:13px;margin:14px 0 7px}.actions{margin-top:12px}.offer .text-action{margin-left:6px}.language{display:flex;align-items:center;justify-content:space-between}.language select{padding:8px;background:var(--paper);border:1px solid #9e8057;border-radius:5px}.feedback:not(:empty),#notice{background:#ecd7a4;color:#493624;font-weight:700;padding:9px 13px;border-radius:5px;margin-top:10px}#notice{position:fixed;bottom:17px;left:50%;transform:translateX(-50%);z-index:6;width:min(90vw,400px)}
#player{position:fixed;inset:0;display:flex;flex-direction:column;background:#433021}
.game-stage{position:relative;display:flex;flex:1;min-height:0}#frame-slot{flex:1;min-height:0;background:#e4c9a1}iframe{width:100%;height:100%;border:0;display:block}
.review-form{display:grid;gap:10px;max-width:26rem}
.review-form input{width:100%;min-height:44px;padding:8px 12px;border:1px solid #9e8057;border-radius:5px;background:var(--paper);color:inherit;font:inherit}
.review-form button{justify-self:start}
#arrival{position:absolute;inset:0;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#b38b5b;pointer-events:none}#arrival span{background:#faebd0;padding:6px 15px;border-radius:5px}.arrival-logo{width:min(62%,380px);max-height:35%;object-fit:contain;filter:drop-shadow(0 4px 6px #4e341e80)}
@media(max-width:650px){.world-brand{width:150px}.valley-footer{left:max(9px,env(safe-area-inset-left));right:max(9px,env(safe-area-inset-right));bottom:max(11px,env(safe-area-inset-bottom))}.keepsake img{width:68px;height:57px}.stamp img{width:36px;height:36px}.signboard{font-size:1rem}.letter-heading{margin-bottom:6px}}
@media(max-height:470px) and (orientation:landscape){.world-brand{width:120px}.keepsake img{height:42px;width:56px}.keepsake span{font-size:.7rem}.signboard{font-size:.84rem;min-height:29px;padding:6px 15px}}
@media(max-aspect-ratio:1/1){
  .village{--scenery:url(art/village/valley-tall.webp)}
  .paint{width:min(100%,83dvh)}
  .landmark{left:var(--px);top:var(--py)}
  .world-brand{top:max(3.4dvh,env(safe-area-inset-top));width:clamp(160px,36vw,255px)}
  .signboard{font-size:clamp(.78rem,3.35vw,1.25rem);padding:7px clamp(10px,2.8vw,20px)}
  .landmark::before{height:clamp(46px,9dvh,100px)}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

#sheet[data-kind="settings"] {
  width: min(540px, 94vw);
  max-width: calc(100vw - max(8px, env(safe-area-inset-left)) - max(8px, env(safe-area-inset-right)));
  max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)));
  padding: clamp(12px, 3.2vw, 24px);
  border: 1px solid #ae8f79;
  border-radius: 22px;
  background: #fff8e9;
  color: #382a3c;
  box-shadow: 0 18px 65px #281a3b65;
}
#sheet[data-kind="settings"]::backdrop {
  background: #211728a8;
}
#sheet[data-kind="settings"] .folio-top { margin-bottom: 12px; padding: 0; border: 0; }
#sheet[data-kind="settings"] #page-name {
  color: inherit;
  font: 700 clamp(1.25rem, 4.7vw, 2rem)/1.12 Georgia, serif;
  overflow-wrap: anywhere;
}
#sheet[data-kind="settings"] #close {
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cbb3c8;
  border-radius: 50%;
  background: linear-gradient(#fffdf6,#f7e9dd);
  box-shadow: 0 2px #dbc3ce;
  color: #69438b;
  font: 900 27px/1 Nunito,system-ui,sans-serif;
  text-decoration: none;
}
#sheet .kz-settings select {
  padding: 4px 10px;
  border: 1px solid #cbb3c8;
  border-radius: 12px;
  background: #fffdf6;
}
#sheet .kz-settings .hand-setting > div {
  padding: 3px;
  gap: 3px;
  border-radius: 13px;
  background: #eee0e5;
}
#sheet .hand-setting button { border-radius: 10px; line-height: 1.2; overflow-wrap: anywhere; }
#sheet .hand-setting button[aria-pressed="true"] { color: #fff8ef; background: #69438b; }
#sheet .kz-settings .switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: start;
}
#sheet .switch-track {
  width: 45px;
  height: 26px;
  padding: 3px;
  border-radius: 20px;
  background: #bbaabc;
  box-shadow: inset 0 1px 3px #6b53715c;
}
#sheet .switch-track::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff5e6;
  box-shadow: 0 1px 3px #664c6e6e;
}
#sheet [aria-checked="true"] > .switch-track { background: #8057a0; }
#sheet [aria-checked="true"] > .switch-track::before { transform: translateX(19px); }
@media (orientation: landscape) and (max-height: 500px) {
  #sheet .kz-settings .switch-row { display: grid; gap: 4px; text-align: center; }
}
.settings-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  margin-top: 8px;
  padding-top: 3px;
  border-top: 1px solid #aa885685;
}
.settings-links .text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 0;
  margin: 0;
  padding: 4px 3px;
  color: inherit;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}

a.ink-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: inherit;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}
