.pf-page {
  margin: 0;
  color: #493d36;
  background: #fcf7ee;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pf-skip { position: absolute; left: 8px; top: -80px; }
.pf-skip:focus { top: 8px; z-index: 1000; background: white; padding: 12px; }
.pf-game { max-width: 640px; margin: auto; padding: 26px 16px 54px; }
.pf-game * { box-sizing: border-box; }
.pf-game [hidden] { display: none !important; }
#pf-home { color: #725b4d; font-size: .9rem; }
.pf-game h1 { color: #715644; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(30px,6vw,48px); line-height: 1.15; margin: 22px 0 16px; }
.pf-game button {
  color: inherit; font: inherit; font-weight: 650; min-height: 44px; cursor: pointer;
  border: 1px solid #ccbca9; background: #fffcf4; border-radius: 12px; padding: 8px 13px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pf-game button:disabled { cursor: default; }
.pf-game :focus-visible { outline: 3px solid #30695c; outline-offset: 2px; }
.pf-game .pf-primary { display: block; width: 100%; background: #476f60; color: white; border-color: #476f60; }
.pf-panel { border: 1px solid #d9cbbc; background-color: #fffaf0; border-radius: 24px; box-shadow: 0 8px 28px #81674410; }
#pf-welcome { overflow: hidden; }
.pf-cover { width: 100%; height: auto; max-height: 280px; object-fit: cover; display: block; }
.pf-intro { padding: 16px 22px 20px; }
.pf-dialogue { margin: 3px 0 12px; font-weight: 650; color: #685147; }
.pf-intro ol { padding-left: 21px; line-height: 1.65; font-size: 14px; }
.pf-intro li + li { margin-top: 6px; }
#pf-board {
  padding: 17px clamp(12px,3vw,25px) 18px; scroll-margin-top: 78px;
  background-image: linear-gradient(90deg,#e9b6aa18 25%,transparent 25% 75%,#e9b6aa18 75%),linear-gradient(#e9b6aa18 25%,transparent 25% 75%,#e9b6aa18 75%);
  background-size: 32px 32px;
}
.pf-toolbar,.pf-ticket,.pf-actions,.pf-row,#pf-target,.pf-stamp,.pf-spatula { display: flex; align-items: center; }
.pf-toolbar { justify-content: space-between; font-size: 14px; margin: 1px 0 12px; }
#pf-left { font-weight: 700; color: #795446; }
.pf-ticket {
  justify-content: space-between; gap: 8px; padding: 10px 12px; background: #fffdf8;
  border: 1px solid #dbd1bf; border-left: 5px solid #a7bd9b; border-radius: 7px;
}
.pf-ticket strong,.pf-ticket small { display: block; }
.pf-ticket strong { font-size: 13px; }
.pf-ticket small { font-size: 11px; color: #72645b; margin-top: 3px; }
#pf-target { flex-wrap: nowrap; gap: 4px; font-size: 16px; font-weight: 700; }
#pf-target span { border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; background: #f2e7d4; }
#pf-target i { font: 12px system-ui; color: #795e4c; }
#pf-feedback { font-size: 13px; line-height: 1.5; min-height: 1.5em; margin: 12px 0; }
#pf-stack { position: relative; max-width: 390px; margin: auto; }
.pf-game .pf-row {
  width: 100%; min-height: 46px; padding: 1px 6px; justify-content: space-between; gap: 5px; border: 1px solid transparent;
  border-radius: 12px; background: transparent; color: #59463c;
}
.pf-row + .pf-row { margin-top: 1px; }
.pf-row small { width: 32%; text-align: center; color: #746458; }
.pf-pancake { position: relative; width: 66%; display: block; height: 44px; }
.pf-cake-art { width: 100%; height: 100%; }
.pf-stamp { position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%); color: #503827; gap: 3px; }
.pf-stamp svg { width: 23px; height: 23px; }
.pf-stamp b { font: bold 20px/1 Georgia,serif; }
.pf-spatula {
  position: relative; justify-content: center; width: 32%; line-height: 1.15; min-height: 32px;
  border: 1px solid #82998b; border-radius: 16px 10px 10px 16px; background: #d9e5d9; font-size: 13px;
}
.pf-spatula i { position: absolute; left: -10px; top: 13px; width: 10px; height: 4px; background: #82998b; }
.pf-hint .pf-spatula { outline: 2px dashed #936046; outline-offset: 2px; }
@media(hover:hover) { button.pf-row:not(:disabled):hover { border-color: #d5c2ad; background: #fffaf0c9; } }
.pf-plate { max-width: 253px; width: 65%; height: 14px; border: 2px solid #89a89e; background: #cfdfcf; border-radius: 15% 15% 50% 50%; margin: -2px auto 12px max(1%,calc((100% - 390px) / 2)); }
.pf-actions { gap: 8px; }
.pf-actions button { flex: 1; font-size: 13px; }
.pf-actions button:disabled { color: #897a6f; background: #f4eee6; }
#pf-confirm,#pf-result { padding: 15px; margin-top: 12px; border-radius: 14px; background: #e8eee2; }
#pf-result h2 { font-family: Georgia,serif; font-size: 23px; }
#pf-result p,#pf-confirm p { font-size: 14px; }
@media(max-width:400px) {
 .pf-game { padding: 16px 8px 34px; }
 #pf-board { padding: 11px 10px 14px; }
 .pf-ticket { padding: 8px; }
 #pf-target { gap: 2px; }
 #pf-target span { width: 18px; height: 21px; font-size: 13px; }
 .pf-intro { padding: 13px 15px 17px; }
}
@media(prefers-reduced-motion:reduce) { #pancake-flip * { scroll-behavior: auto !important; } }

