.mini-game { width: min(620px, calc(100% - 28px)); margin: 0 auto 28px; padding: clamp(16px, 4vw, 28px); border: 1px solid #d1b57e; border-radius: 20px; background: #fffcf5; color: #38291f; box-shadow: 0 12px 35px #1b1b1226; }
.game-heading h2 { font-family: var(--serif); font-size: clamp(22px, 5vw, 30px); margin: 4px 0 8px; line-height: 1.4; }
.game-heading p { font-size: 1rem; line-height: 1.7; margin: 8px 0 18px; }
.game-heading .game-eyebrow { font-size: .875rem; font-weight: 700; color: #914323; margin: 0; }
.game-stats { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 12px; background: #f0e5cc; border-radius: 10px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.game-stats strong { font-size: 1.3rem; color: #982b21; }
.catch-field { position: relative; height: clamp(290px, 48svh, 420px); overflow: hidden; border: 2px solid #c2a477; border-radius: 14px; touch-action: none; user-select: none; background: linear-gradient(#fff8df38, #fff8dfc9), url('./assets/shrine-courtyard.webp') center 70% / cover; }
.catch-field:focus-visible { outline: 3px solid #a33527; outline-offset: 3px; }
.catch-items { position: absolute; inset: 0; pointer-events: none; }
.catch-item { position: absolute; font-size: 32px; line-height: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 2px #614d3550); }
.catch-dog { position: absolute; width: 112px; height: 112px; object-fit: contain; left: 50%; bottom: 2px; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 5px 3px #2d281b30); }
.catch-pop { position: absolute; bottom: 95px; left: 50%; transform: translateX(-50%); color: #7b2715; background: #ffefb9; border-radius: 30px; padding: 3px 10px; font-size: 1.15rem; font-weight: 800; opacity: 0; pointer-events: none; }
.catch-pop.is-visible { opacity: 1; }
.game-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px; background: #fffaf0df; text-align: center; overflow-y: auto; }
.game-overlay > div { max-width: 320px; }
.game-overlay h3 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.5; margin: 0 0 12px; }
.game-overlay p { font-size: 1rem; line-height: 1.8; margin: 0 0 16px; white-space: pre-line; }
.mini-game button { min-height: 46px; border: 1px solid #a32c22; border-radius: 10px; font: inherit; font-weight: 700; background: #fffaf0; color: #86271e; cursor: pointer; padding: 10px 16px; touch-action: manipulation; }
.mini-game button:focus-visible { outline: 3px solid #d39d31; outline-offset: 3px; }
.game-overlay button { background: #a32c22; color: white; min-width: 160px; }
.mini-game button:disabled { opacity: .45; cursor: default; }
.catch-controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 12px; }
.catch-controls button { padding: 10px 8px; user-select: none; touch-action: none; }
.game-tip, .game-storage { font-size: .875rem; line-height: 1.7; color: #68594b; }
.game-message { font-size: 1rem; font-weight: 700; line-height: 1.7; min-height: 1.7em; margin: 12px 0; }
.game-other { display: inline-block; color: #902d23; font-size: 1rem; padding: 8px 0; text-underline-offset: 4px; }
.memory-field { position: relative; border-radius: 14px; overflow: hidden; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini-game .memory-card { position: relative; display: grid; place-items: center; min-width: 0; aspect-ratio: 1; padding: 0; overflow: hidden; border: 2px solid #c3924c; background: #9c3026; color: #ffe9b1; transition: border-color .16s; }
.memory-art { display: none; width: 100%; height: 100%; background-image: url('./assets/omamori-sheet.png'); background-size: 300% 200%; background-position: var(--sheet-x) var(--sheet-y); }
.memory-back { position: absolute; inset: 10px; border: 1px solid #efc97c; border-radius: 5px; background: repeating-linear-gradient(45deg, transparent 0 10px, #f5d29618 10px 11px); }
.memory-back::after { content: ''; position: absolute; width: 24px; height: 24px; top: 50%; left: 50%; border: 2px double #efc97c; transform: translate(-50%, -50%) rotate(45deg); }
.memory-card.is-open .memory-art { display: block; }
.memory-card.is-open .memory-back { display: none; }
.mini-game .memory-card.is-open { opacity: 1; border-color: #e5bb69; }
.mini-game .memory-card.is-matched { border-color: #517e46; opacity: 1; }
.memory-check { display: none; position: absolute; right: 3px; bottom: 3px; background: #31552d; color: white; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; }
.memory-card.is-matched .memory-check { display: block; }
.catch-dog { transition: transform .12s ease-out; }
.catch-dog.is-happy { transform: translate(-50%, -7px) rotate(-3deg); }
.catch-feedback-options { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.catch-feedback-options label { display: flex; align-items: center; gap: 7px; min-height: 44px; cursor: pointer; }
.catch-feedback-options input { width: 20px; height: 20px; accent-color: #9c3026; }
.game-credits { font-size: .8rem; color: #68594b; }
@media (prefers-reduced-motion: reduce) { .catch-dog { transition: none; } .catch-dog.is-happy { transform: translateX(-50%); } }
.memory-controls { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
@media (max-width: 380px) { .memory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mini-game .memory-card { aspect-ratio: 1; } .catch-controls { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .memory-card { transition: none !important; } }

.catch-item img { width: 42px; height: 36px; object-fit: contain; display: block; }
.catch-poison { padding: 3px; background: #49225b; border: 2px solid #dfbbfb; border-radius: 50%; }
.catch-dog { top: calc(79% - 35px); bottom: auto; }
.catch-pop { top: calc(79% - 63px); bottom: auto; }
.catch-pop.is-poison { background: #49225b; color: white; }
.catch-dog.is-poison { filter: drop-shadow(0 0 7px #8343ae); }
.catch-stage-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.catch-stage-picker select, .bond-screen select { font: inherit; min-height: 44px; padding: 6px 10px; border-radius: 8px; border: 1px solid #ba9767; background: white; color: #38291f; }
.catch-legend img { width: 28px; height: 25px; vertical-align: middle; object-fit: contain; }
.bond-exchange { display: grid; gap: 14px; margin: 20px 0; }
.bond-exchange article, .bond-reward { padding: 16px; border: 1px solid #d1b57e; border-radius: 12px; background: #fff8e8; margin: 12px 0; }
.bond-screen h3 { margin: 0 0 10px; font-size: 1.15rem; }
.bond-screen p { line-height: 1.8; }
.bond-screen a, .bond-reward a { color: #872b22; text-underline-offset: 4px; }
.bond-screen button { margin: 4px 0; }

.bond-screen{width:min(760px,calc(100% - 28px));padding:clamp(14px,3vw,28px);background:linear-gradient(165deg,#fffaf0,#f9eed6 58%,#fffdf7)}
.bond-host{overflow:hidden;border-radius:16px;border:2px solid #d7b977;background:#553e30}
.bond-host img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:contain}
.bond-host-copy{padding:12px clamp(16px,4vw,34px);color:#fff6dc;background:linear-gradient(110deg,#4c281d,#683825);text-shadow:0 2px 6px #170c08}
.bond-host-copy span{color:#f8dca0;letter-spacing:.1em;font-size:.78rem;font-weight:700}
.bond-host-copy h2{margin:4px 0;font:800 clamp(1.4rem,4vw,2rem)/1.3 var(--serif)}
.bond-host-copy p{margin:4px 0;font-size:clamp(.82rem,2vw,1rem);line-height:1.5}
.bond-catalog-heading{margin:18px 0 8px!important;border-bottom:2px solid #cdaa70;padding-bottom:8px;font-family:var(--serif)}
.bond-earnings{margin:8px 0;color:#694d36;font-size:.875rem}.bond-earnings summary{cursor:pointer;font-weight:700}.bond-earnings p{margin:7px 0 0}
.bond-exchange{grid-template-columns:1fr;gap:10px;margin:12px 0 20px}
.bond-exchange article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 16px;margin:0;padding:12px 16px;background:#fffdf7;border:1px solid #c9a66d;box-shadow:0 4px 12px #593c1b17}
.bond-exchange article[data-product="ruri_ticket"]{background:linear-gradient(145deg,#fbf9ff,#efe8ff);border-color:#baaad9}
.bond-exchange article[data-product="consultation"]{background:linear-gradient(145deg,#fffefa,#f9e7d7)}
.bond-product-head{display:flex;align-items:center;gap:12px;min-width:0}
.bond-product-icon{flex:0 0 56px;width:56px;height:56px;object-fit:contain;border-radius:10px}
.bond-product-head h3{margin:0;font-size:1.07rem}
.bond-product-head p{margin:3px 0 0;font-size:.82rem;line-height:1.45;color:#665443}
.bond-charm-select{grid-column:1;display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:700;margin-left:68px}
.bond-charm-select select{min-width:0;max-width:200px;flex:1}
.bond-product-actions{grid-column:2;grid-row:1/span 2;display:flex;gap:10px;align-items:center;justify-content:flex-end}
.bond-product-actions strong{white-space:nowrap;color:#8c3228;font-size:1.2rem;font-variant-numeric:tabular-nums}
.bond-product-actions strong small{font-size:.75rem}
.bond-screen .bond-product-actions button{margin:0;background:#963b31;color:#fffaf0;min-width:112px}
.bond-screen .bond-product-actions button:disabled{background:#e7dcc7;color:#61584d;opacity:1}
.bond-exchange article.is-featured{outline:3px solid #d69d38;outline-offset:2px}
.bond-balance-hint{grid-column:1/-1;font-size:.76rem;font-weight:700;color:#694d36;line-height:1.5}
.bond-screen .bond-wallet-bar{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;box-sizing:border-box;margin:12px 0 8px;padding:8px 12px;border:2px solid #d2a64f;border-radius:12px;background:linear-gradient(110deg,#fff1cb,#fffaf0 65%,#f8e2b9);box-shadow:0 2px 10px #593c1b20}
.bond-wallet-bar [hidden]{display:none!important}
.bond-auth-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0;padding:0}
.bond-balance{display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap;color:#614127;font-weight:700;font-size:.9rem;margin-right:auto}
.bond-balance strong{font-size:1.06rem;color:#932d26;font-variant-numeric:tabular-nums}
.bond-screen .bond-wallet-bar button,.bond-screen .bond-history-toggle{min-height:36px;margin:0;padding:5px 9px;border-radius:8px;font-size:.81rem;white-space:nowrap}
.bond-screen .bond-wallet-bar #bondRefresh{min-width:36px;padding:2px;font-size:1.2rem;line-height:1}
.bond-screen .bond-wallet-bar .google-login{background:#963b31;color:#fff}
.bond-screen .bond-wallet-bar .google-logout{margin-left:auto;background:#fff6e8;color:#763b26;border:1px solid #ad8753}
.bond-status{margin:4px auto 10px;text-align:center;font-size:.84rem;color:#79352d}
.bond-status:empty{display:none}
.bond-screen .bond-history-toggle{display:block;margin:16px 0 8px;padding:9px 15px;min-height:42px;border-color:#ad8753;background:#ffefd1;color:#663e20;font-size:.9rem}
.bond-screen #bondHistory[hidden]{display:none!important}
@media(max-width:650px){.bond-exchange article{grid-template-columns:1fr;gap:9px}.bond-product-actions{grid-column:1;grid-row:auto;justify-content:space-between;padding-left:68px}.bond-charm-select{grid-column:1;max-width:100%}.bond-host img{object-position:center}}
@media(max-width:370px){.bond-exchange article{padding:10px}.bond-product-icon{flex-basis:48px;width:48px;height:48px}.bond-product-actions,.bond-charm-select{padding-left:0;margin-left:60px}.bond-product-actions strong{font-size:1.05rem}.bond-screen .bond-product-actions button{min-width:100px}}

.game-library { display: grid; gap: 18px; }
.game-choice { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 16px; padding: 16px; color: #48271a; text-decoration: none; background: #fff2cd; border: 2px solid #b88339; border-radius: 16px; }
.game-choice img { width: 100%; height: 120px; object-fit: contain; border-radius: 12px; }
.game-choice h3 { margin: 0 0 8px; font-size: 1.2rem; }
.game-choice p { line-height: 1.7; margin: 0 0 8px; font-size: .9rem; }
.game-choice span { color: #982b21; font-weight: 700; }
.game-choice:focus-visible, .game-launch:focus-visible { outline: 3px solid #b47a23; outline-offset: 4px; }
.game-title-screen { text-align: center; }
.game-title-screen h2 { font-family: var(--serif); font-size: clamp(30px, 7vw, 46px); line-height: 1.35; margin: 12px 0; color: #842d22; }
.game-title-screen p { line-height: 1.8; }
.game-title-dog { width: min(230px, 65%); height: auto; display: block; margin: 4px auto; }
.game-title-charms { width: min(350px, 90%); height: auto; display: block; margin: 20px auto; border-radius: 16px; }
.game-launch { display: block; width: min(280px, 90%); padding: 16px; margin: 20px auto 12px; background: #a32c22; color: #fff; text-decoration: none; border-radius: 30px; font-size: 1.25rem; font-weight: 700; box-shadow: 0 4px 0 #69281d; }
.game-title-screen .catch-stage-picker { justify-content: center; }
@media(max-width: 390px) { .game-choice { grid-template-columns: 84px 1fr; gap: 10px; padding: 12px; } .game-choice h3 { font-size: 1.05rem; } }
.game-reward-summary{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0}.game-choice .game-reward-summary span,.game-reward-panel span{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:4px 9px;border-radius:999px;font-size:.82rem;font-weight:900;line-height:1.2}.game-choice .game-reward-summary .reward-plus,.game-reward-panel .reward-plus{border:1px solid #258551;background:#e3f8e9;color:#116438}.game-choice .game-reward-summary .reward-minus,.game-reward-panel .reward-minus{border:1px solid #bf554d;background:#fff0ed;color:#a12620}.game-choice .game-reward-summary .reward-none{border:1px solid #8b7f70;background:#f5efe5;color:#61584e}.game-reward-panel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;width:min(430px,94%);box-sizing:border-box;margin:12px auto 4px;padding:12px;border:2px solid #b88339;border-radius:14px;background:linear-gradient(180deg,#fff9df,#ffedba);box-shadow:0 5px 14px rgba(106,64,17,.12)}.game-reward-panel strong{width:100%;color:#603b1c;font-size:.95rem}.game-reward-note{width:100%;margin:0!important;color:#655344;font-size:.78rem;line-height:1.5!important}
