/* Дурдом Live - тёплый пластилиновый закат + больничная эстетика: кафель, зелёная масляная стена, штампы, бирки */
@font-face { font-family: Unbounded; src: url(../fonts/unbounded-900.woff) format('woff'); font-weight: 700 900; font-display: swap; }
@font-face { font-family: Manrope; src: url(../fonts/manrope-600.woff) format('woff'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(../fonts/manrope-800.woff) format('woff'); font-weight: 700 900; font-display: swap; }

:root {
  --ink: #3a2418; --ink-2: #5b3d2a; --cream: #f7ecd4; --cream-2: #efdfbd; --paper: #fbf3e1;
  --green: #5f9a62; --green-d: #3f6b47; --green-wall: #4f8456; --red: #d9473b; --red-d: #b8352c;
  --gold: #f2c45a; --gold-d: #c99a2e; --blue: #2f5aa8; --mint: #3ec46d; --sky: #f6c39a;
  --tile: #f4f7f2; --grout: #cdd6cb;
  --tab-h: 70px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 3px 0 var(--ink);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2b1c14; color: var(--ink);
  font: 600 15px/1.35 Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; }
svg { display: block; width: 100%; height: 100%; }
.hide { display: none !important; }

#yard { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; transition: opacity .25s; }
#yard.fade { opacity: 0; }

/* ---------- шапка */
.top { position: fixed; left: 0; right: 0; top: 0; z-index: 20; padding: calc(var(--safe-t) + 8px) 10px 0; pointer-events: none; }
.top > * { pointer-events: auto; }
.row1 { display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px 0 11px; background: var(--cream); border: 2.5px solid var(--ink);
  border-radius: 11px; box-shadow: var(--shadow); position: relative; white-space: nowrap; }
.logo b { font: 900 14.5px/1 Unbounded, sans-serif; letter-spacing: .01em; }
.logo .live { font: 900 10.5px/1 Unbounded, sans-serif; color: #fff; background: var(--red); border: 2px solid var(--ink); border-radius: 6px;
  padding: 3px 5px 3px 13px; transform: rotate(-6deg); position: relative; }
.logo .live::before { content: ''; position: absolute; left: 4px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.seg { margin-left: auto; display: flex; padding: 3px; gap: 3px; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow);
  background: var(--tile) linear-gradient(var(--grout) 1px, transparent 1px) 0 0 / 14px 14px; }
.seg button { height: 34px; min-width: 64px; padding: 0 9px; border-radius: 8px; font: 900 11px/1 Unbounded, sans-serif; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.seg button small { font: 800 10.5px/1 Manrope, sans-serif; opacity: .8; }
.seg button.on { background: linear-gradient(#72ab74, #4b8452); color: #fff8e6; box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.2); }

.ticker { margin: 8px -10px 0; height: 30px; display: flex; align-items: center; overflow: hidden; background: linear-gradient(#36583c, #2c4a33);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); color: #fff3d6; position: relative; }
.ticker .tl { flex: none; height: 100%; display: flex; align-items: center; padding: 0 9px; background: var(--red); color: #fff; z-index: 1;
  font: 900 10px/1 Unbounded, sans-serif; letter-spacing: .04em; border-right: 2px solid var(--ink); box-shadow: 6px 0 10px rgba(0,0,0,.35); }
.ticker .tt { flex: 1; overflow: hidden; height: 100%; position: relative; }
.ticker .tm { position: absolute; left: 0; top: 0; height: 100%; display: flex; align-items: center; white-space: nowrap; will-change: transform;
  font: 700 13px/1 Manrope, sans-serif; animation: tick var(--dur, 60s) linear infinite; }
.ticker .tm span { padding: 0 6px; }
.ticker .tm i { font-style: normal; color: #ffd36b; padding: 0 10px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.search { margin-top: 8px; position: relative; z-index: 3; }
.under { position: relative; z-index: 1; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.sbox { height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; background: #fffdf7; border: 2.5px solid var(--ink);
  border-radius: 14px; box-shadow: var(--shadow); }
.sbox .ic { width: 20px; height: 20px; flex: none; opacity: .8; }
.sbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 800 16px Manrope, sans-serif; color: var(--ink); -webkit-user-select: text; user-select: text; }
.sbox input::placeholder { color: #9b8370; font-weight: 600; }
.sbox .at { font: 800 16px Manrope; color: #9b8370; margin-right: -6px; }
.sbox .clr { width: 34px; height: 34px; padding: 8px; border-radius: 9px; }
.sugg { position: absolute; left: 0; right: 0; top: 52px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 rgba(58,36,24,.35);
  overflow: hidden; max-height: 50vh; overflow-y: auto; }
.sugg button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; text-align: left; border-bottom: 1px dashed #d8c4a0; font-weight: 800; }
.sugg button:last-child { border-bottom: 0; }
.sugg button img, .sugg button canvas { width: 30px !important; height: 40px !important; object-fit: contain; flex: none; }
.sugg button em { margin-left: auto; font-style: normal; font: 800 11px Manrope; color: #8b6a4a; }
.sugg .none { padding: 14px 12px; color: #8b6a4a; font-weight: 700; }

/* бирка-счётчик и килл-фид - под поиском, не мешают пальцам */
.under { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 10px; gap: 8px; pointer-events: none !important; }
.tag { flex: none; position: relative; padding: 6px 11px 6px 22px; background: var(--cream); border: 2px solid var(--ink); border-radius: 6px 12px 12px 6px;
  box-shadow: 0 2px 0 var(--ink); transform: rotate(-2.5deg); transform-origin: left top; pointer-events: auto; }
.tag::before { content: ''; position: absolute; left: 7px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #7f8a45; border: 2px solid var(--ink); }
.tag small { display: block; font: 800 10px/1 Manrope; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.tag b { display: block; font: 900 17px/1.1 Unbounded, sans-serif; margin-top: 2px; }
.kf { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: calc(100% - 128px); pointer-events: none; }
.kf .k { display: flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 8px 4px 7px; border-radius: 10px; background: rgba(43,26,18,.84);
  border: 1.5px solid rgba(255,230,190,.28); color: #fff1d6; font: 800 12px/1.25 Manrope, sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  animation: kfin .28s cubic-bezier(.2,1.4,.4,1) both; transition: opacity .5s, transform .5s, max-height .45s, margin .45s, padding .45s; max-height: 60px; }
.kf .k.out { opacity: 0; transform: translateX(30px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -5px; }
.kf .k .ki { width: 20px; height: 20px; flex: none; }
.kf .k .a { color: #ffd36b; } .kf .k .b { color: #ff9e8a; }
.kf .k .tx { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kf .k .pl { flex: none; font: 900 8.5px/1 Unbounded; padding: 2px 3px; border-radius: 4px; background: #fff1d6; color: var(--ink); opacity: .85; }
@keyframes kfin { from { transform: translateX(110%); opacity: 0; } }

.zoom { position: fixed; right: 10px; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); z-index: 15; display: flex; flex-direction: column; gap: 8px; }
.zoom button { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: #fffdf7; border: 2.5px solid var(--ink); box-shadow: var(--shadow); }
.zoom button:active, .btn:active, .tab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.zoom .home { padding: 9px; }

.perf { position: fixed; left: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 70px); z-index: 15; font: 700 11px/1.3 ui-monospace, monospace; color: #fff; background: rgba(0,0,0,.55); padding: 4px 6px; border-radius: 6px; pointer-events: none; }
.viewonly { position: fixed; left: 10px; bottom: calc(var(--tab-h) + var(--safe-b) + 22px); z-index: 15; max-width: calc(100% - 80px); min-height: 38px !important; font-size: 10.5px !important; padding: 4px 10px 4px 6px !important; }
.viewonly .bi { width: 22px !important; height: 22px !important; }

/* ---------- нижняя панель: кафель */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + var(--safe-b)); padding: 6px 6px calc(var(--safe-b) + 6px);
  display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr; align-items: end; gap: 4px;
  background: var(--tile) linear-gradient(var(--grout) 1.5px, transparent 1.5px) 0 0 / 22px 22px, linear-gradient(90deg, var(--grout) 1.5px, transparent 1.5px) 0 0 / 22px 22px;
  background-color: var(--tile); border-top: 3px solid var(--ink); box-shadow: 0 -4px 14px rgba(0,0,0,.25); }
.tab { height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 800 11px/1 Manrope; color: var(--ink-2); }
.tab .ti { width: 28px; height: 28px; }
.tab.on { background: linear-gradient(#72ab74, #4b8452); color: #fff8e6; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.tab.act { position: relative; height: 60px; }
.tab.act .big { position: absolute; left: 50%; top: -28px; width: 62px; height: 62px; margin-left: -31px; border-radius: 50%; padding: 11px;
  background: radial-gradient(circle at 35% 30%, #ff8a70, var(--red) 55%, var(--red-d)); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink), 0 0 0 5px rgba(255,255,255,.65); }
.tab.act > span:last-child { position: absolute; left: -6px; right: -6px; bottom: 4px; text-align: center; font: 900 9.5px/1 Unbounded; color: var(--red-d); letter-spacing: .02em; }
.tab.act:active .big { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink), 0 0 0 5px rgba(255,255,255,.65); }

/* ---------- кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 8px 14px; border-radius: 14px;
  border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font: 900 13px/1.15 Unbounded, sans-serif; text-align: center;
  background: linear-gradient(#ffffff, #e9eee8); color: var(--ink); transition: transform .06s; }
.btn .bi { width: 26px; height: 26px; flex: none; }
.btn.green { background: linear-gradient(#77b079, #4b8452); color: #fff8e6; }
.btn.red { background: linear-gradient(#ea6a5c, #c63b30); color: #fff; }
.btn.gold { background: linear-gradient(#f8d37a, #e0a83d); }
.btn.ghost { background: transparent; box-shadow: none; border-style: dashed; }
.btn.small { min-height: 40px; font-size: 11.5px; padding: 6px 10px; border-radius: 11px; box-shadow: 0 3px 0 var(--ink); }
.btn:disabled, .btn.off { filter: grayscale(.85); opacity: .55; }
.btn.wide { width: 100%; }

.stamp { display: inline-block; padding: 3px 8px; border: 2.5px solid currentColor; border-radius: 6px; font: 900 10.5px/1.1 Unbounded, sans-serif;
  letter-spacing: .04em; text-transform: uppercase; transform: rotate(-4deg); opacity: .88; color: var(--red); background: rgba(255,255,255,.25); }
.stamp.blue { color: var(--blue); } .stamp.green { color: #2f7a43; } .stamp.gold { color: #a8771a; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 7px; font: 900 9.5px/1.4 Unbounded; border: 1.5px solid var(--ink); background: #fff; }
.chip.ig { background: #ffd6e4; } .chip.tt { background: #d6f3f1; }

/* ---------- лист-карточка (история болезни) */
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(30,15,8,.0); pointer-events: none; transition: background .25s; }
.scrim.on { background: rgba(30,15,8,.35); pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) - 6px); z-index: 40; max-height: calc(100% - var(--tab-h) - 90px);
  overflow-y: auto; padding: 10px 14px 18px; border-radius: 22px 22px 0 0; border: 2.5px solid var(--ink); border-bottom: 0;
  background: var(--paper) url(../img/noise.png); box-shadow: 0 -8px 24px rgba(0,0,0,.35); transform: translateY(calc(100% + 140px)); visibility: hidden; transition: transform .32s cubic-bezier(.2,.9,.3,1), visibility 0s .32s; }
.sheet.on { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2,.9,.3,1); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #c9b08a; margin: 0 auto 8px; }
.sheet .x { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; padding: 9px; border-radius: 11px; border: 2px solid var(--ink); background: #fff; box-shadow: 0 2px 0 var(--ink); }

.card-h { font: 900 10.5px/1 Unbounded; letter-spacing: .05em; color: var(--ink-2); display: flex; gap: 8px; align-items: center; padding-right: 44px; }
.card-b { display: flex; gap: 12px; margin-top: 8px; }
.photo { flex: none; width: 92px; height: 120px; border: 2px solid var(--ink); border-radius: 8px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff4dd, #f1cfa2 70%, #e5b27f); transform: rotate(-2deg); box-shadow: 0 3px 0 rgba(58,36,24,.5); }
.photo img, .photo canvas { position: absolute; left: 50%; bottom: 4px; height: 92%; transform: translateX(-50%); }
.photo::after { content: ''; position: absolute; top: -6px; left: 14px; width: 14px; height: 34px; border: 3px solid #8e9aa3; border-radius: 8px; border-bottom-color: transparent; }
.fields { flex: 1; min-width: 0; }
.nick { font: 900 19px/1.1 Unbounded; word-break: break-all; }
.fld { margin-top: 6px; font-size: 13.5px; line-height: 1.3; border-bottom: 1px dashed #d4bd96; padding-bottom: 4px; }
.fld span { display: block; font: 800 10px/1.2 Manrope; text-transform: uppercase; letter-spacing: .06em; color: #9b7b5a; }
.pills5 { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.pills5 i { display: inline-block; width: 16px; height: 9px; border-radius: 5px; border: 1.5px solid var(--ink); background: #fff; }
.pills5 i.f { background: linear-gradient(90deg, #fff 50%, var(--red) 50%); }
.stamps { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 10px 0 2px; min-height: 0; }
.meta { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.meta b { color: var(--ink); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; margin-top: 12px; }
.acts .btn { min-height: 52px; font-size: 11.5px; justify-content: flex-start; text-align: left; padding: 6px 10px; }
.acts4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.acts4 .btn { flex-direction: column; gap: 3px; min-height: 66px; padding: 6px 2px 7px; font-size: 9.5px; border-radius: 13px; }
.acts4 .btn .bi { width: 30px; height: 30px; }
body.card-open .search { display: none; }
body.card-open .kf, body.card-open .tag { opacity: 0; transition: opacity .2s; }
.passmini { margin-top: 12px; }
.passmini .pm { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 2px dashed #b89a72; border-radius: 12px; background: rgba(255,255,255,.55); font: 700 13px/1.25 Manrope; }
.passmini .pm .btn { flex: none; min-height: 40px; }
.mocklink { display: block; margin: 8px auto 0; font: 700 12px Manrope; color: #8b6a4a; text-decoration: underline; }
.note { margin-top: 14px; padding: 10px 12px; border: 2px dashed #b89a72; border-radius: 12px; font-weight: 700; font-size: 13.5px; background: rgba(255,255,255,.5); }
.note .btn { margin-top: 10px; }

/* ---------- экраны */
.screen { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--tab-h) + var(--safe-b) - 3px); z-index: 25; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 210px, var(--green-d) 210px, var(--green-d) 216px, transparent 216px),
    linear-gradient(180deg, var(--tile) 0, var(--tile) 210px, #5c9160 216px, #4c7f53 100%);
  background-attachment: local; background-attachment: local; background-attachment: local; transform: translateY(16px); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; }
.screen::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 210px; pointer-events: none;
  background: linear-gradient(var(--grout) 1.5px, transparent 1.5px) 0 0 / 26px 26px, linear-gradient(90deg, var(--grout) 1.5px, transparent 1.5px) 0 0 / 26px 26px; }
.screen.on { transform: none; opacity: 1; pointer-events: auto; }
.screen .inner { position: relative; padding: calc(var(--safe-t) + 14px) 12px 28px; max-width: 560px; margin: 0 auto; }
.shead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.plate { padding: 9px 14px; background: #f7f4ea; border: 3px solid var(--blue); border-radius: 10px; box-shadow: 0 0 0 2.5px var(--ink), 0 5px 0 2.5px var(--ink); }
.plate h2 { margin: 0; font: 900 17px/1.05 Unbounded; color: var(--blue); letter-spacing: .02em; }
.plate small { display: block; font: 800 11.5px/1.2 Manrope; color: var(--ink-2); margin-top: 3px; }
.shead .x { margin-left: auto; width: 44px; height: 44px; padding: 10px; border-radius: 13px; background: #fff; border: 2.5px solid var(--ink); box-shadow: var(--shadow); flex: none; }
.paper { background: var(--paper) url(../img/noise.png); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 rgba(30,20,12,.6); padding: 14px; margin-bottom: 14px; position: relative; }
.paper.lined { background-image: url(../img/noise.png), repeating-linear-gradient(transparent 0 27px, #e3cfae 27px 28px); }
.paper h3 { margin: 0 0 10px; font: 900 13px/1.2 Unbounded; letter-spacing: .02em; }
.sub { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.bal { display: flex; align-items: center; gap: 12px; }
.bal .coin { width: 40px; height: 40px; flex: none; }
.bal b { font: 900 22px/1 Unbounded; }
.bal small { display: block; font: 800 11px Manrope; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.energy { display: flex; align-items: center; gap: 4px; }
.energy i { width: 22px; height: 22px; display: inline-block; }
.energy i.e0 { filter: grayscale(1); opacity: .35; }

/* действия */
.atiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.atile { position: relative; min-height: 104px; padding: 10px 10px 12px; border-radius: 16px; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  background: linear-gradient(#ffffff, #eaf0e9); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; }
.atile .ai { width: 40px; height: 40px; }
.atile b { font: 900 11.5px/1.2 Unbounded; }
.atile .cost { position: absolute; right: 8px; top: 8px; font: 800 11px/1 Manrope; padding: 3px 6px; border-radius: 7px; background: #fff3c4; border: 1.5px solid var(--ink); display: flex; align-items: center; gap: 2px; }
.atile .cost .ic, .atile .cost i { width: 14px; height: 14px; display: inline-block; flex: none; }
.atile.paid .cost { background: #ffe0b0; }
.atile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.atile.off { opacity: .5; filter: grayscale(.6); }
.tmodes { display: grid; gap: 10px; }
.tmodes .btn { justify-content: flex-start; min-height: 58px; }
.result { text-align: center; padding: 18px 12px; }
.result .big-ic { width: 84px; height: 84px; margin: 4px auto 10px; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.result .rt { font: 900 17px/1.25 Unbounded; }
.result .rs { margin-top: 8px; font-weight: 700; color: var(--ink-2); }
.result .stamp { font-size: 15px; margin: 12px 0 4px; transform: rotate(-7deg) scale(1); animation: stampIn .45s .15s both; }
@keyframes pop { from { transform: scale(.3) rotate(-20deg); } }
@keyframes stampIn { from { transform: rotate(-7deg) scale(2.4); opacity: 0; } }
.chalks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: #3f6b47; padding: 10px; border-radius: 12px; border: 2.5px solid var(--ink); }
.chalks button { aspect-ratio: 1; border-radius: 10px; border: 2px solid rgba(255,255,255,.25); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff8e6; font: 800 9.5px/1.1 Manrope; padding: 4px; }
.chalks button canvas { width: 70%; height: auto; }
.chalks button.on { border-color: #ffd36b; background: rgba(255,211,107,.15); }

/* лента */
.filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filters button { height: 36px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; font: 900 10.5px Unbounded; box-shadow: 0 2px 0 var(--ink); }
.filters button.on { background: linear-gradient(#ffe7a8, #f2c45a); }
.feed .it { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed #d4bd96; }
.feed .it:last-child { border-bottom: 0; }
.feed .it .fi { width: 34px; height: 34px; }
.feed .it .ft { font-size: 14px; font-weight: 700; line-height: 1.3; }
.feed .it .ft b { font-weight: 900; color: #8a3b1c; }
.feed .it .fm { margin-top: 3px; display: flex; gap: 6px; align-items: center; font: 700 11.5px Manrope; color: #9b7b5a; }
.feed .it.new { animation: flash 1.2s; }
@keyframes flash { from { background: #fff0b8; } }
.toprow { display: grid; grid-template-columns: 30px 48px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #d4bd96; }
.toprow .pl { font: 900 15px Unbounded; text-align: center; }
.toprow img, .toprow canvas { width: 48px; height: 60px; object-fit: contain; }
.toprow .tn { font-weight: 900; word-break: break-all; }
.toprow .tn small { display: block; font: 700 12px Manrope; color: var(--ink-2); }
.toprow .tr { font: 900 12px Unbounded; }

/* скины */
.tierh { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 10px; color: #fff8e6; }
.tierh b { font: 900 16px/1 Unbounded; text-shadow: 0 2px 0 var(--ink); }
.tierh small { font: 800 12px Manrope; opacity: .9; }
.skins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skin { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 rgba(30,20,12,.65); overflow: hidden; display: flex; flex-direction: column; }
.skin .si { height: 168px; position: relative; background: radial-gradient(circle at 50% 30%, #fff4dd, #f3d2a6 65%, #e4ae7a); border-bottom: 2px solid var(--ink); }
.skin .si img, .skin .si canvas { position: absolute; left: 50%; bottom: 6px; height: 92%; max-width: 96%; object-fit: contain; transform: translateX(-50%); }
.skin .si .x4 { position: absolute; left: 6px; top: 6px; font: 900 10px Unbounded; background: #fff; border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 5px; }
.skin .sb { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.skin .sn { font: 900 11.5px/1.2 Unbounded; }
.skin .sd { font-size: 12px; line-height: 1.25; color: var(--ink-2); flex: 1; }
.skin .btn { min-height: 42px; font-size: 11.5px; }
.skin.gone { animation: gone .7s forwards; }
@keyframes gone { to { transform: scale(.85) rotate(-3deg); opacity: 0; } }
.skin .stamp.taken { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-12deg); font-size: 15px; background: rgba(255,255,255,.85); }
.owned .ow { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #d4bd96; }
.owned .ow:last-child { border-bottom: 0; }
.owned .ow .oi { width: 64px; height: 80px; position: relative; }
.owned .ow .oi img, .owned .ow .oi canvas { width: 100%; height: 100%; object-fit: contain; }
.owned .ow .ob { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.extras .ex { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #d4bd96; }
.extras .ex:last-child { border-bottom: 0; }
.extras .ex .en { flex: 1; font-weight: 800; }

/* я */
.pillsrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pillb { border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 4px; background: #fff; box-shadow: 0 3px 0 var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; font: 800 11.5px Manrope; }
.pillb .pi { width: 34px; height: 34px; }
.pillb small { font: 700 10.5px Manrope; color: var(--ink-2); }
.pillb.taken { background: #e7f3e4; } .pillb.taken .pi { opacity: .35; }
.pillb.now { background: linear-gradient(#fff3c4, #ffd36b); animation: wob 1.6s infinite; }
.pillb.wait { opacity: .55; }
@keyframes wob { 50% { transform: rotate(-2deg) scale(1.03); } }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.packs .btn { flex-direction: column; gap: 2px; min-height: 60px; padding: 6px 4px; font-size: 14px; }
.packs .btn small { font: 800 10.5px Manrope; }
.ref { display: flex; gap: 8px; }
.ref input { flex: 1; min-width: 0; height: 44px; border: 2px solid var(--ink); border-radius: 11px; padding: 0 10px; font: 700 13px Manrope; background: #fff; -webkit-user-select: all; user-select: all; }
.story img { width: 100%; border-radius: 12px; border: 2px solid var(--ink); display: block; }
.duel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* тост и модалка */
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 150px); z-index: 60; transform: translate(-50%, -20px); opacity: 0; transition: .25s; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 14px; background: var(--ink); color: #fff3d6; border-radius: 12px; font-weight: 800; font-size: 14px; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(30,15,8,.55); }
.modal .paper { max-width: 380px; width: 100%; }
.loading { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 40%, #f7c99a, #d98f72 60%, #8a4e3a); transition: opacity .4s; }
.loading.off { opacity: 0; pointer-events: none; }
.loading .lg { font: 900 26px Unbounded; color: var(--ink); text-shadow: 0 3px 0 rgba(255,255,255,.45); }
.loading .ls { font-weight: 800; color: #5b2f1f; }
.spin { width: 38px; height: 38px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 700px) {
  .top { left: 50%; right: auto; width: 560px; margin-left: -280px; }
  .ticker { margin: 8px 0 0; border: 2px solid var(--ink); border-radius: 10px; }
}
@media (max-width: 350px) {
  .logo b { font-size: 12.5px; } .seg button { min-width: 56px; padding: 0 6px; }
}
