:root {
  --wood: #2b1d12; --wood2: #3d2a1a; --gold: #e8c46a; --parch: #f1e4c3; --ink: #2a1c10; --red: #a8322a;
  --font: "Noto Sans Georgian", "Sylfaen", "DejaVu Sans", sans-serif;
  --serif: "Noto Serif Georgian", "Sylfaen", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #10202f; font-family: var(--font); color: var(--parch); user-select: none; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: default; }
.hidden { display: none !important; }
button { font-family: var(--font); cursor: pointer; }
kbd { font-family: var(--font); font-size: 10px; background: rgba(0,0,0,.4); border-radius: 3px; padding: 0 4px; }

/* overlays & cards */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8,14,22,.55); z-index: 20; }
#login { background: radial-gradient(ellipse at 50% 30%, #2a4a3a 0%, #10202f 70%); }
.card { position: relative; background: linear-gradient(#f3e7c9, #e6d4a8); color: var(--ink); border: 3px solid #7a5530; border-radius: 10px; padding: 26px 30px; box-shadow: 0 0 0 2px #2b1d12, 0 20px 60px rgba(0,0,0,.6); max-width: 92vw; max-height: 86vh; }
.card h2 { font-family: var(--serif); margin: 0 0 12px; color: var(--red); }
.close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 18px; color: var(--ink); }

.login-card h1 { font-family: var(--serif); font-size: 56px; margin: 0; color: var(--red); letter-spacing: 2px; text-shadow: 0 2px 0 #e8c46a; }
.login-card p { margin: 6px 0 18px; }
.row { display: flex; gap: 8px; }
#name { flex: 1; font: 600 18px var(--font); padding: 10px 12px; border: 2px solid #7a5530; border-radius: 6px; background: #fffaf0; }
.primary { font: 800 17px var(--font); padding: 10px 18px; border: 2px solid #5a1a14; border-radius: 6px; background: linear-gradient(#c8463a, #8e2a22); color: #fff; }
.primary:disabled { opacity: .5; }
#login-status { min-height: 22px; margin-top: 8px; color: var(--red); font-weight: 600; }
.muted { color: #6a5038; font-size: 13px; }
#hof h3 { font-family: var(--serif); margin: 14px 0 6px; }
#hof ol { text-align: left; display: inline-block; margin: 0; }
#hof i, #board i, .sel-owner i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* top bar */
#topbar { position: fixed; top: 0; left: 0; right: 0; height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: linear-gradient(var(--wood2), var(--wood)); border-bottom: 2px solid #8a6238; z-index: 5; }
.res { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.3); padding: 3px 10px; border-radius: 5px; min-width: 80px; font-size: 15px; }
.res b { color: #fff; } .res.short b, .short { color: #ff7a6a !important; }
.spacer { flex: 1; }
.pill { background: rgba(0,0,0,.3); padding: 4px 10px; border-radius: 5px; font-size: 13px; }
.pill b { color: var(--gold); }
#prot { background: rgba(40,110,200,.45); }
.icon-btn { background: rgba(0,0,0,.3); border: 1px solid #8a6238; color: #fff; border-radius: 5px; width: 34px; height: 30px; font-size: 15px; }

/* chat & toasts */
#chat { position: fixed; left: 10px; top: 52px; width: 340px; z-index: 4; }
#chat-log { max-height: 180px; overflow: hidden; font-size: 13px; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
#chat-log div { margin: 1px 0; }
#chat-input { width: 100%; margin-top: 4px; font: 13px var(--font); padding: 5px 8px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 4px; opacity: .55; }
#chat-input:focus { opacity: 1; outline: none; border-color: var(--gold); }
#toasts { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 6; pointer-events: none; }
.toast { background: rgba(20,14,8,.85); border: 1px solid #8a6238; padding: 7px 16px; border-radius: 6px; font-weight: 600; transition: opacity .5s; }
.toast.warn { color: #ffb0a0; border-color: #c8463a; }
.toast.big { font-size: 22px; color: var(--gold); }
.toast.out { opacity: 0; }

/* bottom panel */
#panel { position: fixed; left: 0; right: 0; bottom: 0; height: 226px; display: flex; gap: 10px; padding: 8px; background: linear-gradient(var(--wood2), var(--wood)); border-top: 3px solid #8a6238; z-index: 5; }
#minimap { width: 300px; height: 210px; border: 2px solid #8a6238; background: #000; cursor: pointer; image-rendering: pixelated; }
#info { width: 340px; background: rgba(0,0,0,.25); border-radius: 6px; padding: 10px; font-size: 14px; overflow: hidden; }
#info .hint { color: #cdb88f; font-size: 13px; line-height: 1.5; }
.sel-head { display: flex; gap: 10px; align-items: center; }
.sel-head img { width: 72px; height: 72px; background: rgba(0,0,0,.25); border-radius: 6px; }
.sel-head > div { flex: 1; }
.sel-name { font: 800 17px var(--font); color: var(--gold); }
.sel-owner { font-size: 13px; margin: 2px 0 6px; }
.bar { height: 7px; background: rgba(0,0,0,.5); border-radius: 3px; overflow: hidden; }
.bar b { display: block; height: 100%; background: #3fcf4f; }
.bar.small { width: 60px; height: 5px; margin: 0 6px 0 2px; }
.sel-state { margin-top: 8px; color: #fff; }
.sel-desc { margin-top: 6px; color: #cdb88f; font-size: 13px; }
.queue { display: flex; align-items: center; gap: 3px; margin-top: 8px; flex-wrap: wrap; }
.queue img { width: 36px; height: 36px; background: rgba(0,0,0,.3); border-radius: 4px; cursor: pointer; }
.warn { color: #ff8a7a; font-weight: 600; margin-top: 4px; }
.multi { display: flex; flex-wrap: wrap; gap: 8px; }
.multi div { position: relative; }
.multi img { width: 56px; height: 56px; background: rgba(0,0,0,.3); border-radius: 5px; }
.multi b { position: absolute; right: 3px; bottom: 1px; text-shadow: 0 0 3px #000; }
#actions { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: 100px; gap: 6px; align-content: start; overflow: auto; }
#actions button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px; background: linear-gradient(#5a3e24, #3d2a18); border: 1px solid #a07848; border-radius: 6px; color: #fff; }
#actions button:hover { border-color: var(--gold); background: linear-gradient(#6e4c2c, #4a331d); }
#actions button.active { box-shadow: 0 0 0 2px var(--gold) inset; }
#actions button.danger { background: linear-gradient(#6a2a22, #4a1a14); }
#actions button img { width: 54px; height: 54px; }
#actions .lbl { font-size: 12px; font-weight: 600; line-height: 1.1; text-align: center; }
#actions .cost { font-size: 11px; color: #f0dca8; }
#actions kbd { position: absolute; top: 3px; left: 3px; }

table { border-collapse: collapse; width: 100%; }
td, th { padding: 4px 10px; text-align: left; border-bottom: 1px solid rgba(0,0,0,.12); }
tr.me { background: rgba(232,196,106,.35); }
.on { color: #2a9a3a; font-size: 10px; }
.scroll { max-height: 60vh; overflow: auto; min-width: 420px; }
#defeat .card { text-align: center; }
#help kbd { font-size: 12px; color: #fff; padding: 2px 7px; background: #5a3e24; }

.surrender-btn { background: linear-gradient(#e8e0cc, #b8ad94); color: #3a2a1a; border: 1px solid #8a6238; border-radius: 5px; height: 30px; padding: 0 10px; font: 700 13px var(--font); }
.surrender-btn:hover { background: #fff; }
#surrender .card { text-align: center; max-width: 480px; }
.row.center { justify-content: center; margin-top: 14px; }
.secondary { font: 700 16px var(--font); padding: 10px 18px; border: 2px solid #7a5530; border-radius: 6px; background: #f6ecd2; color: var(--ink); }
#actions button.tech { background: linear-gradient(#3e4a5a, #283240); border-color: #7f93ad; }
#actions button.tech:hover { background: linear-gradient(#4c5b6e, #313d4e); }
#actions .emo { font-size: 30px; line-height: 50px; height: 54px; }
.qtech { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(0,0,0,.3); border-radius: 4px; font-size: 20px; cursor: pointer; }
#actions { grid-auto-rows: 96px; }
#actions { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows: 68px; gap: 5px; }
#actions button img { width: 38px; height: 38px; }
#actions .emo { font-size: 22px; line-height: 34px; height: 36px; }
#actions .lbl { font-size: 11px; }

/* ---------- mobile / touch ---------- */
.touch-only { display: none; }
body.touch .touch-only { display: inline-block; }
canvas#game { touch-action: none; }
html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
#rotate { display: none; }
.desel { float: right; width: 36px; height: 36px; margin: -4px -4px 4px 6px; border-radius: 6px; border: 1px solid #a07848; background: #4a1a14; color: #fff; font-size: 18px; }

@media (pointer: coarse) and (orientation: portrait) {
  #rotate:not(.dismissed) { display: flex; position: fixed; inset: 0; z-index: 50; background: rgba(16,24,34,.94); align-items: center; justify-content: center; text-align: center; padding: 30px; }
  .rot-icon { font-size: 64px; margin-bottom: 10px; }
  #rotate p { font-size: 18px; margin: 0 0 18px; }
}

/* small screens (phones, landscape or portrait) */
@media (max-width: 950px), (max-height: 560px) {
  #topbar { height: 34px; gap: 4px; padding: 0 4px; padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
  .res { min-width: 0; padding: 2px 6px; font-size: 12px; gap: 3px; }
  .pill { padding: 3px 6px; font-size: 11px; }
  #wipe-l, #prot-l { display: none; }
  .icon-btn { width: 32px; height: 28px; font-size: 14px; }
  .surrender-btn { height: 28px; padding: 0 7px; }
  .surrender-btn .lbl-s { display: none; }
  #chat { top: 40px; width: 260px; left: max(6px, env(safe-area-inset-left)); }
  #chat-log { max-height: 54px; font-size: 11px; }
  body.touch #chat-input { display: none; }
  body.touch.chat-open #chat-input { display: block; opacity: 1; font-size: 16px; }
  body.touch.chat-open #chat-log { max-height: 140px; background: rgba(0,0,0,.4); }
  #toasts { top: 40px; }
  .toast { font-size: 13px; padding: 5px 12px; }
  #panel { height: 132px; gap: 6px; padding: 5px; padding-left: max(5px, env(safe-area-inset-left)); padding-right: max(5px, env(safe-area-inset-right)); padding-bottom: max(5px, env(safe-area-inset-bottom)); }
  #minimap { width: 170px; height: 119px; flex: none; }
  #info { width: 190px; flex: none; padding: 6px; font-size: 12px; overflow-y: auto; }
  #info .hint { font-size: 11px; line-height: 1.35; }
  .sel-head img { width: 42px; height: 42px; }
  .sel-name { font-size: 13px; }
  .sel-owner { font-size: 11px; margin: 0 0 3px; }
  .sel-desc { display: none; }
  .sel-state { margin-top: 4px; font-size: 12px; }
  small { font-size: 10px; }
  .queue img, .qtech { width: 28px; height: 28px; font-size: 15px; }
  .multi img { width: 40px; height: 40px; }
  #actions { grid-auto-flow: column; grid-template-rows: repeat(2, 58px); grid-auto-columns: 74px; grid-template-columns: none; grid-auto-rows: unset; overflow-x: auto; overflow-y: hidden; gap: 4px; -webkit-overflow-scrolling: touch; }
  #actions button { padding: 2px; }
  #actions button img { width: 30px; height: 30px; }
  #actions .emo { font-size: 18px; line-height: 28px; height: 30px; }
  #actions .lbl { font-size: 9.5px; }
  #actions .cost { font-size: 9px; }
  body.touch #actions kbd { display: none; }
  .card { padding: 16px 18px; }
  .login-card h1 { font-size: 40px; }
  .scroll { min-width: 0; }
  td, th { padding: 3px 6px; font-size: 13px; }
}
/* phone portrait: stack the panel */
@media (max-width: 600px) and (orientation: portrait) {
  #panel { height: 200px; flex-wrap: wrap; }
  #minimap { width: 140px; height: 98px; }
  #info { width: calc(100% - 152px); height: 98px; }
  #actions { flex-basis: 100%; grid-template-rows: repeat(1, 82px); }
  #topbar { flex-wrap: wrap; height: auto; padding: 3px; }
  .spacer { display: none; }
}

/* ---------- v0.4: icons, login, maps ---------- */
.ico { width: 18px; height: 18px; vertical-align: -4px; }
.res .ico { width: 20px; height: 20px; }
.pill .ico { width: 15px; height: 15px; vertical-align: -3px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn img { width: 20px; height: 20px; }
.surrender-btn { display: inline-flex; align-items: center; gap: 5px; }
.surrender-btn img { width: 16px; height: 16px; }
#actions .cost .ico { width: 12px; height: 12px; vertical-align: -2px; }
#actions button.tech img { width: 36px; height: 36px; }
#actions .tier { position: absolute; top: 3px; right: 5px; font: 800 11px var(--serif); color: var(--gold); }
.qtech { width: 36px; height: 36px; background: rgba(0,0,0,.3); border-radius: 4px; cursor: pointer; padding: 3px; }

/* login */
#login { display: block; overflow: auto; background: radial-gradient(ellipse at 50% 40%, #1f3a3a 0%, #0c1824 75%); }
#login-map { position: fixed; inset: 0; width: 100%; height: 100%; opacity: .55; }
.login-wrap { position: relative; z-index: 2; display: flex; gap: 18px; justify-content: center; align-items: flex-start; padding: 6vh 16px 40px; flex-wrap: wrap; }
.login-card { width: 400px; text-align: center; }
.login-logo { width: 74px; height: 74px; margin-top: -60px; border-radius: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
#form-box input { display: block; width: 100%; font: 600 17px var(--font); padding: 10px 12px; margin: 8px 0; border: 2px solid #7a5530; border-radius: 6px; background: #fffaf0; }
.primary.wide { width: 100%; margin-top: 6px; }
.link { background: none; border: 0; color: #7a4a20; text-decoration: underline; font: 600 14px var(--font); margin-top: 10px; }
.small { font-size: 12.5px; }
.side-card { width: 330px; }
.side-card h3 { font-family: var(--serif); margin: 14px 0 6px; color: var(--red); }
#news { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.5; }
#server-info { margin-top: 8px; }
#login-map-label { position: fixed; z-index: 1; left: 50%; bottom: 14px; transform: translateX(-50%); color: #e8dcc0; font-size: 13px; text-shadow: 0 1px 3px #000; text-align: center; }

/* minimap layers */
#mm-wrap { position: relative; flex: none; }
#mm-layers { position: absolute; left: 4px; bottom: 4px; display: flex; gap: 3px; }
#mm-layers button { width: 26px; height: 26px; padding: 3px; border-radius: 5px; border: 1px solid #a07848; background: rgba(30,20,10,.75); opacity: .45; }
#mm-layers button.on { opacity: 1; background: rgba(60,40,20,.9); border-color: var(--gold); }
#mm-layers img { width: 18px; height: 18px; display: block; }

/* Georgia map */
.map-card { width: min(980px, 94vw); text-align: center; }
#georgia-map { width: 100%; height: auto; aspect-ratio: 2 / 1.05; border-radius: 6px; background: #1d3d5c; cursor: pointer; }
#rotate .rot-icon img { width: 80px; height: 80px; }

@media (max-width: 950px), (max-height: 560px) {
  .res .ico { width: 15px; height: 15px; }
  .icon-btn img { width: 16px; height: 16px; }
  #mm-wrap #minimap { width: 170px; height: 119px; }
  #mm-layers button { width: 22px; height: 22px; padding: 2px; }
  #mm-layers img { width: 15px; height: 15px; }
  .login-wrap { padding-top: 40px; }
  .login-card, .side-card { width: min(400px, 94vw); }
  .login-logo { width: 56px; height: 56px; margin-top: -44px; }
  #btn-logout { display: none; }
}
@media (max-width: 600px) and (orientation: portrait) {
  #mm-wrap #minimap { width: 140px; height: 98px; }
}
#actions { grid-auto-rows: 76px; }
#actions button { overflow: hidden; justify-content: center; gap: 1px; }
#actions button img { width: 32px; height: 32px; flex: none; }
#actions button.tech img { width: 30px; height: 30px; }
#actions .lbl { font-size: 10.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 1100px) {
  #login-map { width: 62vw; }
  .login-wrap { flex-direction: column; align-items: flex-end; padding: 5vh 3vw 40px 0; gap: 14px; }
  .login-card, .side-card { width: 400px; }
  #login-map-label { left: 31vw; }
}
@media (max-width: 950px), (max-height: 560px) {
  #actions { grid-template-rows: repeat(2, 58px); grid-auto-rows: unset; }
  #actions button img, #actions button.tech img { width: 24px; height: 24px; }
  #actions .lbl { font-size: 9px; }
}

/* ---------- v0.5 ---------- */
.icon-btn.hot { box-shadow: 0 0 0 2px #e8c46a inset; animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 10px 2px #e8c46a; } }
#freeb { background: rgba(60,140,60,.6); }
#decay { position: fixed; top: 46px; left: 50%; transform: translateX(-50%); z-index: 7; background: rgba(140,30,20,.92); color: #fff; padding: 8px 18px; border-radius: 6px; font-weight: 700; border: 2px solid #ffb0a0; text-align: center; }
.chat-x { position: absolute; right: -28px; top: 0; z-index: 2; width: 22px; height: 22px; padding: 3px; border: 1px solid #8a6238; border-radius: 4px; background: rgba(0,0,0,.5); }
.chat-x img { width: 100%; height: 100%; }
body.chat-hidden #chat-log, body.chat-hidden #chat-input { display: none; }
body.chat-hidden .chat-x { transform: rotate(45deg); }
#panel-toggle { position: fixed; right: 10px; bottom: 232px; z-index: 6; width: 36px; height: 24px; border-radius: 6px 6px 0 0; border: 1px solid #8a6238; border-bottom: 0; background: linear-gradient(var(--wood2), var(--wood)); padding: 2px 8px; }
#panel-toggle img { width: 100%; height: 100%; }
body.panel-hidden #panel { display: none; }
body.panel-hidden #panel-toggle { bottom: 0; }
.wide-card { width: min(760px, 94vw); }
.center { text-align: center; }
.mk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mk-item { background: rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.15); border-radius: 8px; padding: 10px; text-align: center; }
.mk-item img { width: 36px; height: 36px; }
.mk-item .row { justify-content: center; gap: 6px; margin-top: 6px; }
.small-btn { font-size: 13px !important; padding: 5px 10px !important; }
.mk-item button, #offers button, .offer-form button, #team-body button { font: 700 13px var(--font); padding: 5px 10px; border-radius: 5px; border: 1px solid #7a5530; background: #f6ecd2; cursor: pointer; }
.mk-item button.buy { background: #d8f0c8; } .mk-item button.sell { background: #f8d8c8; }
#offers { max-height: 180px; overflow: auto; }
.offer { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid rgba(0,0,0,.1); }
.offer .who { flex: 1; font-weight: 600; }
.offer img, .offer-form img { width: 18px; height: 18px; vertical-align: -4px; }
.offer-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.offer-form select, .offer-form input, #team-body input { font: 600 14px var(--font); padding: 5px; border: 1px solid #7a5530; border-radius: 5px; width: 80px; }
#team-body input { width: 180px; }
.team-m { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.team-m i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.boxes { display: flex; justify-content: center; gap: 18px; margin: 16px 0; flex-wrap: wrap; }
.boxes button { width: 130px; height: 140px; border-radius: 12px; border: 3px solid #7a5530; background: radial-gradient(circle at 50% 35%, #fff4d0, #e8c46a); cursor: pointer; transition: transform .2s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: 700 14px var(--font); }
.boxes button:hover:not(:disabled) { transform: translateY(-6px) rotate(-2deg); }
.boxes button img { width: 70px; height: 70px; }
.boxes button.picked { border-color: #2a9a3a; box-shadow: 0 0 18px #2a9a3a; }
.boxes button.other { opacity: .55; }
.cards-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ucard { width: 190px; min-height: 230px; border-radius: 12px; padding: 14px 12px; border: 3px solid; background: linear-gradient(#fffaf0, #efe2c0); cursor: pointer; transition: transform .2s; text-align: center; }
.ucard:hover { transform: translateY(-6px); }
.ucard.c { border-color: #8a8a8a; } .ucard.r { border-color: #2f6fd6; box-shadow: 0 0 12px rgba(47,111,214,.5); }
.ucard.e { border-color: #9b4fd1; box-shadow: 0 0 16px rgba(155,79,209,.6); } .ucard.l { border-color: #e0a010; box-shadow: 0 0 24px rgba(224,160,16,.8); background: linear-gradient(#fff8d8, #f0d070); }
.ucard .rar { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.ucard h3 { font-family: var(--serif); margin: 10px 0 8px; color: var(--red); }
.ucard img { width: 64px; height: 64px; }
.acc { font-size: 20px; margin: 12px 0; } .acc b { color: var(--red); letter-spacing: 1px; }
.mycards { margin-top: 10px; font-size: 13px; }
@media (max-width: 950px), (max-height: 560px) {
  #panel-toggle { bottom: 136px; }
  #decay { font-size: 12px; top: 38px; }
  .ucard { width: 150px; min-height: 190px; padding: 8px; }
  .boxes button { width: 96px; height: 104px; } .boxes button img { width: 48px; height: 48px; }
}
@media (max-width: 950px), (max-height: 560px) {
  #topbar { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  #topbar::-webkit-scrollbar { display: none; }
  #topbar > * { flex: none; }
  .chat-x { right: auto; left: 266px; }
}

.autobox { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.12); }
.autobox b { font-size: 12.5px; color: var(--gold); }
.autobtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.autobtns button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 2px; font: 600 10.5px var(--font); color: #fff; background: linear-gradient(#4a5a3a, #34422a); border: 1px solid #8aa070; border-radius: 5px; }
.autobtns button:hover { border-color: var(--gold); }
.autobtns img { width: 22px; height: 22px; }
@media (max-width: 950px), (max-height: 560px) { .autobtns img { width: 16px; height: 16px; } .autobtns button { font-size: 9px; } .autobox { margin-top: 4px; padding-top: 3px; } }

.gfx-btn { font-weight: 700; font-size: 11px !important; letter-spacing: .5px; }
.gfx-btn.lo { opacity: .65; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin: 6px 0; font-size: 12.5px; }
.stats .st { display: flex; justify-content: space-between; gap: 6px; cursor: pointer; padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,.18); }
.stats .st span { color: #d8c8a8; }
.stats .st b { color: #fff; font-weight: 600; white-space: nowrap; }
.stats .st i { font-style: normal; color: #7ee07a; font-size: 11.5px; }
.stats .st i.dn { color: #ff8a7a; }
.stats .st.vs { grid-column: 1 / -1; background: rgba(120,90,20,.25); }
.stats .st.vs span { color: #f0d890; }

.stancebox { display: flex; gap: 4px; margin-top: 6px; }
.stancebox button { flex: 1; padding: 4px 2px; font-size: 12px; background: rgba(0,0,0,.3); color: #e8dcc0; border: 1px solid #8a6238; border-radius: 4px; cursor: pointer; }
.stancebox button.on { background: #8a6238; color: #fff; border-color: #e8c070; }

#ann { position: fixed; top: 86px; left: 50%; transform: translateX(-50%); z-index: 8; max-width: min(640px, 90vw); background: rgba(30,40,70,.94); color: #fff; padding: 10px 20px; border-radius: 8px; font-weight: 700; border: 2px solid #e8c070; text-align: center; font-size: 15px; }
#ann::before { content: '📢 '; }
.adm-row { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.adm-row input, .adm-row select { flex: 1; min-width: 80px; padding: 6px; border-radius: 4px; border: 1px solid #8a6238; }
.adm-row.res input { min-width: 60px; }
.adm-row button { padding: 6px 10px; }
.danger-btn { background: #9a2a1e !important; color: #fff !important; }
#btn-admin { font-size: 16px; color: #ffd860; }
.formbox { margin-top: 6px; } .formbox b { font-size: 12px; color: #e8dcc0; } .formbox div { display: flex; gap: 4px; margin-top: 3px; }
.formbox button { flex: 1; padding: 3px 2px; font-size: 11px; background: rgba(0,0,0,.3); color: #e8dcc0; border: 1px solid #8a6238; border-radius: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.formbox button img { width: 22px; height: 22px; } .formbox button.on { background: #8a6238; color: #fff; border-color: #e8c070; }

#event-hud { position: fixed; top: 46px; right: 10px; z-index: 7; width: 220px; background: rgba(40,28,14,.92); color: #f4ead0; border: 2px solid #e8c070; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
#event-hud b { color: #ffd870; } #event-hud span { float: right; font-weight: 700; } #event-hud ol { margin: 4px 0 0 18px; padding: 0; } #event-hud .muted { font-size: 11.5px; margin: 2px 0 4px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.shop-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid #c8a878; border-radius: 8px; background: rgba(255,250,235,.6); text-align: center; font-size: 12.5px; }
.shop-item img { width: 64px; height: 64px; } .shop-item.equipped { border: 2px solid #3a8a3a; background: rgba(220,255,220,.5); }
.shop-item button { width: 100%; padding: 4px; font-size: 12px; } .shop-item button.on { background: #3a8a3a; color: #fff; }
.vip { background: #fff3c0; border: 1px solid #e8c060; border-radius: 6px; padding: 6px 10px; font-weight: 600; }
.pay code { background: #fff; padding: 3px 6px; border-radius: 4px; border: 1px solid #c8a878; font-size: 13px; }
.nm.fr_wood { border: 2px solid #8a5a30; border-radius: 4px; padding: 0 4px; }
.nm.fr_gold { border: 2px solid #e8c060; border-radius: 4px; padding: 0 4px; box-shadow: 0 0 6px #e8c060; }
.nm.fr_royal { border: 2px solid #9a4ad8; border-radius: 4px; padding: 0 4px; background: rgba(154,74,216,.18); box-shadow: 0 0 6px #e8c060; }
.nm.fr_pass { border: 2px solid #7ab8ff; border-radius: 4px; padding: 0 4px; background: rgba(122,184,255,.15); }
em.ttl { font-style: normal; font-size: 11px; background: #8a5a20; color: #ffe8a0; border-radius: 3px; padding: 0 4px; white-space: nowrap; }

#shop .card, #admin .card { max-height: 86vh; overflow-y: auto; }

.region-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; font-size: 13px; color: #5a3a1a; }
.region-row select { flex: 1; padding: 7px; border-radius: 6px; border: 1px solid #b08a5a; background: #fffaf0; font-family: inherit; }

/* ---------- v1.0: main menu, event log, hotkeys, tooltips, idle finder ---------- */
.menu-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 10px; border-radius: 6px; border: 2px solid #e8c46a; background: linear-gradient(#b8423a, #7a221c); color: #fff4d8; font-weight: 700; font-size: 14px; box-shadow: 0 2px 0 #3a120e, 0 0 0 1px #2b1d12; cursor: pointer; }
.menu-btn:hover { filter: brightness(1.12); }
.menu-btn .burger { display: inline-flex; flex-direction: column; gap: 3px; } .menu-btn .burger i { display: block; width: 16px; height: 2.5px; background: #ffe7a8; border-radius: 2px; }
.menu-btn .badge { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: #ffd24a; color: #5a2a0a; font-size: 12px; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #2b1d12; animation: pulse 2s infinite; }
.menu-card { width: min(720px, 94vw); }
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-right: 30px; }
.menu-head h2 { margin: 0; } .menu-head .pill { background: rgba(60,40,20,.15); color: var(--ink); } .menu-head .pill b { color: #8a2a1e; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 64vh; overflow-y: auto; padding: 2px; }
.mtile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 10px 6px 8px; border-radius: 10px; border: 2px solid #9a7444; background: radial-gradient(circle at 50% 35%, #fff8e4, #ead8ae 70%, #d8bf8a); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 3px 0 #7a5530; transition: transform .08s, box-shadow .08s; }
.mtile:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #7a5530, 0 0 0 3px rgba(232,196,106,.6); }
.mtile:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a5530; }
.mtile img { width: 58px; height: 58px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.25)); }
.mtile .mlbl { text-align: center; line-height: 1.15; }
.mtile .mstate { font-size: 11px; color: #2a7a2a; min-height: 0; } .mtile.keep .mstate { min-height: 13px; }
.mtile.off { filter: grayscale(.8); } .mtile.off .mstate { color: #8a2a1e; }
.mtile.warn { border-color: #b8423a; } .mtile.hidden { display: none; }
.mtile.hot { border-color: #e8a020; animation: pulse 2s infinite; }
#logdlg .card, #keysdlg .card { max-height: 86vh; overflow-y: auto; }
.logrow { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(122,85,48,.25); }
.logrow .ago { flex: none; width: 74px; font-size: 12px; color: #7a5a3a; } .logrow .txt { flex: 1; }
.logrow.attack .txt { color: #b02a1e; font-weight: 700; }
.logrow button { flex: none; padding: 3px 10px; font-size: 12px; }
table.keys { width: 100%; border-collapse: collapse; } table.keys td { padding: 6px 4px; border-bottom: 1px solid rgba(122,85,48,.25); vertical-align: top; }
table.keys td:first-child { white-space: nowrap; width: 1%; padding-right: 14px; }
kbd { display: inline-block; padding: 1px 6px; border-radius: 4px; border: 1px solid #7a5530; background: #fff8e4; color: #3a2210; font: 600 12px/1.4 sans-serif; box-shadow: 0 1px 0 #7a5530; }
#tip { position: fixed; z-index: 40; max-width: 260px; pointer-events: none; background: rgba(28,20,10,.95); color: #f4ead0; border: 1px solid #c9a060; border-radius: 6px; padding: 7px 10px; font-size: 12.5px; line-height: 1.35; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
#tip b { color: #ffd870; font-size: 13.5px; } #tip .tcost { margin: 3px 0; } #tip .tcost .ico { width: 14px; height: 14px; vertical-align: -2px; } #tip .muted { color: #c8b896; margin-top: 3px; }
#tip kbd { font-size: 11px; padding: 0 5px; }
#idlebar { position: fixed; left: 8px; bottom: 240px; z-index: 6; display: flex; flex-direction: column; gap: 6px; }
.idle-btn { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px 0 4px; border-radius: 6px; border: 2px solid #e8c46a; background: rgba(40,28,14,.92); color: #ffe7a8; font-weight: 700; cursor: pointer; animation: pulse 2.4s infinite; }
.idle-btn img { width: 28px; height: 28px; } .idle-btn.hidden { display: none; }
.toast.click { cursor: pointer; pointer-events: auto; text-decoration: underline dotted; }
#actions button.repeat { box-shadow: 0 0 0 2px #6ad06a inset; }
#actions button.on { background: linear-gradient(#3a7a3a, #24542a); color: #e8ffe0; }
.bossbar { display: flex; align-items: center; gap: 6px; margin: 3px 0; } .bossbar i { flex: 1; height: 8px; background: rgba(0,0,0,.5); border-radius: 4px; overflow: hidden; } .bossbar i b { display: block; height: 100%; background: linear-gradient(90deg, #e04030, #ff9a50); }
#wx-pill { cursor: help; } #wx-pill .ico { width: 18px; height: 18px; vertical-align: -4px; }
#adm-bctl.on { background: #3a7a3a; color: #fff; }
@media (max-width: 700px) { .menu-btn #menu-lbl { display: none; } .menu-btn { padding: 0 10px; } .mtile { min-height: 88px; } .mtile img { width: 46px; height: 46px; } #idlebar { bottom: 214px; } }
#btn-admin.mtile { color: var(--ink); }
.mineinfo { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: 150px; padding: 6px 10px; border-radius: 6px; background: rgba(40,28,14,.75); color: #f4e6c4; font-size: 12px; line-height: 1.25; align-self: stretch; }
.mineinfo b { color: #ffe070; font-size: 15px; }
#actions button.pagebtn { background: linear-gradient(#5a4a8a, #3a2e60); color: #f0e8ff; border-color: #a090e0; }
/* v1.1: coins, shop, suggestion box */
.coin-pill { cursor: pointer; } .coin-pill img { width: 20px; height: 20px; vertical-align: -5px; margin-right: 2px; } .coin-pill b { color: #ffe070; }
.coinbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: 8px; background: linear-gradient(#3a2a12, #22180a); color: #ffe7a8; }
.coinbar img { width: 34px; height: 34px; } .coinbar b { font-size: 22px; color: #ffe070; } .coinbar .sp { flex: 1; }
.coinbar button[disabled] { opacity: .55; cursor: default; }
.shop-item .price { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: #8a5a08; } .shop-item .price img { width: 18px; height: 18px; }
.shop-item button.poor { opacity: .7; }
.sugg-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sugg-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 6px; border: 1px solid #9a7444; background: #fffaf0; resize: vertical; }
.sugg-form .adm-row { display: flex; align-items: center; gap: 10px; } .sugg-form .adm-row .muted { flex: 1; font-size: 12px; }
.seg { display: inline-flex; border: 1px solid #9a7444; border-radius: 6px; overflow: hidden; align-self: flex-start; } .seg button { border-radius: 0; background: #f4e6c4; color: var(--ink); border: 0; padding: 5px 14px; } .seg button.on { background: #7a5530; color: #fff4d8; }
.sg-row { padding: 8px 6px; border-bottom: 1px solid rgba(122,85,48,.25); } .sg-top { display: flex; align-items: center; gap: 8px; } .sg-top .sg-like { margin-left: auto; padding: 2px 10px; font-size: 12px; } .sg-like.on { background: #3a7a3a; color: #fff; }
.sg-st { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #ddd; color: #333; } .sg-st.planned { background: #e8c060; color: #3a2a0a; } .sg-st.done { background: #5aa05a; color: #fff; } .sg-st.rejected { background: #b85a4a; color: #fff; }
.sg-text { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
#actions button.gift { box-shadow: 0 0 0 2px #e8c060 inset; }
.coinbar button { padding: 7px 14px; border-radius: 6px; border: 2px solid #e8c46a; background: linear-gradient(#f0c43a, #b8862a); color: #3a2208; font-weight: 700; cursor: pointer; } .coinbar button.secondary { background: linear-gradient(#6a5a3a, #4a3a22); color: #f4e6c4; }
/* v1.1 admin panel */
.admin-card { width: min(760px, 96vw); max-height: 90vh; display: flex; flex-direction: column; }
.adm-head { display: flex; align-items: baseline; gap: 12px; padding-right: 30px; } .adm-head h2 { margin: 0 0 6px; }
.adm-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #9a7444; margin: 6px 0 8px; }
.adm-tabs button { border-radius: 6px 6px 0 0; border: 1px solid #9a7444; border-bottom: 0; background: #ead8ae; color: var(--ink); padding: 6px 12px; font-weight: 700; cursor: pointer; }
.adm-tabs button.on { background: #7a5530; color: #fff4d8; } .adm-tabs b { color: #c22c22; }
.adm-sel { font-size: 13px; margin-bottom: 6px; } .adm-sel b { color: #8a2a1e; }
.admin-card section { overflow-y: auto; min-height: 0; flex: 1; padding-right: 4px; }
.adm-table-wrap { max-height: 36vh; overflow-y: auto; border: 1px solid #c9a870; border-radius: 6px; background: #fffaf0; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; } .adm-table th { position: sticky; top: 0; background: #ead8ae; text-align: left; padding: 5px 8px; }
.adm-table td { padding: 5px 8px; border-top: 1px solid rgba(122,85,48,.18); } .adm-table tr[data-pid] { cursor: pointer; } .adm-table tr[data-pid]:hover { background: #fff0c8; } .adm-table tr.sel { background: #f0d890; }
.adm-table .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #aaa; margin-right: 6px; } .adm-table .dot.on { background: #3ac03a; } .adm-table .bad { color: #b02a1e; font-weight: 700; }
.adm-box { margin-top: 8px; padding: 8px; border: 1px solid #c9a870; border-radius: 6px; background: rgba(255,255,255,.35); }
.adm-status { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 10px 0; padding: 10px; border-radius: 6px; background: rgba(255,255,255,.4); }
label.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.adm-tabs button, .adm-tabs button.on { font-size: 13px; } label.chk input { width: auto; min-width: 0; margin: 0; }
.chat-tabs { display: flex; gap: 3px; margin-bottom: 3px; pointer-events: auto; }
.chat-tabs button { padding: 2px 9px; font-size: 12px; border-radius: 10px; border: 1px solid rgba(232,196,106,.5); background: rgba(20,14,8,.6); color: #e8d8b0; cursor: pointer; }
.chat-tabs button.on { background: #7a5530; color: #fff4d8; border-color: #e8c46a; } .chat-tabs i { font-style: normal; background: #c22c22; color: #fff; border-radius: 8px; padding: 0 5px; font-size: 11px; }
#chat-log .ctag { font-size: 10px; padding: 0 5px; margin-right: 4px; border-radius: 6px; background: #3a7a3a; color: #fff; } #chat-log .cm-pm .ctag { background: #7a4ab8; }
#chat-log .cm-team { color: #c8f0b8; } #chat-log .cm-pm { color: #e0ccff; }
/* v1.1 mobile: command bar, drawer panel, big map */
#tbar { display: none; }
body.touch #tbar { display: grid; grid-template-columns: repeat(2, 48px); grid-auto-rows: 42px; gap: 5px; position: fixed; right: max(8px, env(safe-area-inset-right)); top: 44px; z-index: 7; direction: rtl; }
body.touch.drawer-open #tbar { display: none; }
body.touch #tbar button { direction: ltr; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 42px; border-radius: 10px; border: 2px solid #c9a060; background: rgba(36,26,14,.88); color: #f4e6c4; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
body.touch #tbar button .em { font-size: 17px; line-height: 19px; } body.touch #tbar button .tl { font-size: 9px; line-height: 11px; }
body.touch #tbar button.on { background: #7a3a20; border-color: #ffd070; box-shadow: 0 0 0 2px rgba(255,208,112,.5); }
body.touch #tbar button.hidden { display: none; }
body.touch #panel-toggle { display: none; }
body.touch #drawer-handle { display: block; position: fixed; left: 50%; transform: translateX(-50%); bottom: 132px; z-index: 6; width: 90px; height: 22px; border-radius: 10px 10px 0 0; border: 1px solid #8a6238; border-bottom: 0; background: linear-gradient(var(--wood2), var(--wood)); padding: 0; }
body.touch #drawer-handle i { display: block; width: 36px; height: 4px; margin: 0 auto; border-radius: 2px; background: #e8c46a; }
body.touch.drawer-open #drawer-handle { bottom: 262px; }
body.touch.drawer-open #panel { height: 262px; }
body.touch.drawer-open #actions { grid-template-rows: repeat(3, 78px); grid-auto-columns: 92px; }
body.touch.drawer-open #actions button img { width: 38px; height: 38px; } body.touch.drawer-open #actions .lbl { font-size: 11px; }
body.touch.drawer-open .sel-desc { display: block; }
body.touch #idlebar { bottom: 160px; }
body.touch.drawer-open #idlebar { bottom: 290px; }
body.bigmap #panel { z-index: 40; } body.bigmap #tbar, body.bigmap #drawer-handle { display: none !important; }
body.bigmap #mm-wrap { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; width: min(92vw, calc(86vh * 300 / 210)); box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); border-radius: 8px; }
body.bigmap #minimap { width: 100% !important; height: auto !important; aspect-ratio: 300 / 210; }
@media (max-width: 950px), (max-height: 560px) { body.touch #actions button { min-width: 64px; } }
/* v1.1.1: phone panel states, market page groups */
body.touch.panel-hidden #drawer-handle { bottom: 0; }
body.touch.panel-hidden #idlebar { bottom: 30px; }
body.touch #drawer-handle { width: 96px; height: 26px; }
body.touch #drawer-handle i { width: 0; height: 0; background: none; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 9px solid #e8c46a; border-radius: 0; }
body.touch #drawer-handle[data-st="big"] i { border-bottom: 0; border-top: 9px solid #e8c46a; }
#actions .grp { display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; border-radius: 6px; border: 1px dashed rgba(232,196,106,.6); color: #e8c46a; font-weight: 700; font-size: 12px; line-height: 1.2; background: rgba(0,0,0,.18); }
.btn-link { display: inline-block; padding: 9px 18px; border-radius: 8px; text-decoration: none; font-weight: 700; } .btn-link.primary { background: linear-gradient(#e8b830, #b8862a); color: #3a2208; border: 2px solid #8a6418; }
body.touch #event-hud { right: auto; left: 50%; transform: translateX(-50%); top: 44px; width: 200px; font-size: 11.5px; padding: 5px 8px; } body.touch #event-hud .muted { display: none; }
body.touch.drawer-open #event-hud { display: none; }
/* Admin → თარგმანი */
.tr-wrap { max-height: 52vh; }
.tr-table td { vertical-align: top; font-size: 13px; }
.tr-table code { font-size: 11px; color: #6a4a28; word-break: break-all; }
.tr-table .trdef { max-width: 260px; }
.tr-table textarea { width: 100%; min-width: 180px; font: inherit; padding: 4px; border-radius: 4px; border: 1px solid #8a6238; resize: vertical; }
.tr-table .trerr { color: #b02a20; font-size: 12px; }
.tr-table .tract { white-space: nowrap; } .tr-table .tract button { padding: 4px 8px; margin: 1px; }
.trb { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: #2f7a3a; }
.trb.changed { background: #b8762a; }
#adm-tr-n { color: #b02a20; }
/* Admin → ხმები */
#snd-list h3 { margin: 12px 0 4px; }
.sndrow { border: 1px solid #c9a46a; border-radius: 6px; padding: 6px 8px; margin: 5px 0; background: rgba(255,255,255,.35); }
.sndrow.own { border-color: #2f7a3a; } .sndrow.old { border-color: #b8762a; }
.sndhead { font-size: 13px; } .sndhead .muted { font-size: 12px; }
.sndst { font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 6px; background: #8a7a5a; color: #fff; }
.sndrow.own .sndst { background: #2f7a3a; } .sndrow.old .sndst { background: #b8762a; }
.sndf { display: flex; align-items: center; gap: 6px; margin: 3px 0; font-size: 12px; flex-wrap: wrap; }
.sndf .sndn { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sndf .snd-vol { width: 110px; } .sndf button { padding: 2px 8px; }
/* 1.3: power-up bar, shop tabs, box inventory */
#pu-bar { display: flex; gap: 4px; overflow: hidden; }
#pu-bar .pu { background: rgba(40,28,14,.85); color: #ffe070; border: 1px solid #e8c070; border-radius: 10px; padding: 1px 7px; font-size: 12px; white-space: nowrap; font-weight: 700; }
.shop-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.shop-tabs button { padding: 5px 10px; font-size: 13px; background: rgba(255,255,255,.4); border: 1px solid #b08a50; border-radius: 14px; }
.shop-tabs button.on { background: #8a5a2a; color: #fff3d0; }
.shop-item .sdesc { font-size: 11px; color: #6a5030; line-height: 1.25; }
.shop-item s { color: #a05040; font-size: 11px; } .shop-item .sale { font-size: 10px; color: #b02a20; font-weight: 700; }
.swatches { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; } .swatches i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #5a3a1e; cursor: pointer; font-style: normal; font-size: 11px; line-height: 14px; text-align: center; } .swatches i.on { outline: 2px solid #fff; } .swatches i.off { background: #ddd; }
.box-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .box-top img { width: 28px; vertical-align: middle; }
.box-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.box-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border: 2px solid #b08a50; border-radius: 8px; background: rgba(255,255,255,.35); text-align: center; font-size: 12px; }
.box-item img { width: 52px; } .box-item button { padding: 3px 8px; margin: 1px; }
.tier-r { border-color: #3a7fe0 !important; } .tier-e { border-color: #9a4ad8 !important; } .tier-l { border-color: #e8a020 !important; box-shadow: 0 0 8px rgba(232,160,32,.6); }
table.odds { width: 100%; border-collapse: collapse; font-size: 13px; } table.odds td { padding: 4px 6px; border-bottom: 1px solid #d8c090; }
table.odds tr.tier-r td:first-child { color: #2a5fb0; } table.odds tr.tier-e td:first-child { color: #7a3ab8; } table.odds tr.tier-l td:first-child { color: #b87810; font-weight: 700; }
.boxes .emo { font-size: 26px; display: block; } .boxes .emo img { width: 40px; }
.chat-sticker { font-size: 30px; line-height: 1.1; }
#sticker-btn { padding: 0 6px; }
#sticker-btn { position: fixed; z-index: 6; left: 360px; top: 80px; font-size: 18px; background: rgba(40,28,14,.8); border: 1px solid #e8c070; border-radius: 6px; padding: 2px 6px; }
#sticker-pop { position: fixed; z-index: 7; left: 360px; top: 112px; display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; background: rgba(40,28,14,.95); border: 1px solid #e8c070; border-radius: 8px; padding: 4px; }
#sticker-pop button { font-size: 22px; background: none; border: 0; padding: 2px; }
/* Admin → მაღაზია / ყუთები */
.sa-wrap { max-height: 46vh; } .sa-table td { font-size: 12px; vertical-align: top; } .sa-table input { padding: 3px; } .sa-table tr.off { opacity: .55; }
.la-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; } .la-types .off { opacity: .5; }
.la-ed { border: 2px solid #b08a50; border-radius: 8px; padding: 8px; margin: 8px 0; background: rgba(255,255,255,.3); }
.la-rows td { font-size: 12px; } .la-rows select, .la-rows input { padding: 3px; }
#le-sum.bad { color: #b02a20; } .la-sim { color: #2a6a3a; font-weight: 700; font-size: 12px; }
.la-log { max-height: 220px; overflow-y: auto; font-size: 12px; } .la-log div { border-bottom: 1px dotted #c8a870; padding: 2px 0; }
#la-settings label { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.la-rows { display: block; overflow-x: auto; max-width: 100%; } .la-rows th { padding: 3px 4px; height: auto; font-size: 12px; } .la-rows td { padding: 2px 3px; } .la-rows select { max-width: 150px; }

/* custom games (მატჩები) */
body.in-match #btn-shop, body.in-match #btn-gift, body.in-match #btn-team, body.in-match #btn-board, body.in-match #btn-ideas, body.in-match #btn-donate, body.in-match #coin-pill, body.in-match #wx-pill { display: none !important; }
#mbar { position: fixed; top: 46px; left: 50%; transform: translateX(-50%); z-index: 7; background: rgba(40,28,14,.92); color: #f4ead0; border: 2px solid #e8c070; border-radius: 8px; padding: 6px 12px; font-size: 13px; text-align: center; max-width: 92vw; pointer-events: none; }
#mbar b { color: #ffd870; }
.msides { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; margin-top: 3px; }
.msides span.out { opacity: .45; text-decoration: line-through; } .msides span.me { font-weight: 700; }
i.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.4); }
#matches .card { overflow-y: auto; }
.mform { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 6px 0 10px; }
.mf { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 700; } .mf select, .mf input { font: 15px var(--font); padding: 5px 6px; border: 1px solid #7a5530; border-radius: 5px; background: #fffaf0; }
.mf-sub { grid-column: 1 / -1; font-size: 12.5px; }
.mrooms { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mroom, .mpl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; background: rgba(255,255,255,.45); border: 1px solid #c9a86a; border-radius: 6px; padding: 7px 10px; }
.mroom .muted { flex: 1; font-size: 12.5px; }
.mplayers { display: flex; flex-direction: column; gap: 5px; } .mpl em { font-size: 12px; color: var(--red); } .mrd { margin-left: auto; font-size: 12.5px; opacity: .7; } .mrd.on { color: #2a7a3a; opacity: 1; font-weight: 700; }
.mme { margin: 10px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.swb { width: 24px; height: 24px; border-radius: 5px; border: 2px solid rgba(0,0,0,.3); padding: 0; } .swb.on { border: 3px solid #fff; box-shadow: 0 0 0 2px #2b1d12; } .swb:disabled { opacity: .2; }
.mroom-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
button.small { padding: 4px 10px; font-size: 13px; }
.mtable { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0; } .mtable th, .mtable td { padding: 5px 6px; border-bottom: 1px solid #c9a86a; text-align: center; } .mtable td:first-child, .mtable th:first-child { text-align: left; } .mtable tr.won { background: rgba(255,215,90,.3); }
@media (max-width: 600px) { .mform { grid-template-columns: 1fr; } #mbar { top: 88px; font-size: 12px; } }
