/* Small discoveries, old game menus, and a fast path between rooms. */
.game-dock { position:fixed; right:14px; bottom:calc(var(--ftr,54px) + 14px); z-index:130; display:flex; align-items:center; gap:5px; }
.game-dock .dark-ball, .game-dock #arcade-chip { position:relative !important; inset:auto !important; width:32px !important; height:32px !important; min-height:0 !important; margin:0 !important; padding:2px !important; border:1px solid #7e8a72; background:#101a13e8; box-shadow:0 2px 0 #080b08; border-radius:3px; opacity:1; display:grid !important; place-items:center; transform:none; animation:none; }
.game-dock .dark-ball canvas { width:22px; height:22px; }
.game-dock #arcade-chip img { width:28px; height:28px; object-fit:contain; image-rendering:pixelated; }
.game-dock .dark-ball>span,.game-dock #arcade-chip::after,.game-dock #arcade-chip::before { display:none !important; }
.game-dock .dark-ball.wob { animation:rare-wobble 1.6s steps(2,end) 1; }
@keyframes rare-wobble { 0%,30%,70%,100%{transform:rotate(0)} 12%{transform:rotate(-11deg) translateY(-2px)} 20%{transform:rotate(8deg)} 49%{transform:rotate(9deg) translateY(-1px)} 58%{transform:rotate(-6deg)} }
.game-dock button:hover,.game-dock button:focus-visible { border-color:#ff9867; background:#273322; outline:1px solid #ff986744; }
.hdr { grid-template-columns:initial; }

.hdr .nav>.quest-chest { position:relative; width:38px; min-width:38px; padding:0 4px; border:0; box-shadow:none; background:transparent; }
.quest-chest>img { width:32px; height:32px; object-fit:contain; image-rendering:pixelated; }
.quest-chest small { position:absolute; top:-2px; right:0; background:#ff5b1c; color:#090d09; min-width:12px; font:700 9px var(--mono); }
.quest-chest-label { display:none; }
.quest-hub { z-index:500; }
.quest-hub-card { width:min(720px,calc(100vw - 24px)); max-height:86vh; overflow:auto; padding:0 20px 20px; color:#e8dfc8; background:#141b14; border:2px solid #a49573; box-shadow:5px 5px 0 #532b19,inset 0 0 0 5px #090e0a; }
.hub-title { display:grid; grid-template-columns:70px minmax(0,1fr) 30px; gap:12px; align-items:center; margin:0 -20px 20px; padding:24px 20px; background:#101610 url('/web/art/profile-sanctuary.svg') center/cover; border-bottom:2px solid #967b52; }
.hub-title>img { width:70px; image-rendering:pixelated; }
.hub-title span { font:10px var(--mono); letter-spacing:.1em; color:#ffc18d; }
.hub-title h2 { font:700 30px var(--head); margin:6px 0; color:#fff1d4; }
.hub-title p { margin:0; font:12px/1.6 var(--mono); }
.hub-title>button { color:#f1ede4; align-self:start; font-size:23px; }
.hub-remaining>h3 { color:#ffb079; font:12px var(--mono); letter-spacing:.1em; }
.hub-quest { display:grid; grid-template-columns:24px minmax(0,1fr); gap:10px; padding:14px 10px; border-top:1px solid #6f77593d; background:#20291b; margin:8px 0; }
.hub-quest h3 { font:600 18px var(--head); margin:0 0 4px; color:#fff1d4; }
.hub-quest p { font:12px/1.65 var(--mono); margin:0 0 7px; color:#d0c9b8; }
.hub-quest-mark { color:#ff9a5c; font:21px var(--mono); }
.hub-quest summary,.hub-archive>summary { cursor:pointer; font:11px/1.6 var(--mono); color:#ffba8a; padding:6px 0; }
.hub-archive { margin-top:22px; border-top:2px solid #7c775a; padding-top:10px; }
.hub-quest.complete { background:#172015; }
.hub-quest.complete .hub-quest-mark { color:#c8d9a6; }
.quest-hub .btn { color:#12190f; }

/* A new encounter lives in the handheld, with accessible health and move descriptions. */
#loading-arcade.battle-mode { width:min(430px,calc(100vw - 20px)) !important; height:auto !important; min-height:0 !important; max-height:85vh;  }
#loading-arcade.battle-mode .arcade-body { overflow:auto; max-height:calc(100dvh - 250px); }
#loading-arcade.cart-mode {  }
.battle-mode .arcade-playfield,.battle-mode .arcade-status,.battle-mode .arcade-progress { display:none !important; }
.loading-arcade:not(.battle-mode) .duel { display:none; }
#loading-arcade.cart-mode #arcade-reroll,#arcade-reroll { display:inline-grid !important; place-items:center; }
.duel { background:#131d13 url('/web/art/profile-sanctuary.svg') center/cover; border:1px solid #6f775a; padding:12px; color:#eee1c4; }
.duel-top { display:flex; justify-content:space-between; align-items:center; font:9px var(--mono); color:#d6c7a0; }
.duel-top button { color:#fff0d5; font-size:20px; }
.duel-ring { display:grid; grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr); gap:8px; align-items:center; text-align:center; padding:14px 0; }
.duel-fighter { min-width:0; display:grid; justify-items:center; gap:6px; }
.duel-fighter canvas { width:76px; height:76px; image-rendering:pixelated; border:2px solid #9b8e64; background:#0c110c; }
.duel-fighter b { font:600 16px var(--head); }
.duel-fighter small { font:9px/1.4 var(--mono); min-height:25px; }
.duel-vs { color:#ff7845; font:700 16px var(--head); }
.duel-hp { width:100%; height:9px; background:#4a2117; border:1px solid #d0c09b; }
.duel-hp i { display:block; height:100%; background:linear-gradient(90deg,#b6c99b,#ebd695); transition:width 150ms linear; }
.duel-log { background:#0c120c; border:1px solid #8c8c6544; padding:10px; font:11px/1.65 var(--mono); min-height:75px; }
.duel-moves { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.duel-moves button { color:#efe3c5; border:1px solid #b0a17b; background:#25311d; padding:8px 5px; text-align:left; }
.duel-moves b { display:block; font:600 13px var(--head); margin-bottom:5px; }
.duel-moves small { font:9px/1.45 var(--mono); display:block; }
.duel-moves button:hover:not(:disabled) { background:#49321e; border-color:#ff9a5c; }
.duel-moves button:disabled { opacity:.45; }
.duel-tip { display:block; font:9px/1.6 var(--mono); padding-top:8px; color:#d1c7ae; }

/* The profile is a little sanctuary, with controls kept readable and familiar. */
.pf-card { color:#ede0c4; background:#151c14; border:2px solid #a4936c; box-shadow:6px 6px 0 #5d3521,inset 0 0 0 5px #080f09; }
.pf-sanctuary { min-height:145px; margin:-1px -1px 20px; padding:22px 24px; align-items:start; background:#0c110d url('/web/art/profile-sanctuary.svg') center/cover; border-bottom:2px solid #a48c5f; }
.pf-sanctuary .ph { color:#f1e2ba; font:700 30px/1.1 var(--head); margin:8px 0; text-shadow:2px 2px #080b08; }
.pf-sanctuary p { max-width:280px; font:11px/1.6 var(--mono); color:#cfc6b1; }
.pf-kicker { color:#ffae76; font:9px var(--mono); letter-spacing:.1em; }
.pf-sanctuary button { color:#f2e1c4; background:#080c08aa; }
.pf-card .pf-fields label { color:#e8dbba; }
.pf-card .pf-fields small,.pf-card .pf-toggle small,.pf-card .pf-note { color:#b9bba3; }
.pf-card .pf-fields input,.pf-card .pf-fields textarea { color:#f5ebd6; background:#0d140e; border:1px solid #85886a; box-shadow:inset 0 2px 0 #0007; }
.pf-card input:focus,.pf-card textarea:focus { outline:1px solid #ff9867; border-color:#ff9867; }
.pf-card .pf-h { color:#ffc38b; font-family:var(--head); border-bottom:1px solid #9b886344; padding-bottom:10px; }
.pf-pic { padding:12px; background:#0e160e; border:1px solid #8d8059; clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px); }
.pf-card .pf-img { border:3px solid #9e8c65; box-shadow:3px 3px 0 #080d08; }
.pf-card .pf-foot { border-top:1px solid #9b886344; }
.pf-card .btn:not(.solid) { background:#d8cdae; color:#192115; }
.pf-card .pf-toggle input { accent-color:#ff713b; }
.pf-card .pf-err { color:#ffb692; }

@property --shine-x { syntax:'<percentage>'; inherits:false; initial-value:25%; }
@property --shine-y { syntax:'<percentage>'; inherits:false; initial-value:50%; }
.r-likeit { min-width:82px !important; width:82px; padding:0 7px; gap:5px; background:radial-gradient(ellipse at var(--shine-x,25%) var(--shine-y,50%),#fafff3 0,#c7f9e5 20%,#e7deff 60%,#f7ecd9 100%); transition:--shine-x 900ms ease-out,--shine-y 900ms ease-out,box-shadow 700ms,border-color 500ms; }
.r-likeit .signal-label { font-size:10px; }
.r-likeit .signal-arrow { display:none; }
.r-likeit::after { display:none; }
.r-likeit:hover,.r-likeit:focus-visible { background:radial-gradient(ellipse at var(--shine-x,25%) var(--shine-y,50%),#fff 0,#c6ffe5 27%,#e4d5ff 65%,#f9edd6 100%); box-shadow:0 0 15px #83d1cd55; }
.row.compact { grid-template-columns:54px 32px minmax(100px,1.4fr) minmax(70px,1fr) auto auto auto 82px 24px 24px !important; gap:6px !important; min-width:0; }
.row.compact .r-body,.row.compact .r-wave { min-width:0; }
.row.compact .r-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row.compact .r-art { width:54px; }
.row.compact .r-who { grid-column:1/-1; }
.row.compact .tag { max-width:70px; overflow:hidden; text-overflow:ellipsis; }
/* (navigation motion lives in keycaps.css: smooth v-flow reveal, pixel screen wipe, the ウォッチャー section stamp) */
@media(max-width:1150px) { .row.compact { grid-template-columns:48px 28px minmax(100px,1fr) minmax(60px,.7fr) auto auto 82px 24px 24px !important; }.row.compact .r-stats { display:none; } }
@media(max-width:900px) and (min-width:761px) { .row.compact { grid-template-columns:44px 28px minmax(80px,1fr) auto 82px 24px !important; }.row.compact>.r-wave,.row.compact>.r-crate,.row.compact>.tag,.row.compact>.tag+span { display:none; } }
@media(max-width:760px) {
  .game-dock { bottom:calc(var(--tab-h) + var(--pl-h) + var(--safe-b) + 10px); right:10px; }
  .hdr { grid-template-columns:auto minmax(0,1fr) auto !important; grid-template-areas:"logo . me" "search search search" !important; }
  .hdr .nav { grid-template-columns:repeat(6,minmax(0,1fr)) !important; }
  .hdr .nav>.quest-chest { width:auto; min-width:0; padding:0; }
  .quest-chest>img { width:28px; height:28px; }
  .quest-chest-label { display:block; font:600 10px var(--talk); }
  .quest-chest small { top:4px; right:calc(50% - 20px); }
  .hdr .nav>button,.hdr .nav>.nav-drop>button { font-size:10px !important; }
  #loading-arcade.battle-mode { max-height:82vh; }
  #loading-arcade.battle-mode,#loading-arcade.cart-mode {  }
  .duel-moves { grid-template-columns:1fr; }
  .duel-moves button { display:grid; grid-template-columns:100px 1fr; gap:8px; }
  .hub-title { grid-template-columns:44px minmax(0,1fr) 24px; padding:18px 14px; }
  .hub-title>img { width:44px; }.hub-title h2 { font-size:25px; }
  .pf-sanctuary { padding:20px 16px; min-height:155px; }.pf-sanctuary .ph { font-size:26px;max-width:230px; }
  .row.compact { grid-template-columns:56px minmax(0,1fr) 44px !important; }
  .row.compact>.r-wave,.row.compact>.c-dur,.row.compact>.tag,.row.compact>.r-stats,.row.compact>.r-likeit,.row.compact>.r-crate { display:none !important; }
  .row.compact:has(.r-who) { grid-template-areas:"who who who" "art body more" !important; }
  .row.compact>.r-who { grid-area:who; }
}
@media(prefers-reduced-motion:reduce) { .v-enter,#view-blend.v-enter,.game-dock .dark-ball.wob { animation:none !important; }.duel-hp i { transition:none; } }

.pf-card .pf-pic .btn { max-width:100%; white-space:normal; font-size:9px; line-height:1.5; padding:5px; }
@media(max-width:760px) {
 #loading-arcade.battle-mode { max-height:calc(100dvh - var(--tab-h) - var(--pl-h) - var(--safe-b) - 74px) !important; }
 #loading-arcade.battle-mode .arcade-body { max-height:calc(100dvh - var(--tab-h) - var(--pl-h) - var(--safe-b) - 116px) !important; }
}
