:root{
  color-scheme:light;--paper:#fbf6e9;--ink:#213e32;--muted:#576756;--orange:#ed762b;--rule:#dfd6bd;
  font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif;
  background:var(--paper);color:var(--ink);-webkit-text-size-adjust:100%
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html{scrollbar-gutter:stable;touch-action:manipulation}
html:not([lang=en]) .en,html[lang=en] .ja{display:none!important}
body{
  background-color:var(--paper);
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%234b4329' filter='url(%23g)' opacity='.065' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  overscroll-behavior-y:none;
}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{color:inherit;font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible{outline:3px solid #e77928;outline-offset:4px}
.mast{background:var(--ink);color:var(--paper);padding-top:env(safe-area-inset-top)}
.mast-inner{display:flex;align-items:center;justify-content:space-between;max-width:1224px;height:64px;margin:auto;padding:0 clamp(20px,4vw,56px)}
.studio{display:flex;align-items:center;gap:11px;font-family:Georgia,"Times New Roman",serif;font-size:23px;letter-spacing:-.065em;font-weight:700}
.citrus-mark{position:relative;display:inline-block;background:#ffa54c;border-radius:48% 50% 46% 48%;width:24px;height:17px;transform:rotate(-10deg);margin-top:3px}
.citrus-mark:before{content:"";position:absolute;width:12px;height:6px;background:#c6d5a2;border-radius:100% 5% 100% 5%;left:12px;top:-5px;transform:rotate(-12deg)}
.citrus-mark:after{content:"";position:absolute;border:1px solid #824a26;border-width:0 1px 0 0;width:6px;height:12px;border-radius:50%;right:7px;top:2px}
.sound{border:1px solid #6e8073;background:transparent;border-radius:100px;display:flex;align-items:center;justify-content:center;gap:8px;padding:7px 12px;min-height:36px;font-size:12px;font-weight:650}
.sound svg{width:20px;height:20px}
.sound[aria-pressed=true] .sound-off,.sound[aria-pressed=false] .sound-on{display:none}
.layout{
  width:100%;max-width:1224px;margin:0 auto;padding:clamp(52px,9vh,110px) clamp(20px,4vw,56px) clamp(30px,5vh,60px);
  display:grid;grid-template-columns:minmax(280px,.8fr) minmax(400px,1.2fr);
  grid-template-areas:"title board" "controls board";grid-template-rows:minmax(100px,1fr) minmax(100px,1fr);
  column-gap:clamp(28px,5vw,80px);align-items:center
}
.heading{grid-area:title;align-self:end;margin-bottom:35px}
h1{margin:0;font-weight:900;line-height:1.13;letter-spacing:-.095em;font-feature-settings:"palt"}
.title-prefix,.title-main{display:block;width:max-content;max-width:100%}
.title-prefix{font-size:clamp(35px,4.6vw,64px);margin-bottom:4px}
.title-main{font-size:clamp(70px,7.2vw,103px);line-height:1.08;letter-spacing:-.105em}
.punct{color:var(--orange)}
html[lang=en] h1{font-family:Georgia,"Times New Roman",serif;letter-spacing:-.075em}
.controls{grid-area:controls;width:100%;align-self:start}
.how{max-width:390px}
.instructions{border-left:3px solid var(--orange);padding-left:15px}
.instructions strong,.review-controls>strong{font-size:clamp(14px,1.4vw,18px);letter-spacing:.015em}
.instructions p{margin:8px 0 0;font-size:13px;line-height:1.75;color:var(--muted)}
.button{display:flex;align-items:center;justify-content:center;gap:15px;min-height:48px;padding:10px 18px;border-radius:9px;font-weight:750;font-size:15px;letter-spacing:.04em;transition:background-color .12s,transform .12s}
.button:active{transform:translateY(1px)}
.button.primary{color:var(--paper);background:var(--ink);border:1px solid var(--ink)}
.button.secondary{color:var(--ink);background:#f8f0df;border:1px solid #b6b59c}
.button.primary:hover{background:#314d3b}.button.secondary:hover{background:#efe7d4}
#start,#retry{margin-top:24px;width:100%;position:relative}
.arrow{position:absolute;right:20px;font-size:23px;font-weight:400}
.board{grid-area:board;min-width:0;overflow:hidden;background:#f7efd8;border:1px solid #c4bfa5;border-radius:21px;box-shadow:0 4px 0 rgba(114,90,31,.1)}
.meter-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 22px 13px;background:#fffaf0}
.metric{display:flex;align-items:baseline;gap:5px;font-variant-numeric:tabular-nums}
.metric-label{font-weight:750;color:#586656;font-size:12px;letter-spacing:.08em}
.metric strong{font-family:ui-monospace,"SFMono-Regular",Consolas,monospace;letter-spacing:-.08em;font-size:28px;font-weight:600;line-height:1}
.metric .metric-label{margin-right:4px}.unit{font-size:12px;font-weight:700}
.timer-track{height:4px;background:#e3d6b8}
#timer-fill{height:100%;background:#e67b2f;transform-origin:left center}
.arena{
  position:relative;height:clamp(340px, min(62vh,46vw),535px);
  background:radial-gradient(ellipse at 46% 36%,#fffae7 0%,#f8efd6 58%,#f2e5c4 100%);
  isolation:isolate;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none
}
.arena:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.25;background:repeating-linear-gradient(130deg,transparent 0 5px,#d0ba821b 5px 6px)}
.arena:after{content:"";pointer-events:none;position:absolute;inset:14px;border:1px solid #b9a26b38;border-radius:50%;aspect-ratio:1;max-height:83%;height:83%;width:auto;max-width:85%;margin:auto;z-index:-1}
#fruit{display:block;width:100%;height:100%;position:relative;z-index:1;touch-action:none}
.registration{position:absolute;width:11px;height:11px;border:solid #aa9265;border-width:0;opacity:.65;pointer-events:none}
.nw{top:16px;left:16px;border-width:1px 0 0 1px}.ne{top:16px;right:16px;border-width:1px 1px 0 0}
.sw{bottom:16px;left:16px;border-width:0 0 1px 1px}.se{bottom:16px;right:16px;border-width:0 1px 1px 0}
.review-banner{display:none;position:absolute;z-index:2;top:9px;left:50%;transform:translateX(-50%);padding:4px 12px;border-radius:20px;color:#fff;background:var(--ink);font-size:12px;pointer-events:none}
.complete-sheen{position:absolute;inset:0;pointer-events:none;opacity:0;z-index:2}
body[data-phase=result][data-cleared=true] .complete-sheen{animation:shine .8s ease-out;background:radial-gradient(ellipse,#ffefaa99,transparent 70%)}
@keyframes shine{0%{opacity:1}100%{opacity:0}}
#result-panel,.review-controls,.clear-only{display:none}
body[data-phase=result] #result-panel{display:block}
body:not([data-phase=ready]) #start,body:is([data-phase=result],[data-phase=review]) .how{display:none}
body[data-phase=review] .review-controls,body[data-phase=review] .review-banner{display:block}
body[data-cleared=true] .fail-only{display:none}
body[data-cleared=true] .clear-only{display:flex}
body[data-phase=result] .heading{margin-bottom:18px}
h2{font-size:20px;margin:0 0 7px}
.result-stat{display:flex;align-items:baseline;gap:5px;font-size:24px;font-weight:700}
.result-stat .metric-label{margin-right:8px}
.result-stat strong{font:700 42px/.95 ui-monospace,monospace;letter-spacing:-.09em}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0 0}
.stats>div{align-items:center;gap:6px}
.stats dt{font-size:12px;color:var(--muted)}.stats dd{margin:2px 0;font-weight:700}
.stats .clear-only{flex-direction:column;align-items:flex-start}
.action-pair{display:flex;gap:8px;margin-top:8px}.action-pair button{flex:1;padding-inline:7px}
#share-status{font-size:12px;margin-top:5px;overflow-wrap:anywhere}
footer{width:calc(100% - 40px);max-width:1112px;margin:auto;border-top:1px solid var(--rule);padding:14px 0 max(18px,env(safe-area-inset-bottom));text-align:right}
footer a{font-size:11px;color:#536152;text-decoration-thickness:1px;text-underline-offset:3px}
@media(max-width:820px){
  .mast-inner{height:48px;padding:0 19px}.studio{font-size:21px}.sound{min-height:33px;padding:5px 10px;font-size:11px}
  .layout{display:flex;flex-direction:column;align-items:stretch;gap:0;max-width:550px;padding:23px 16px 18px}
  .heading,.controls{align-self:stretch;margin:0}.heading{margin-bottom:17px}
  h1{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 3px;line-height:1.06}
  .title-prefix{margin:0;font-size:clamp(22px,6.8vw,34px)}
  .title-main{font-size:clamp(34px,11.3vw,55px)}
  .arena{height:min(105vw, max(200px,calc(100svh - 320px)),510px)}
  .meter-row{padding:12px 16px}.metric strong{font-size:23px}.board{border-radius:16px}
  .controls{margin-top:17px}.how{max-width:none}.instructions{padding-left:11px}
  .instructions p{margin-top:3px;font-size:12px}
  #start,#retry{margin-top:13px}
  body[data-phase=review] .arena{height:min(120vw,max(220px,calc(100svh - 250px)),550px)}
  body[data-phase=result] .layout{padding-top:13px}
  body[data-phase=result] .heading{margin-bottom:9px}
  body[data-phase=result] .arena{height:min(70vw,max(100px,calc(100svh - 405px)),320px)}
  body[data-phase=result] .controls{margin-top:11px}
  body[data-phase=result] .result-stat{float:right}
  body[data-phase=result] h2{display:inline-block;font-size:19px}
  body[data-phase=result] .stats{clear:both;margin:9px 0 0;padding-top:6px}
  .stats>div:not(.clear-only),body[data-cleared=true] .stats>div.clear-only{display:flex;flex-direction:row;align-items:baseline}
  body[data-cleared=true] .stats>div.fail-only{display:none}
  .result-stat strong{font-size:32px}
  footer{max-width:518px;padding-top:7px}
}
@media(max-width:360px){
 .layout{padding-inline:10px}.title-prefix{font-size:21px}.title-main{font-size:32px}
 .metric-label{font-size:11px}.instructions p{font-size:11px}
}
@media(max-height:480px) and (orientation:landscape){
 .mast-inner{height:38px}.layout{display:grid;grid-template-columns:1fr 1.35fr;grid-template-areas:"title board" "controls board";grid-template-rows:auto 1fr;align-items:start;gap:12px 20px;max-width:960px;padding:12px 18px}
 .heading,.controls,body[data-phase=result] .heading{margin:0}
 .title-prefix{font-size:23px}.title-main{font-size:39px}
 .board .arena,body[data-phase] .board .arena{height:max(160px,calc(100svh - 140px))}
 .button{min-height:35px}.instructions strong{font-size:13px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition:none!important}}

/* Enabled by the explicit placement test. It never overlaps play or result actions. */
.result-placement{container-type:inline-size;pointer-events:none;user-select:none}
.result-placement-sample{display:none}
@container (min-width:320px){
  .result-placement-sample{
    display:grid;place-items:center;box-sizing:border-box;width:320px;height:50px;
    margin:32px auto 0;border:1px dashed #8a967e;color:#56634e;
    background:#eeefe5;font:12px/1.2 system-ui,sans-serif
  }
}
