/* BLIP cabinet. Loads after site.css and reuses its tokens, nav, buttons, map and city board. */

/* ---------- Boot ---------- */
.cab-boot {
  position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: var(--bg, #0a0614); text-align: center; padding: 24px;
  transition: opacity 0.35s, visibility 0.35s;
}
.cab-boot img { animation: bob 1.6s ease-in-out infinite; }
.cab-boot p { color: var(--muted); font-size: 0.95rem; max-width: 320px; }
.cab [hidden] { display: none !important; }
body:not(.is-loading) .cab-boot { opacity: 0; visibility: hidden; pointer-events: none; }
body.is-loading { overflow: hidden; }

.ava-emo {
  display: grid; place-items: center; width: 100%; height: 100%; background: #1d1230;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; line-height: 1;
}
.cab-me__ava .ava-emo { font-size: 1.25rem; }
.cab-me__ava img { width: 100%; height: 100%; object-fit: cover; }
.me-hero__img { display: block; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; }
.me-hero__img .ava-emo { font-size: 4.2rem; }
.box__empty { color: var(--muted); font-size: 0.9rem; line-height: 1.5; padding: 6px 0; }

.cab-me {
  display: inline-flex; align-items: center; gap: 0.6em; height: 44px; padding: 4px 14px 4px 4px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1.5px solid var(--line-2); text-align: left;
  transition: background 0.2s;
}
.cab-me:hover { background: rgba(255, 255, 255, 0.12); }
.cab-me__ava { width: 34px; height: 34px; border-radius: 11px; overflow: hidden; background: linear-gradient(140deg, #ffcd6b, #ff6b3d); }
.cab-me__txt { display: grid; line-height: 1.15; }
.cab-me__txt b { font-family: var(--fd); font-size: 0.74rem; letter-spacing: 0.04em; }
.cab-me__txt small { font-size: 0.68rem; color: var(--dim); }

/* ---------- Shell ---------- */
.cab-shell {
  display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start;
  width: 100%; max-width: 1320px; margin: 0 auto; padding: 112px 28px 90px;
}
.cab-side { position: sticky; top: 100px; display: grid; gap: 16px; }
.cab-tabs { display: grid; gap: 4px; padding: 8px; border-radius: 24px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.cab-tabs button {
  display: flex; align-items: center; gap: 0.8em; padding: 0.85em 1em; border-radius: 16px; text-align: left;
  font-family: var(--fd); font-size: 0.8rem; font-weight: 700; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.cab-tabs button i { font-style: normal; font-size: 1.15rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.cab-tabs button:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.cab-tabs button[aria-current="page"] {
  color: #fff; background: linear-gradient(120deg, rgba(255, 77, 154, 0.3), rgba(139, 92, 246, 0.24));
  box-shadow: inset 0 0 0 1.5px rgba(255, 77, 154, 0.5);
}
.cab-help { padding: 18px; border-radius: 22px; background: linear-gradient(160deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.04)); border: 1px solid rgba(139, 92, 246, 0.3); }
.cab-help b { font-family: var(--fd); font-size: 0.86rem; }
.cab-help p { margin: 0.4rem 0 0.7rem; font-size: 0.84rem; color: var(--muted); line-height: 1.45; }
.cab-help a { font-family: var(--fd); font-size: 0.74rem; font-weight: 700; color: var(--pink); }

.cab-panel { display: none; }
.cab-panel.is-on { display: block; animation: panel-in 0.45s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Shared blocks ---------- */
.box { padding: 22px; border-radius: 26px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.box__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; }
.box__head h2 { font-family: var(--fd); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.box__sub { font-size: 0.8rem; color: var(--dim); }
.box__sub b { color: #fff; font-variant-numeric: tabular-nums; }
.box__hint { margin-top: 12px; font-size: 0.82rem; color: var(--dim); line-height: 1.45; }
.box__hint b { color: #fff; font-variant-numeric: tabular-nums; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45em; padding: 0.45em 0.8em; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 500;
}
.chip b { font-family: var(--fd); font-size: 0.78rem; letter-spacing: 0.06em; }
.chip i { font-style: normal; color: var(--dim); }
.chip--code { transition: background 0.2s; }
.chip--code:hover { background: rgba(255, 255, 255, 0.12); }
.chip--live { color: var(--lime); }
.chip--live i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(62, 217, 138, 0.6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(62, 217, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 217, 138, 0); } }
.btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; padding: 0.85em 1.15em; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07); border: 1.5px solid var(--line-2);
  font-family: var(--fd); font-size: 0.76rem; font-weight: 700; transition: background 0.2s, border-color 0.2s;
}
.btn-soft:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.3); }
.btn-soft:disabled { opacity: 0.4; pointer-events: none; }
.link-btn { font-family: var(--fd); font-size: 0.72rem; font-weight: 700; color: var(--pink); }
.link-btn:hover { color: #ff7fb6; }
.panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; margin-bottom: 24px; }
.panel-head__t { font-family: var(--fd); font-weight: 900; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.05; }
.panel-head__p { margin-top: 0.6rem; color: var(--muted); max-width: 40em; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button, .jump button {
  height: 34px; padding: 0 0.85em; border-radius: 11px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  font-family: var(--fd); font-size: 0.7rem; font-weight: 700; color: var(--muted); transition: background 0.2s, color 0.2s;
}
.presets button:hover, .jump button:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.presets button.is-on { background: var(--tc, var(--pink)); border-color: transparent; color: #170a1e; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump button { height: 38px; font-size: 0.72rem; }

/* ---------- Overview ---------- */
.me-hero {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center;
  padding: 32px 180px 32px 32px; border-radius: 32px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 90% at 0% 0%, rgba(255, 77, 154, 0.22), transparent 70%),
    radial-gradient(50% 80% at 100% 100%, rgba(139, 92, 246, 0.24), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--line-2);
}
.me-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.me-hero__deco { position: absolute; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.5)); animation: bob 4s ease-in-out infinite; }
.me-hero__deco--a { width: 110px; right: 150px; top: 18px; opacity: 0.85; }
.me-hero__deco--b { width: 130px; right: 26px; bottom: 14px; animation-delay: -1.6s; }
.me-hero__ava {
  position: relative; width: 136px; height: 136px; border-radius: 40px; padding: 4px;
  background: linear-gradient(140deg, var(--gold), var(--orange) 50%, var(--pink));
  box-shadow: 0 20px 50px rgba(255, 107, 61, 0.35);
}
.me-hero__ava img { width: 100%; height: 100%; border-radius: 36px; object-fit: cover; background: #1d1230; }
.me-hero__lv {
  position: absolute; right: -10px; bottom: -8px; display: grid; place-items: center; min-width: 46px; height: 38px; padding: 0 0.6em;
  border-radius: 14px; background: var(--gold); color: #170a1e; font-family: var(--fd); font-weight: 900; font-size: 1rem;
  box-shadow: 0 4px 0 #b37a00;
}
.me-hero__who { min-width: 0; max-width: 560px; }
.me-hero__title { font-family: var(--fd); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.me-hero__nick { font-family: var(--fd); font-weight: 900; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.02em; margin: 0.35rem 0 0.9rem; }
.me-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xp { margin-top: 18px; }
.xp__head { display: flex; align-items: baseline; gap: 0.4em; font-size: 0.86rem; color: var(--muted); margin-bottom: 8px; }
.xp__head b { font-family: var(--fd); color: #fff; }
.xp__nums { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--dim); font-size: 0.8rem; }
.xp__bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.xp__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--pink)); box-shadow: 0 0 18px rgba(255, 77, 154, 0.5); transition: width 0.6s var(--ease); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.stat { --sc: var(--gold); display: grid; gap: 4px; padding: 20px; border-radius: 24px; background: linear-gradient(170deg, color-mix(in srgb, var(--sc) 10%, transparent), rgba(255, 255, 255, 0.02)); border: 1px solid color-mix(in srgb, var(--sc) 22%, transparent); }
.stat--lime { --sc: var(--lime); }
.stat--sky { --sc: var(--sky); }
.stat--violet { --sc: #c4b0ff; }
.stat__k { font-family: var(--fd); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.stat__v { font-family: var(--fd); font-weight: 900; font-size: 1.65rem; letter-spacing: -0.01em; color: var(--sc); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__v small { font-size: 0.8rem; margin-left: 2px; }
.stat__n { font-size: 0.8rem; color: var(--muted); }

.ov-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-top: 16px; }
.box--city { grid-column: 1 / -1; }
.box--city .mini-board { grid-template-columns: auto minmax(0, 1fr); }
.houses { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.house {
  display: grid; justify-items: center; gap: 2px; padding: 14px 8px 12px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  transition: transform 0.3s var(--spring), border-color 0.2s, background 0.2s;
}
.house:hover { transform: translateY(-4px); border-color: rgba(255, 201, 61, 0.5); background: rgba(255, 201, 61, 0.06); }
.house__emo { display: grid; place-items: center; height: 54px; font-size: 2.6rem; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.house__emo img { width: auto; max-width: 50px; max-height: 54px; }
.house b { font-family: var(--fd); font-size: 0.76rem; margin-top: 4px; }
.house small { font-size: 0.74rem; color: var(--lime); font-weight: 600; }
.house--turret small, .house--safe small { color: var(--dim); }

.goal { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.goal__ring {
  --p: 0; position: relative; display: grid; place-items: center; align-content: center; flex: none; width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--pink) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.08) 0);
}
.goal__ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #170e2a; }
.goal__ring b, .goal__ring small { position: relative; }
.goal__ring b { font-family: var(--fd); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.goal__ring small { font-size: 0.66rem; color: var(--dim); }
.goal__big { font-family: var(--fd); font-weight: 900; font-size: 1.5rem; color: #c4b0ff; }
.goal__txt { font-size: 0.86rem; color: var(--muted); margin-top: 4px; }
.box--goal .btn-soft { width: 100%; }

.city-pill { padding: 0.35em 0.75em; border-radius: 10px; background: rgba(255, 201, 61, 0.12); color: var(--gold); font-size: 0.78rem; font-weight: 600; }
.mini-board { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.mini-board__me { display: grid; justify-items: start; gap: 2px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 201, 61, 0.08); border: 1px solid rgba(255, 201, 61, 0.25); }
.mini-board__me span { font-size: 0.72rem; color: var(--dim); }
.mini-board__me b { font-family: var(--fd); font-weight: 900; font-size: 2rem; line-height: 1; color: var(--gold); }
.mini-board__me .ok { color: var(--lime); font-weight: 600; }

/* ---------- Tools ---------- */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tool {
  --tc: var(--gold);
  padding: 26px; border-radius: 30px; scroll-margin-top: 100px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--tc) 9%, var(--bg-2)), var(--bg-2) 60%);
  border: 1px solid color-mix(in srgb, var(--tc) 24%, transparent);
}
.tool--wide { grid-column: span 2; }
.tool__head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.tool__ico { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 16px; font-size: 1.6rem; background: color-mix(in srgb, var(--tc) 18%, transparent); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.tool__head h2 { font-family: var(--fd); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.tool__head p { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }

.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; }
.pick__k { font-size: 0.78rem; color: var(--dim); margin-right: 4px; }
.pick button {
  display: inline-flex; align-items: center; gap: 0.35em; height: 36px; padding: 0 0.8em; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-family: var(--fd); font-size: 0.72rem; font-weight: 700;
  transition: background 0.2s;
}
.pick button span { font-size: 1.05rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.pick button img { width: auto; max-height: 22px; }
.pick button:hover { background: rgba(255, 255, 255, 0.1); }
.pick button[aria-pressed="true"] { background: var(--tc); border-color: transparent; color: #170a1e; }

.up { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: center; }
.up__stage { display: flex; align-items: center; justify-content: center; gap: 14px; }
.face {
  position: relative; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 32px;
  background: rgba(255, 255, 255, 0.05); border: 1.5px solid var(--line-2);
}
.face--to { border-color: var(--tc); box-shadow: 0 0 40px color-mix(in srgb, var(--tc) 30%, transparent); }
.face__emo { font-size: 4.2rem; line-height: 1; margin-top: -14px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.face__emo img { width: auto; max-width: 78px; max-height: 84px; }
.face b { position: absolute; bottom: 10px; font-family: var(--fd); font-size: 0.74rem; }
.up__arrow { display: grid; justify-items: center; gap: 4px; }
.up__arrow span { padding: 0.3em 0.6em; border-radius: 9px; background: var(--tc); color: #170a1e; font-family: var(--fd); font-weight: 900; font-size: 0.74rem; }
.up__arrow i { font-style: normal; font-size: 1.6rem; color: var(--dim); }
.up__ctrl { display: grid; gap: 14px; }

.rng { display: grid; gap: 6px; }
.rng__k { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); }
.rng__k b { font-family: var(--fd); color: #fff; font-variant-numeric: tabular-nums; }
.rng__row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.rng__row button, .stepper button {
  height: 36px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); font-family: var(--fd); font-size: 1rem; font-weight: 700;
  transition: background 0.2s;
}
.rng__row button:hover, .stepper button:hover { background: rgba(255, 255, 255, 0.15); }
.rng input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); outline: none; }
.rng input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid var(--tc); cursor: grab; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.rng input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 5px solid var(--tc); cursor: grab; }

.res { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.res--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.res__i { --rc: var(--gold); display: grid; gap: 3px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); min-width: 0; }
.res__i > span { font-family: var(--fd); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.res__i b { font-family: var(--fd); font-weight: 900; font-size: 1.1rem; color: var(--rc); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res__i > small { font-size: 0.76rem; color: var(--muted); }
.res__i--violet { --rc: #c4b0ff; }
.res__i--lime { --rc: var(--lime); }
.res__i--sky { --rc: var(--sky); }
.res__i--pink { --rc: var(--pink); }

.spark { margin-top: 18px; }
.spark__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-size: 0.76rem; color: var(--dim); margin-bottom: 8px; }
.spark__legend { display: inline-flex; align-items: center; gap: 6px; }
.spark__legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--pink); }
.spark__bars { display: flex; align-items: flex-end; gap: 3px; height: 72px; padding: 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.spark__bars i { flex: 1; max-width: 26px; height: var(--h); min-width: 2px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--tc) 60%, transparent); transition: height 0.3s var(--ease); }
.spark__bars i.is-jump { background: var(--pink); box-shadow: 0 0 12px rgba(255, 77, 154, 0.6); }

.farm { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.farm__list { display: grid; gap: 8px; max-height: 560px; overflow: auto; padding-right: 4px; }
.farm__list, .plan { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.farm__list::-webkit-scrollbar, .plan::-webkit-scrollbar { width: 6px; }
.farm__list::-webkit-scrollbar-thumb, .plan::-webkit-scrollbar-thumb { border-radius: 6px; background: rgba(255, 255, 255, 0.18); }
.frow {
  display: grid; grid-template-columns: 44px auto auto minmax(0, 1fr) 30px; grid-template-areas: "emo roles lv gain del";
  align-items: center; gap: 12px; padding: 8px 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.frow__emo { grid-area: emo; display: grid; place-items: center; font-size: 1.8rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.frow__emo img { width: auto; max-width: 36px; max-height: 38px; }
.frow__roles { grid-area: roles; display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.frow__roles button { display: grid; place-items: center; width: 32px; height: 30px; border-radius: 9px; font-size: 1rem; opacity: 0.5; transition: opacity 0.2s, background 0.2s; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.frow__roles button img { width: 20px; }
.frow__roles button[aria-pressed="true"] { opacity: 1; background: color-mix(in srgb, var(--tc) 30%, transparent); box-shadow: inset 0 0 0 1.5px var(--tc); }
.frow__lv { grid-area: lv; display: flex; align-items: center; gap: 2px; }
.frow__lv button { width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); font-weight: 700; }
.frow__lv input {
  width: 52px; height: 30px; border: 0; background: transparent; text-align: center; color: #fff;
  font-family: var(--fd); font-weight: 800; font-size: 0.9rem; -moz-appearance: textfield; appearance: textfield;
}
.frow__lv input::-webkit-inner-spin-button, .frow__lv input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.frow__gain { grid-area: gain; justify-self: end; font-family: var(--fd); font-weight: 800; font-size: 0.8rem; color: var(--lime); white-space: nowrap; }
.frow__gain.is-off { color: var(--dim); font-weight: 600; }
.frow__del { grid-area: del; width: 30px; height: 30px; border-radius: 10px; color: var(--dim); font-size: 1.2rem; }
.frow__del:hover { color: var(--red); background: rgba(255, 90, 95, 0.12); }
.farm__sum { display: grid; border-radius: 22px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); }
.farm__sum div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 13px 16px; background: rgba(255, 255, 255, 0.03); }
.farm__sum div + div { border-top: 1px solid var(--line); }
.farm__sum div > span { font-size: 0.86rem; color: var(--muted); }
.farm__sum b { font-family: var(--fd); font-weight: 900; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.farm__sum div:first-child { background: color-mix(in srgb, var(--tc) 12%, transparent); }
.farm__sum div:first-child b { font-size: 1.5rem; color: var(--tc); }
.farm__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }

.inv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.inv__ctrl { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.field__box { position: relative; display: block; }
.field__box input {
  width: 100%; height: 58px; padding: 0 3rem 0 1rem; border-radius: 18px; border: 1.5px solid var(--line-2); outline: none;
  background: rgba(255, 255, 255, 0.05); color: #fff; font-family: var(--fd); font-weight: 900; font-size: 1.4rem;
  -moz-appearance: textfield; appearance: textfield; transition: border-color 0.2s;
}
.field__box input:focus { border-color: var(--tc); }
.field__box input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field__box .gc { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; font-size: 1.5rem; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.seg button { flex: 1; height: 40px; border-radius: 12px; font-family: var(--fd); font-size: 0.72rem; font-weight: 700; color: var(--muted); transition: background 0.2s, color 0.2s; }
.seg button[aria-pressed="true"] { background: var(--tc); color: #170a1e; }
.inv__sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv__sum div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); }
.inv__sum div > span { font-size: 0.74rem; color: var(--dim); }
.inv__sum b { font-family: var(--fd); font-weight: 900; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.inv__sum .up-c { color: var(--lime); }
.inv__sum .vi-c { color: #c4b0ff; }
.inv__plan { display: grid; gap: 12px; }
.plan { display: grid; gap: 8px; max-height: 330px; overflow: auto; }
.plan li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.plan__emo { display: grid; place-items: center; font-size: 1.6rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.plan__emo img { width: auto; max-width: 30px; max-height: 32px; }
.plan__txt { display: grid; }
.plan__txt b { font-family: var(--fd); font-size: 0.8rem; }
.plan__txt small { color: var(--muted); font-size: 0.8rem; }
.plan__cost { font-family: var(--fd); font-weight: 800; font-size: 0.86rem; color: var(--gold); white-space: nowrap; }
.plan .plan__empty { display: block; color: var(--dim); text-align: center; padding: 22px; }

.lvl { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 16px; }
.lvl__n { font-family: var(--fd); font-weight: 900; font-size: 3rem; line-height: 1; color: rgba(196, 176, 255, 0.7); font-variant-numeric: tabular-nums; }
.lvl__n--to { color: #fff; text-shadow: 0 0 30px rgba(139, 92, 246, 0.8); }
.lvl i { font-style: normal; font-size: 1.6rem; color: var(--dim); }
.tool > .rng { margin-bottom: 12px; }
.curve { display: block; width: 100%; height: 80px; margin-top: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.curve__line { fill: none; stroke: var(--tc); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.curve__range { fill: color-mix(in srgb, var(--tc) 28%, transparent); }

.steppers { display: grid; gap: 8px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.stepper > span { display: grid; }
.stepper > span b { font-size: 0.92rem; font-weight: 600; }
.stepper > span small { font-family: var(--fd); font-size: 0.66rem; font-weight: 700; color: var(--tc); }
.stepper > div { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; }
.stepper output { min-width: 2.4em; text-align: center; font-family: var(--fd); font-weight: 900; font-variant-numeric: tabular-nums; }
.stepper--sm { padding: 6px; }
.pts { margin-top: 16px; padding: 18px; border-radius: 20px; background: color-mix(in srgb, var(--tc) 10%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); }
.pts__v { display: inline-block; font-family: var(--fd); font-weight: 900; font-size: 2.8rem; line-height: 1; background: linear-gradient(92deg, var(--gold), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pts__k { margin-left: 8px; color: var(--muted); font-size: 0.9rem; }
.pts__bar { position: relative; height: 12px; margin: 30px 0 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.pts__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--orange)); transition: width 0.4s var(--ease); }
.pts__bar em { position: absolute; left: var(--at); top: -6px; bottom: -6px; width: 2px; background: #fff; border-radius: 2px; font-style: normal; }
.pts__bar em span { position: absolute; bottom: calc(100% + 4px); left: 50%; translate: -50% 0; font-family: var(--fd); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.pts__note { font-size: 0.86rem; color: var(--muted); }

/* ---------- Clan ---------- */
.clan-hero {
  --cc: var(--gold);
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 28px; border-radius: 32px;
  background: radial-gradient(60% 120% at 0% 50%, rgba(255, 201, 61, 0.18), transparent 70%), var(--bg-2);
  border: 1px solid rgba(255, 201, 61, 0.3);
}
.nexus--xl { width: 112px; height: 112px; }
.nexus--xl .nexus__tag { width: 88px; height: 88px; font-size: 2.9rem; }
.clan-hero__who h1 { font-family: var(--fd); font-weight: 900; font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: 0.02em; line-height: 1; }
.clan-hero__who p { margin-top: 6px; color: var(--muted); }
.clan-hero__who p b { color: var(--gold); }
.clan-hero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.clan-hero__stats div { display: grid; padding: 12px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.clan-hero__stats b { font-family: var(--fd); font-weight: 900; font-size: 1.3rem; }
.clan-hero__stats div > span { font-size: 0.78rem; color: var(--dim); }
.clan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.held { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.held__i { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.held__i.is-burning { background: rgba(255, 107, 61, 0.08); border-color: rgba(255, 107, 61, 0.45); }
.held__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; background: rgba(255, 201, 61, 0.12); box-shadow: inset 0 0 0 1.5px rgba(255, 201, 61, 0.45); }
.is-burning .held__ico { background: rgba(255, 107, 61, 0.18); box-shadow: inset 0 0 0 1.5px var(--orange); animation: siren 1.2s steps(2) infinite; }
.held__txt { display: grid; min-width: 0; }
.held__txt > b { font-family: var(--fd); font-size: 0.95rem; }
.held__txt small { color: var(--muted); font-size: 0.8rem; }
.held__txt small b { color: var(--orange); font-variant-numeric: tabular-nums; font-family: var(--fd); }
.badge { padding: 0.5em 0.8em; border-radius: 10px; font-family: var(--fd); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.badge--ok { background: rgba(255, 201, 61, 0.14); color: var(--gold); }
.badge--fire { background: var(--orange); color: #170a1e; transition: background 0.2s; }
.badge--fire:hover { background: #ff875f; }
.held__form { padding: 14px 16px; border-radius: 18px; background: rgba(255, 107, 61, 0.06); border: 1.5px dashed rgba(255, 107, 61, 0.45); }
.held__form p { font-size: 0.86rem; color: var(--muted); }
.held__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.held__min { font-size: 0.8rem; color: var(--dim); }
.held__row .btn3d { margin-left: auto; }
.city__board--big li { font-size: 1rem; }
.city__board--big b { font-size: 0.86rem; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.split div { display: grid; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
.split div > span { font-size: 0.74rem; color: var(--dim); }
.split b { font-family: var(--fd); font-weight: 900; font-size: 1.2rem; }
.week-cities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.week-cities button {
  padding: 0.5em 0.9em; border-radius: 10px; border: 1.5px solid var(--line-2); background: rgba(255, 255, 255, 0.04);
  font-family: var(--fd); font-size: 0.7rem; font-weight: 700; color: var(--muted); transition: background 0.2s, color 0.2s;
}
.week-cities button[aria-pressed="true"] { background: rgba(255, 201, 61, 0.14); border-color: rgba(255, 201, 61, 0.5); color: var(--gold); }
.held__empty, .rank__empty { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.rank li.rank__empty { display: block; }
.rank li.is-self { box-shadow: inset 0 0 0 1.5px var(--lime); }
.cwin.is-off .cwin__ico { filter: grayscale(0.6); opacity: 0.7; }
.mini-board__me .wait { color: var(--muted); font-weight: 600; font-size: 0.74rem; }
.house.is-burning { border-color: rgba(255, 107, 61, 0.55); background: rgba(255, 107, 61, 0.07); }
.house.is-burning small { color: var(--orange); }
.chip--live.is-away { color: var(--muted); }
.chip--live.is-away i { background: var(--dim); animation: none; }
.cab-note { margin-bottom: 16px; padding: 14px 18px; border-radius: 18px; border: 1.5px dashed rgba(255, 201, 61, 0.4); color: var(--muted); font-size: 0.9rem; }
.clan-none { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.clan-none__ico { font-size: 3rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.clan-none h1 { font-family: var(--fd); font-size: 1.3rem; margin-bottom: 6px; }
.clan-none p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; max-width: 640px; }
.cwin { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cwin__ico { font-size: 2.4rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.cwin__txt { display: grid; flex: 1; }
.cwin__txt b { font-family: var(--fd); font-size: 1.1rem; }
.cwin__txt small { color: var(--muted); font-size: 0.82rem; }
.cwin__clock { font-family: var(--fd); font-weight: 900; font-size: 1.8rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.rank { display: grid; gap: 6px; }
.rank li { display: grid; grid-template-columns: 24px 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
.rank li:first-child { background: rgba(255, 201, 61, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 201, 61, 0.35); }
.rank span { font-family: var(--fd); font-weight: 800; color: var(--dim); font-size: 0.8rem; }
.rank i { font-style: normal; font-size: 1.2rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.rank b { font-family: var(--fd); font-size: 0.82rem; letter-spacing: 0.04em; }
.rank em { font-style: normal; font-family: var(--fd); font-weight: 800; font-size: 0.82rem; }

/* ---------- Monuments ---------- */
.periods { display: flex; gap: 8px; }
.periods div { display: grid; justify-items: center; min-width: 88px; padding: 10px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.periods b { font-family: var(--fd); font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.periods span { font-size: 0.74rem; color: var(--dim); }
.cab-map .world-map__frame { height: min(64vh, 600px); min-height: 380px; }
.suggest { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 22px; border-radius: 22px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); transition: background 0.2s; }
.suggest:hover { background: rgba(255, 255, 255, 0.07); }
.suggest > span:first-child { font-size: 1.8rem; }
.suggest span:nth-child(2) { display: grid; }
.suggest b { font-family: var(--fd); font-size: 0.92rem; }
.suggest small { color: var(--muted); font-size: 0.86rem; }
.suggest i { margin-left: auto; font-style: normal; font-size: 1.3rem; color: var(--pink); }
.been-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); text-align: left; }
.been-toggle span { display: grid; }
.been-toggle b { font-size: 0.9rem; }
.been-toggle small { font-size: 0.76rem; color: var(--dim); }
.been-toggle i { position: relative; flex: none; width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s; }
.been-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--spring); }
.been-toggle.is-on i { background: var(--lime); }
.been-toggle.is-on i::after { transform: translateX(18px); }

/* ---------- Account ---------- */
.acc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.acc__list div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 2px; }
.acc__list div + div { border-top: 1px solid var(--line); }
.acc__list dt { color: var(--muted); font-size: 0.9rem; }
.acc__list dd { margin: 0; font-family: var(--fd); font-weight: 700; font-size: 0.86rem; text-align: right; }
.acc__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 2px; text-align: left; }
.acc__row + .acc__row { border-top: 1px solid var(--line); }
.acc__row div { display: grid; }
.acc__row b { font-size: 0.95rem; font-weight: 600; }
.acc__row small { color: var(--dim); font-size: 0.8rem; }
.acc__row > i { font-style: normal; color: var(--dim); font-size: 1.1rem; }
a.acc__row:hover > i { color: var(--pink); }
.acc__row--out b { color: #ff8f93; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 14px 20px; border-radius: 16px; background: #fff; color: #170a1e; font-family: var(--fd); font-size: 0.78rem; font-weight: 700;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); transition: opacity 0.3s, translate 0.4s var(--spring);
}
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cab-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 100px; }
  .cab-side { top: 82px; z-index: 30; margin: 0 -28px; padding: 6px 28px; background: rgba(10, 6, 20, 0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .cab-tabs { display: flex; overflow-x: auto; scrollbar-width: none; padding: 5px; border-radius: 18px; }
  .cab-tabs::-webkit-scrollbar { display: none; }
  .cab-tabs button { flex: none; padding: 0.7em 0.95em; }
  .cab-help { display: none; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid, .clan-grid, .acc { grid-template-columns: minmax(0, 1fr); }
  .tools { grid-template-columns: minmax(0, 1fr); }
  .tool--wide { grid-column: auto; }
  .up, .farm, .inv { grid-template-columns: minmax(0, 1fr); }
  .res { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .cab-me__txt { display: none; }
  .cab-me { padding: 4px; }
  .cab-shell { padding: 92px 14px 70px; }
  .cab-side { top: 76px; margin: 0 -14px; padding: 6px 14px; }
  .me-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 18px; padding: 26px 18px 22px; border-radius: 28px; }
  .me-hero__ava { width: 112px; height: 112px; border-radius: 34px; }
  .me-hero__ava img { border-radius: 30px; }
  .me-hero__who { width: 100%; }
  .me-hero__chips { justify-content: center; }
  .me-hero__deco { display: none; }
  .xp__head { flex-wrap: wrap; justify-content: center; }
  .xp__nums { margin-left: 0; width: 100%; }
  .stat { padding: 16px; border-radius: 20px; }
  .stat__v { font-size: 1.3rem; }
  .box, .tool { padding: 18px; border-radius: 24px; }
  .mini-board, .box--city .mini-board { grid-template-columns: minmax(0, 1fr); }
  .face { width: 104px; height: 104px; border-radius: 26px; }
  .face__emo { font-size: 3.2rem; }
  .face__emo img { width: 60px; }
  .res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res__i:last-child { grid-column: span 2; }
  .res--two .res__i:last-child { grid-column: auto; }
  .frow { grid-template-columns: 40px minmax(0, 1fr) 30px; grid-template-areas: "emo roles del" "lv lv gain"; row-gap: 6px; }
  .frow__roles { justify-self: start; }
  .farm__list, .plan { max-height: none; overflow: visible; padding-right: 0; }
  .clan-hero { padding: 22px 18px; }
  .clan-hero__stats { margin-left: 0; width: 100%; }
  .clan-hero__stats div { flex: 1; }
  .periods { width: 100%; }
  .periods div { flex: 1; min-width: 0; }
  .held__i { grid-template-columns: 40px minmax(0, 1fr); }
  .held__i .badge { grid-column: 1 / -1; justify-self: start; }
  .split b { font-size: 1rem; }
}
