/* Every Last Grain. Every rule is under .sv so the portal can scope it under .og-<slug>. */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

.sv {
  --ink: #3a2414;
  --cream: #fff6e6;
  --cream-2: #fbe7c6;
  --accent: #e8553a;
  --accent-d: #c23f27;
  --teal: #1f9a8f;
  --teal-d: #157068;
  --gold: #f2c230;
  --green: #4bb35f;
  --on-accent: #fff;
  --sb-thumb: rgba(232, 85, 58, 0.75);
  --sb-thumb-hover: #e8553a;
  --sb-track: transparent;
  --shadow: 0 4px 0 rgba(58, 36, 20, 0.35);
  position: relative;
  height: clamp(500px, calc(100svh - 120px), 780px);
  overflow: hidden;
  background: #f6d6a8;
  color: var(--ink);
  font-family: "Fredoka", "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.25;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.sv *, .sv *::before, .sv *::after { box-sizing: border-box; }
.sv [hidden] { display: none !important; }
.sv:fullscreen { height: 100%; width: 100%; }
:where(.sv button) { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; margin: 0; }
.sv svg { display: block; }

.sv-stage { position: absolute; inset: 0; outline: none; touch-action: none; overscroll-behavior: contain; }
.sv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* HUD */
.sv-hud { position: absolute; inset: 0; pointer-events: none; }
.sv-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: flex-start; gap: 8px; }
.sv-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: 999px;
  box-shadow: var(--shadow); padding: 5px 12px 5px 6px; font-weight: 600;
}
.sv-cash b { font-size: 22px; font-weight: 700; letter-spacing: 0.01em; min-width: 3ch; font-variant-numeric: tabular-nums; }
.sv-coin {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold); border: 2.5px solid var(--ink);
  display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 16px; color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}
.sv-cash.is-pop { animation: sv-pop 0.35s ease-out; }
.sv-clear { margin: 0 auto; padding: 6px 14px; gap: 10px; }
.sv-clear-l { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; }
.sv-clear b { font-size: 18px; min-width: 4.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.sv-bar { position: relative; display: block; width: 160px; height: 14px; border-radius: 99px; background: #ead2ac; border: 2px solid var(--ink); overflow: hidden; }
.sv-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(180deg, #7fd38c, var(--green)); border-radius: 99px; transition: width 0.25s; }
.sv-tools { display: flex; gap: 6px; pointer-events: auto; }
.sv-ibtn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--cream); border: 2.5px solid var(--ink) !important; box-shadow: var(--shadow); color: var(--ink);
  transition: transform 0.08s;
}
.sv-ibtn svg { width: 22px; height: 22px; }
.sv-ibtn:hover { background: #fff; }
.sv-ibtn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(58, 36, 20, 0.35); }
.sv-ibtn:focus-visible, .sv-btn:focus-visible, .sv-tab:focus-visible, .sv-dd-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.sv-ibtn .sv-ico-off { display: none; }
.sv-ibtn[aria-pressed="true"] .sv-ico-on { display: none; }
.sv-ibtn[aria-pressed="true"] .sv-ico-off { display: block; }

.sv-reticle { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0); transition: border-color 0.15s, transform 0.15s; }
.sv-reticle i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(58, 36, 20, 0.6); }
.sv-reticle.is-hit { border-color: rgba(255, 255, 255, 0.85); }
.sv-reticle.is-dig { transform: scale(0.82); }
.sv-reticle.is-full { border-color: #ff6b57; }
.sv-reticle.is-full i { background: #ff6b57; }

.sv-floats { position: absolute; inset: 0; overflow: hidden; }
.sv-float {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 700; font-size: 20px; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(58, 36, 20, 0.5); animation: sv-rise 0.9s ease-out forwards;
}
.sv-float.is-cash { color: #8ff0a4; font-size: 32px; animation-duration: 1.4s; }

.sv-prompt {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); white-space: nowrap;
  background: rgba(58, 36, 20, 0.82); color: #fff; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 16px;
}
.sv-prompt kbd { display: inline-block; background: var(--cream); color: var(--ink); border-radius: 7px; padding: 0 7px; margin: 0 2px; font: inherit; font-weight: 700; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }

.sv-toast {
  position: absolute; left: 50%; top: 66px; transform: translate(-50%, -12px); opacity: 0; max-width: calc(100% - 24px);
  background: var(--accent); color: var(--on-accent); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow);
  padding: 8px 16px; font-weight: 600; text-align: center; transition: opacity 0.2s, transform 0.2s;
}
.sv-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.sv-toast.is-good { background: var(--teal); }

.sv-bottom { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; }
.sv-bag { padding: 6px 16px 6px 8px; gap: 10px; }
.sv-bag-ico { width: 30px; height: 30px; color: var(--accent); }
.sv-bag-body { display: flex; flex-direction: column; gap: 4px; }
.sv-bag-bar { width: 230px; height: 16px; }
.sv-bag-bar i { background: linear-gradient(180deg, #f8d38f, #e3a050); }
.sv-bag-txt { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.sv-bag-txt b { font-variant-numeric: tabular-nums; }
.sv-bag-txt small { font-size: 13px; opacity: 0.75; font-weight: 500; }
.sv-bag.is-full { background: #ffe1d9; animation: sv-shake 0.5s ease-in-out infinite alternate; }
.sv-bag.is-full .sv-bag-bar i { background: linear-gradient(180deg, #ff8a72, var(--accent)); }

/* touch controls */
.sv-touch { position: absolute; inset: 0; pointer-events: none; }
.sv-joy {
  position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: 86px; width: 128px; height: 128px; border-radius: 50%;
  background: rgba(255, 246, 230, 0.28); border: 3px solid rgba(255, 255, 255, 0.6); pointer-events: none;
}
.sv-joy-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--ink); box-shadow: var(--shadow); }
.sv-tbtn {
  position: absolute; pointer-events: auto; display: grid; place-items: center; align-content: center; gap: 2px;
  border-radius: 50%; border: 3px solid var(--ink) !important; box-shadow: 0 5px 0 rgba(58, 36, 20, 0.4); color: #fff; font-weight: 700;
  touch-action: none;
}
.sv-tbtn svg { width: 34px; height: 34px; }
.sv-tbtn-vac { right: max(18px, env(safe-area-inset-right)); bottom: 86px; width: 118px; height: 118px; background: var(--accent) !important; font-size: 15px; letter-spacing: 0.04em; }
.sv-tbtn-vac.is-on { background: var(--accent-d) !important; transform: translateY(3px) scale(0.97); box-shadow: 0 2px 0 rgba(58, 36, 20, 0.4); }
.sv-tbtn-jump { right: max(150px, calc(env(safe-area-inset-right) + 132px)); bottom: 100px; width: 64px; height: 64px; background: var(--teal) !important; }
.sv-tbtn-shop { right: max(150px, calc(env(safe-area-inset-right) + 132px)); bottom: 178px; width: 76px; height: 76px; background: var(--gold) !important; color: var(--ink); font-size: 13px; }
.sv-tbtn-shop svg { width: 28px; height: 28px; }
.sv.is-touch .sv-prompt { bottom: 228px; }
.sv.is-touch .sv-reticle { width: 28px; height: 28px; margin: -14px 0 0 -14px; }

/* overlays */
.sv-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; cursor: pointer;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 220, 160, 0.25), rgba(90, 45, 20, 0.55));
}
.sv-overlay-dim { background: rgba(58, 36, 20, 0.45); }
.sv-card {
  background: var(--cream); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 6px 0 rgba(58, 36, 20, 0.4);
  padding: 22px 26px; text-align: center; max-width: 440px; width: 100%; cursor: default;
}
.sv-title { margin: 0; font-size: clamp(34px, 7vw, 54px); line-height: 1; font-weight: 700; color: var(--accent); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(58, 36, 20, 0.35); letter-spacing: 0.01em; }
.sv-sub { margin: 8px 0 16px; font-size: 18px; font-weight: 600; opacity: 0.85; }
.sv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px;
  border-radius: 16px; background: var(--accent) !important; color: var(--on-accent) !important; font-weight: 700; font-size: 17px;
  border: 2.5px solid var(--ink) !important; box-shadow: var(--shadow); transition: transform 0.08s, filter 0.15s;
}
.sv-btn:hover { filter: brightness(1.06); }
.sv-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(58, 36, 20, 0.35); }
.sv-btn:disabled, .sv-btn.is-teal:disabled { background: #cdbba0 !important; color: #fff !important; cursor: not-allowed; filter: none; }
.sv-btn.is-teal { background: var(--teal) !important; }
.sv-btn.is-ghost { background: var(--cream-2) !important; color: var(--ink) !important; }
.sv-btn-big { font-size: 24px; min-height: 58px; padding: 10px 46px; border-radius: 20px; }
.sv-keys { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: 15px; }
.sv-keys kbd { font: inherit; font-weight: 700; background: var(--cream-2); border: 2px solid var(--ink); border-radius: 8px; padding: 0 6px; font-size: 13px; }
.sv-keys-touch { display: none; }
.sv.is-touch .sv-keys-desk { display: none; }
.sv.is-touch .sv-keys-touch { display: grid; }
.sv-hint { margin: 14px 0 0; font-size: 14px; opacity: 0.75; }
.sv-pause-card h3 { margin: 0 0 14px; font-size: 30px; }

/* menu */
.sv-menu { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(58, 36, 20, 0.45); }
.sv-panel {
  width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 rgba(58, 36, 20, 0.4);
  animation: sv-in 0.18s ease-out;
}
.sv-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 2.5px solid var(--ink); background: var(--cream-2); }
.sv-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; }
.sv-tab { padding: 8px 16px; border-radius: 14px; font-weight: 700; font-size: 16px; white-space: nowrap; border: 2.5px solid transparent !important; }
.sv-tab[aria-selected="true"] { background: var(--accent) !important; color: var(--on-accent); border-color: var(--ink) !important; box-shadow: 0 3px 0 rgba(58, 36, 20, 0.3); }
.sv-panel-body { overflow-y: auto; padding: 14px; flex: 1; min-height: 0; overscroll-behavior: contain; }

.sv-panel-body::-webkit-scrollbar { width: 14px; }
.sv-panel-body::-webkit-scrollbar-track { background: var(--sb-track); margin: 14px 0; }
.sv-panel-body::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 99px; border: solid transparent; border-width: 3px 6px 3px 3px; background-clip: padding-box; }
.sv-panel-body::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: padding-box; }
.sv-panel-body::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  .sv-panel-body { scrollbar-color: var(--sb-thumb) transparent; scrollbar-width: thin; }
}

.sv-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: #ffe7c2; border: 2px dashed rgba(58, 36, 20, 0.5); font-weight: 600; font-size: 15px; }
.sv-note.is-ok { background: #d9f3e3; border-style: solid; border-color: var(--teal); }
.sv-h { margin: 6px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.7; }
.sv-tool {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 18px; padding: 10px 12px; margin-bottom: 14px; box-shadow: 0 3px 0 rgba(58, 36, 20, 0.2);
}
.sv-tool-ico { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; border: 2.5px solid var(--ink); color: #fff; font-weight: 700; font-size: 24px; }
.sv-tool-ico svg { width: 38px; height: 38px; }
.sv-tool h4, .sv-row h4 { margin: 0; font-size: 18px; }
.sv-tool p, .sv-row p { margin: 2px 0 0; font-size: 14px; opacity: 0.8; }
.sv-eff { display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--teal-d); }
.sv-eff s { opacity: 0.55; text-decoration: none; color: var(--ink); }
.sv-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.sv-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 12px; box-shadow: 0 3px 0 rgba(58, 36, 20, 0.2); }
.sv-pips { display: flex; gap: 3px; margin-top: 6px; }
.sv-pips i { width: 12px; height: 8px; border-radius: 3px; background: #ead2ac; border: 1.5px solid rgba(58, 36, 20, 0.5); }
.sv-pips i.on { background: var(--accent); }
.sv-buy { min-width: 96px; font-size: 16px; padding: 6px 12px; }
.sv-owned { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--teal-d); }
.sv-check { width: 24px; height: 24px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; color: #fff; }
.sv-check svg { width: 14px; height: 14px; }

.sv-set { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; align-items: center; gap: 10px 16px; padding: 10px 2px; border-bottom: 2px dashed rgba(58, 36, 20, 0.18); }
.sv-set:last-child { border-bottom: 0; }
.sv-set label, .sv-set .sv-set-l { font-weight: 600; }
.sv-range { display: flex; align-items: center; gap: 10px; }
.sv-range output { min-width: 3.5ch; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.sv input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
.sv input[type="range"]::-webkit-slider-runnable-track { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), #ead2ac var(--p, 50%)); border: 2px solid var(--ink); }
.sv input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--ink); box-shadow: 0 2px 0 rgba(58, 36, 20, 0.35); }
.sv input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: #ead2ac; border: 2px solid var(--ink); }
.sv input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.sv input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--ink); }
.sv input[type="range"]:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 99px; }
.sv-switch { position: relative; width: 58px; height: 32px; border-radius: 99px; background: #ead2ac !important; border: 2.5px solid var(--ink) !important; transition: background 0.15s; }
.sv-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: transform 0.15s; }
.sv-switch[aria-checked="true"] { background: var(--teal) !important; }
.sv-switch[aria-checked="true"]::after { transform: translateX(26px); }
.sv-switch:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* custom dropdown */
.sv-dd { position: relative; width: min(240px, 100%); }
.sv-dd-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 6px 12px 6px 14px;
  background: #fff !important; border: 2.5px solid var(--ink) !important; border-radius: 14px; font-weight: 700; box-shadow: 0 3px 0 rgba(58, 36, 20, 0.2);
}
.sv-dd-btn svg { width: 18px; height: 18px; transition: transform 0.18s; }
.sv-dd.is-open .sv-dd-btn svg { transform: rotate(180deg); }
.sv-dd-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 8px 18px rgba(58, 36, 20, 0.25);
  animation: sv-in 0.14s ease-out;
}
.sv-dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; font-weight: 600; cursor: pointer; outline: none; }
.sv-dd-opt small { display: block; font-weight: 500; opacity: 0.7; font-size: 12px; }
.sv-dd-opt:hover, .sv-dd-opt:focus-visible { background: var(--cream-2); }
.sv-dd-opt[aria-selected="true"] { background: #ffe1d9; color: var(--accent-d); }
.sv-dd-opt .sv-check { visibility: hidden; background: var(--accent); }
.sv-dd-opt[aria-selected="true"] .sv-check { visibility: visible; }

/* level pill */
.sv-lvl { position: relative; pointer-events: auto; padding: 5px 12px; gap: 8px; }
.sv-lvl b { font-size: 16px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sv-lvl .sv-bar { width: 70px; height: 12px; }
.sv-lvl .sv-bar i { background: linear-gradient(180deg, #8fd8ff, #3d86d6); }
.sv-lvl:hover { background: #fff; }
.sv-lvl:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.sv-lvl.has-pts { animation: sv-glow 1.2s ease-in-out infinite alternate; }
.sv-dot { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; border: 2px solid var(--ink); font-style: normal; font-weight: 700; font-size: 13px; display: grid; place-items: center; }

/* tips, detector, find popup */
.sv-tip {
  position: absolute; left: 10px; top: 66px; max-width: min(360px, calc(100% - 20px)); display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255, 246, 230, 0.96); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 8px 12px; font-weight: 600; font-size: 15px;
  animation: sv-in 0.25s ease-out;
}
.sv-tip > b { flex: none; background: var(--teal); color: #fff; border-radius: 8px; padding: 1px 7px; font-size: 12px; letter-spacing: 0.06em; margin-top: 1px; }
.sv-tip kbd { font: inherit; font-weight: 700; background: var(--cream-2); border: 2px solid var(--ink); border-radius: 7px; padding: 0 5px; font-size: 13px; }
.sv-detect { position: absolute; left: 50%; top: calc(50% + 30px); transform: translateX(-50%); display: flex; gap: 3px; align-items: flex-end; padding: 4px 6px; border-radius: 10px; background: rgba(58, 36, 20, 0.55); }
.sv-detect i { width: 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.sv-detect i:nth-child(1) { height: 6px; } .sv-detect i:nth-child(2) { height: 9px; } .sv-detect i:nth-child(3) { height: 12px; } .sv-detect i:nth-child(4) { height: 15px; } .sv-detect i:nth-child(5) { height: 18px; }
.sv-detect i.on { background: #7ff7e6; }
.sv-findpop {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; width: min(420px, calc(100% - 24px));
  background: var(--cream); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 0 0 4px var(--rc, var(--gold)), var(--shadow); padding: 10px 16px 10px 10px;
}
.sv-findpop.is-in { animation: sv-findin 0.45s cubic-bezier(0.2, 1.5, 0.4, 1); }
.sv-findpop img { width: 84px; height: 84px; flex: none; border-radius: 14px; background: radial-gradient(circle, #fff 0%, #fbe7c6 70%); }
.sv-findpop small { font-size: 13px; font-weight: 600; opacity: 0.8; }
.sv-findpop small b { color: var(--rc); }
.sv-findpop h4 { margin: 2px 0; font-size: 22px; line-height: 1.1; }
.sv-findpop p { margin: 0; font-size: 14px; }

/* end card + storm */
.sv-end-card h3 { margin: 0; font-size: clamp(30px, 6vw, 44px); color: var(--teal); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.sv-end-card .sv-btn-big { margin-top: 4px; }
.sv-end-card .is-ghost { margin-top: 12px; }
.sv-stats { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sv-stats li { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 4px; display: grid; gap: 2px; }
.sv-stats b { font-size: 20px; }
.sv-stats span { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
.sv-storm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; background: rgba(214, 160, 96, 0); }
.sv-storm.is-on { animation: sv-stormbg 2.9s ease-in-out forwards; }
.sv-storm i {
  position: absolute; top: 0; left: -100%; width: 300%; height: 100%;
  background:
    radial-gradient(ellipse 9% 7% at 12% 22%, rgba(255, 232, 196, 0.7), transparent 70%),
    radial-gradient(ellipse 12% 9% at 31% 64%, rgba(196, 128, 64, 0.55), transparent 70%),
    radial-gradient(ellipse 8% 5% at 47% 38%, rgba(255, 232, 196, 0.65), transparent 70%),
    radial-gradient(ellipse 14% 8% at 63% 80%, rgba(255, 232, 196, 0.5), transparent 70%),
    radial-gradient(ellipse 10% 7% at 79% 15%, rgba(196, 128, 64, 0.5), transparent 70%),
    radial-gradient(ellipse 9% 6% at 92% 55%, rgba(255, 232, 196, 0.6), transparent 70%);
  background-size: 33.334% 100%;
  background-repeat: repeat-x;
}
.sv-storm i:nth-child(1) { animation: sv-streak 1.1s linear infinite; }
.sv-storm i:nth-child(2) { animation: sv-streak 0.8s linear infinite; transform: scaleY(-1); top: 8%; }
.sv-storm i:nth-child(3) { animation: sv-streak 1.4s linear infinite; top: -12%; opacity: 0.7; }
.sv-storm-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 10px 14px; border-radius: 16px; background: #d9f3e3; border: 2.5px solid var(--teal); }
.sv-storm-card h4 { margin: 0; font-size: 18px; }
.sv-storm-card p { margin: 2px 0 0; font-size: 14px; }

/* skills */
.sv-skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sv-skcol { display: grid; gap: 8px; align-content: start; }
.sv-sk { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px; box-shadow: 0 3px 0 rgba(58, 36, 20, 0.2); position: relative; }
.sv-sk.has-req::before { content: ""; position: absolute; left: 26px; top: -11px; width: 4px; height: 10px; background: var(--ink); border-radius: 2px; }
.sv-sk h4 { margin: 0; font-size: 16px; }
.sv-sk p { margin: 2px 0 0; font-size: 13px; opacity: 0.8; }
.sv-sk small { display: block; margin-top: 4px; font-size: 12px; color: var(--accent-d); font-weight: 600; }
.sv-sk.is-have { background: #f0fbf4; }
.sv-sk.is-locked { opacity: 0.6; }
.sv-sk .sv-pips i.on { background: var(--teal); }
.sv-sk .sv-buy { min-width: 64px; }
.sv-pipe-btn { position: relative; font-size: 15px; padding: 6px 12px; }

/* finds collection */
.sv-finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sv-find { display: grid; justify-items: center; align-content: start; text-align: center; gap: 2px; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 8px; box-shadow: 0 3px 0 rgba(58, 36, 20, 0.2), inset 0 -4px 0 var(--rc); }
.sv-find img { width: 80px; height: 80px; }
.sv-find.is-unknown { background: #f6ead6; }
.sv-find.is-unknown img { opacity: 0.55; }
.sv-rar { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; background: var(--rc); border-radius: 99px; padding: 1px 8px; }
.sv-find h4 { margin: 4px 0 0; font-size: 15px; line-height: 1.15; }
.sv-find p { margin: 0 0 6px; font-size: 12px; opacity: 0.75; }
.sv-find small { font-size: 12px; opacity: 0.6; font-weight: 600; }
.sv-find .sv-buy { min-width: 0; font-size: 14px; padding: 4px 10px; }

@keyframes sv-glow { from { box-shadow: var(--shadow); } to { box-shadow: var(--shadow), 0 0 0 4px rgba(232, 85, 58, 0.45); } }
@keyframes sv-findin { from { opacity: 0; transform: translateX(-50%) scale(0.6); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes sv-stormbg { 0% { background: rgba(214, 160, 96, 0); } 40%, 60% { background: rgba(214, 160, 96, 0.97); } 100% { background: rgba(214, 160, 96, 0); } }
@keyframes sv-streak { from { translate: 0 0; } to { translate: 33.33% 0; } }
@keyframes sv-rise { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
@keyframes sv-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes sv-shake { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
@keyframes sv-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .sv-top { flex-wrap: wrap; }
  .sv-clear { order: 3; margin: 0; flex-basis: 100%; justify-content: center; padding: 4px 12px; }
  .sv-clear-l { font-size: 11px; }
  .sv-bar { width: 100%; max-width: 220px; }
  .sv-tools { margin-left: auto; }
  .sv-cash b { font-size: 19px; }
  .sv-toast { top: 110px; }
  .sv-ibtn { width: 40px; height: 40px; }
  .sv-bag-bar { width: 170px; }
  .sv-set { grid-template-columns: 1fr; gap: 6px; }
  .sv-rows { grid-template-columns: 1fr; }
  .sv-tool { grid-template-columns: 48px 1fr; }
  .sv-tool-ico { width: 48px; height: 48px; }
  .sv-tool > :last-child { grid-column: 1 / -1; }
  .sv-tool > :last-child .sv-btn { width: 100%; }
  .sv-lvl .sv-bar { width: 44px; }
  .sv-lvl { padding: 5px 10px; }
  .sv-tip { top: 104px; font-size: 14px; }
  .sv-toast { top: 160px; }
  .sv-skills { grid-template-columns: 1fr; }
  .sv-finds { grid-template-columns: repeat(2, 1fr); }
  .sv-stats { grid-template-columns: repeat(2, 1fr); }
  .sv-tab { padding: 7px 10px; font-size: 15px; }
  .sv-storm-card { flex-direction: column; align-items: stretch; }
}
@media (max-aspect-ratio: 4/5) {
  .sv-tbtn-vac { width: 100px; height: 100px; bottom: 96px; font-size: 13px; }
  .sv-tbtn-jump { right: max(36px, calc(env(safe-area-inset-right) + 18px)); bottom: 210px; }
  .sv-tbtn-shop { right: max(30px, calc(env(safe-area-inset-right) + 12px)); bottom: 288px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .sv-joy { bottom: 20px; width: 112px; height: 112px; }
  .sv-tbtn-vac { bottom: 20px; width: 100px; height: 100px; }
  .sv-tbtn-jump { bottom: 32px; right: max(132px, calc(env(safe-area-inset-right) + 116px)); }
  .sv-tbtn-shop { bottom: 104px; right: max(132px, calc(env(safe-area-inset-right) + 116px)); }
  .sv.is-touch .sv-bottom { bottom: 8px; }
  .sv.is-touch .sv-prompt { bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .sv-panel, .sv-dd-list, .sv-cash.is-pop, .sv-bag.is-full, .sv-tip, .sv-findpop.is-in, .sv-lvl.has-pts, .sv-storm i { animation: none; }
  .sv-float { animation-duration: 0.01s; }
}
