/* Garden-only presentation, kept separate from the shared gallery theme. */
:root { --ink: #f6f2e7; --cyber: #879b82; --panel: rgba(32, 47, 39, .92); }
.garden-shell::before { display: none; }
.garden-hud { min-height: 80px; padding: 13px 28px; gap: 22px; }
.garden-hud h1 { font-size: clamp(1rem, 2.2vw, 1.55rem); letter-spacing: .08em; margin-top: 4px; }
.garden-hud p { font-size: .65rem; letter-spacing: .16em; }
.garden-hud p span { margin: 0 8px; opacity: .5; }
.garden-hud .return-link, .garden-hud .header-reload {
  color: #45554a; background: transparent; border: 1px solid #d5d8ce;
  box-shadow: none; font-size: .78rem; font-weight: 500; border-radius: 4px !important;
  min-height: 42px;
}
.garden-hud .return-link:hover, .garden-hud .header-reload:hover { background: #e9ece3; }
.stage-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(25,44,34,.12), transparent 24%, transparent 80%, rgba(25,44,34,.14));
}
.garden-caption { position: absolute; top: 30px; left: 30px; color: #354b3e; pointer-events: none; }
.garden-caption > span { display: block; font-family: "Yu Mincho", serif; font-size: 1.25rem; letter-spacing: .15em; }
.garden-caption small { display: block; margin-top: 10px; font-size: .6rem; letter-spacing: .18em; opacity: .7; }
.garden-controls {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 2; white-space: nowrap; padding: 12px 18px; border-radius: 6px;
  color: #f5f3e9; background: rgba(37,55,45,.8); backdrop-filter: blur(12px);
  font-size: .72rem; pointer-events: none;
}
.garden-controls kbd { font: inherit; letter-spacing: .13em; padding: 3px 6px; border: 1px solid #8b9989; border-radius: 3px; margin-right: 8px; }
.guide-divider { margin: 0 10px; opacity: .45; }
.touch-guide { display: none; }
.panel-open {
  top: 24px; right: 24px; min-height: 44px; padding: 0 18px; cursor: pointer;
  color: #354b3e; background: rgba(250,248,240,.95); border: 1px solid rgba(90,107,84,.3);
  border-radius: 6px !important; box-shadow: 0 4px 18px #263d3215; font-size: .85rem; font-weight: 500;
}
.panel-open span { margin-left: 6px; }
.pattern-library-panel {
  top: 24px; right: 24px; width: min(330px, calc(100% - 32px)); padding: 22px; gap: 16px;
  max-height: calc(100% - 48px); overflow-y: auto; overscroll-behavior: contain;
  color: #304438; background: rgba(250,248,240,.97); border: 1px solid #e1e1d4;
  border-radius: 10px; box-shadow: 0 18px 60px #1e34292b;
}
.pattern-library-panel p { color: #73816b; font-size: .6rem; letter-spacing: .15em; margin-bottom: 4px; }
.pattern-library-panel strong { font-weight: 600; }
.pattern-library-panel label, .pattern-library-panel small { color: #566453; font-weight: 400; line-height: 1.7; }
.pattern-library-panel select {
  color: #304438; background: #fffef9; border: 1px solid #d4d9ca; border-radius: 5px;
  min-height: 44px; font-size: .86rem;
}
.pattern-library-panel button {
  color: #faf8ed; background: #526b56; border: 1px solid #526b56; box-shadow: none;
  border-radius: 5px; min-height: 44px; cursor: pointer; font-weight: 500;
}
.pattern-library-panel button:disabled { opacity: .45; cursor: default; }
.pattern-library-panel .panel-close { color: #52634f; background: transparent; border-color: #d4d9ca; min-width: 44px; }
.pattern-library-panel .panel-actions { display: none; }
.quality-panel { border-color: #dfe2d5; background: #eef0e6; padding: 13px; }
.quality-panel button.is-active { color: #fffdf4; background: #355942; }
button:focus-visible, a:focus-visible, select:focus-visible, canvas:focus-visible { outline: 2px solid #a2844c; outline-offset: 4px; }
.loading-panel { border-color: #9ca88b; border-radius: 8px; padding: 24px; box-shadow: 0 12px 36px #24352b26; }
.touch-pad { background: rgba(41,59,44,.4); border-color: rgba(242,241,218,.45); box-shadow: none; backdrop-filter: blur(6px); }
.stick-knob { background: rgba(245,240,213,.88); border-color: #fff9df; box-shadow: 0 3px 14px #24352b29; }
@media (min-width: 641px) and (pointer: fine) { .touch-pad { width: 108px; height: 108px; opacity: .65; } .stick-knob { width: 42px; height: 42px; } .stick-ring { inset: 17px; } }
@media (max-width: 640px) {
  .garden-hud { padding: max(8px, env(safe-area-inset-top)) 12px 8px; gap: 10px; min-height: 68px; }
  .garden-hud h1 { font-size: .95rem; letter-spacing: .01em; }
  .garden-hud p { font-size: .52rem; letter-spacing: .03em; }
  .garden-hud p span { margin: 0 2px; }
  .garden-hud .return-link { min-width: 48px; padding: 10px 8px; }
  .garden-hud .header-reload { min-width: 58px; padding: 10px 8px; font-size: .68rem; }
  .garden-caption { top: 20px; left: 18px; color: #fffdf0; text-shadow: 0 1px 6px #203629; }
  .garden-caption > span { font-size: .93rem; letter-spacing: .06em; }
  .garden-caption small { font-size: .52rem; margin-top: 6px; }
  .panel-open { right: 14px; top: 16px; padding: 0 12px; font-size: .76rem; }
  .pattern-library-panel { right: 12px; top: 12px; padding: 18px; max-height: calc(100% - 36px); }
  .garden-controls { top: 86px; bottom: auto; padding: 8px 12px; font-size: .65rem; }
  .desktop-guide { display: none; }
  .touch-guide { display: inline; }
}
@media (max-height: 500px) { .garden-caption, .garden-controls { display: none; } .garden-hud { min-height: 58px; padding-top: 6px; padding-bottom: 6px; } }

.overview-toggle { position: absolute; z-index: 2; right: 24px; top: 78px; min-height: 40px; padding: 0 17px; border: 1px solid #ced5c5; border-radius: 6px; color: #354b3e; background: rgba(250,248,240,.95); font: inherit; font-size: .8rem; cursor: pointer; }
.overview-toggle[aria-pressed="true"] { background: #465f4c; color: #fffdf0; }
@media (max-width: 640px) { .overview-toggle { right: 14px; top: 66px; min-height: 38px; font-size: .73rem; } .garden-controls { top: 114px; } }

.pond-view-toggle { top: 128px; }
@media (max-width: 640px) { .pond-view-toggle { top: 112px; } .garden-controls { top: 160px; } }

/* A single small atlas serves both the catch reveal and the collection. */
.fish-sprite { display:block; flex:none; width:128px; height:128px; background-image:url('./assets/fish-atlas.png?v=2'); background-size:500% 200%; background-repeat:no-repeat; image-rendering:pixelated; }
.fish-book-toggle { top:178px; }
.fishing-dialog { box-sizing:border-box; width:min(700px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); padding:28px; overflow:auto; border:1px solid #c9c4a9; border-radius:18px; background:#faf7eb; color:#314b40; box-shadow:0 24px 80px #142d3860; }
.fishing-dialog::backdrop { background:#102b35a8; }
.fishing-dialog header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.fishing-dialog h2 { margin:6px 0 10px; font-family:serif; font-size:1.65rem; }
.fishing-dialog p { line-height:1.7; margin:8px 0; }
.fishing-dialog small { color:#887346; font-size:.66rem; letter-spacing:.12em; }
.fishing-dialog button { padding:11px 16px; min-height:44px; border:1px solid #bdc5b4; border-radius:8px; color:#344f40; background:#fffdf6; cursor:pointer; font:inherit; font-size:.85rem; }
.fishing-dialog button.primary { background:#355d49; color:#fff9e7; border-color:#355d49; }
.fish-gallery { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:0; margin:0; }
.fish-card { display:flex; flex-direction:column; align-items:center; text-align:center; padding:8px 8px 16px; border:1px solid #dddcc8; border-radius:12px; background:linear-gradient(145deg,#fffdf7,#ebeede); min-width:0; }
.fish-card strong { display:block; font-size:.92rem; }
.fish-card small { display:block; margin-top:5px; font-size:.65rem; letter-spacing:0; }
.fish-card[data-rarity="レジェンド"]:not(.is-unknown) { border-color:#bba253; background:linear-gradient(145deg,#fff9d2,#e8e8c3); }
.fish-card.is-unknown .fish-sprite { filter:brightness(0); opacity:.12; }
.fish-card.is-unknown strong,.fish-card.is-unknown small { color:#899487; }
.fishing-dialog .dialog-note { color:#7d8374; font-size:.74rem; margin-top:20px; }
.fish-book li.fish-card { display:flex; flex-direction:row; text-align:left; justify-content:flex-start; padding:2px 7px; gap:8px; color:#fff9e7; background:#ffffff0d; }
.fish-book .fish-sprite { width:48px; height:48px; }
.fish-book .fish-card strong { font-size:.73rem; }
.fish-book .fish-card small { font-size:.6rem; color:#c9c8ad; }
.fish-book .is-unknown .fish-sprite { filter:brightness(0) invert(1); opacity:.2; }
.fish-book ol { max-height:290px; overflow:auto; }
.catch-banner { top:50%; transform:translate(-50%,-50%); width:min(350px,calc(100% - 32px)); padding:20px 24px 24px; border:1px solid #ded3a5; border-radius:20px; background:radial-gradient(ellipse at 50% 42%,#fffce5,#f6f0dc 76%); color:#334e41; box-shadow:0 18px 70px #172e4a55; animation:fishReveal .4s ease-out both; pointer-events:none; z-index:12; }
.catch-banner #catchRarity { color:#89703c; letter-spacing:.16em; font-size:.7rem; }
.catch-banner #catchMessage { color:#314e40; font-family:serif; font-size:1.6rem; margin:0; }
.catch-banner #catchReward { font-size:.88rem; color:#8b682b; margin:8px 0 0; }
.catch-art { position:relative; display:grid; place-items:center; width:100%; height:190px; isolation:isolate; }
.catch-art::before { content:""; position:absolute; z-index:-1; width:210px; height:210px; border-radius:50%; background:repeating-conic-gradient(from 12deg,#dab44799 0deg 12deg,transparent 12deg 30deg); mask-image:radial-gradient(circle,#000 24%,transparent 73%); animation:fishHalo 20s linear infinite; }
.catch-art::after { content:""; position:absolute; z-index:-1; inset:0; background:radial-gradient(ellipse,#fffbd5 5%,#f2d99166 38%,transparent 70%); }
.catch-art .fish-sprite { width:200px; height:200px; background-size:500% 200%; filter:drop-shadow(0 9px 4px #34462d25); }
.catch-banner[data-rarity="レジェンド"] { border-color:#bc994a; }
.tutorial-dialog { width:min(530px,calc(100vw - 28px)); }
.tutorial-meter { position:relative; height:36px; border-radius:9px; margin:22px 0; background:#263f46; overflow:hidden; }
.tutorial-meter span { position:absolute; width:28%; height:100%; left:36%; background:#df8fa8; }
.tutorial-meter i { position:absolute; left:47%; top:6px; color:#b5f1f4; font-style:normal; font-size:20px; }
.tutorial-steps { padding-left:24px; display:grid; gap:16px; }
.tutorial-steps li { padding-left:5px; }
.tutorial-steps li::marker { color:#9b8350; font-weight:bold; }
.tutorial-steps strong,.tutorial-steps span { display:block; }
.tutorial-steps span { font-size:.85rem; line-height:1.7; margin-top:4px; color:#627062; }
.tutorial-dialog footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:24px; }
@keyframes fishReveal { from { opacity:0; transform:translate(-50%,-46%) scale(.93); } to { opacity:1; transform:translate(-50%,-50%) scale(1); } }
@keyframes fishHalo { to { rotate:360deg; } }
@media(max-width:640px) { .fish-book-toggle { top:158px; right:14px; } .fishing-dialog { padding:20px; } .fish-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; } .fish-card .fish-sprite { width:112px; height:100px; } .catch-art::before { animation:none; } .catch-banner { width:280px; padding:16px; } .catch-art { height:160px; } .catch-art .fish-sprite { width:180px; height:180px; } .tutorial-dialog h2 { font-size:1.35rem; } }
@media(prefers-reduced-motion:reduce) { .catch-banner,.catch-art::before { animation:none; } }

@media(max-width:640px) { .garden-controls { top:208px; max-width:calc(100% - 28px); } }

/* Results occupy the top layer, above both the HUD and native collection dialogs. */
.catch-banner[popover] { position:fixed; inset:auto; left:50%; top:50%; margin:0; z-index:100; overflow:visible; }
.catch-banner[popover]::backdrop { background:transparent; pointer-events:none; }

.garden-controls[hidden] { display:none; }
.fish-book-toggle { top:78px; }
@media(max-width:640px) { .fish-book-toggle { top:66px; } .garden-controls { top:auto; bottom:20px; } }
