/* ===================== Рыбалка Онлайн — интерфейс ===================== */
:root {
  --panel: rgba(8, 24, 30, .70);
  --panel-strong: #0b1e25;
  --panel-soft: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #eef6f2;
  --muted: rgba(238, 246, 242, .62);
  --accent: #3fcf98;
  --accent-dark: #1d8f68;
  --gold: #ffcd4d;
  --blue: #4aa3ff;
  --danger: #ff6b5b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --blur: blur(10px) saturate(1.2);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8ecbff; color: var(--text); user-select: none;
  font-family: "Rubik", system-ui, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
canvas { display: block; }
body > canvas { position: fixed; inset: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h1 { margin: 0 0 6px; font-size: 36px; font-weight: 700; letter-spacing: -.5px; }
h2 { margin: 0; font-size: 22px; font-weight: 600; }
h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); text-align: left; }

/* ---------- Кнопки и поля ---------- */
button { font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08);
  transition: background .15s, transform .1s, filter .15s; white-space: nowrap; }
button:hover { background: rgba(255, 255, 255, .14); }
button:active { transform: scale(.97); }
button:disabled { opacity: .4; cursor: default; transform: none; background: rgba(255, 255, 255, .06); }
button.green { background: linear-gradient(180deg, var(--accent), var(--accent-dark)); border-color: rgba(255, 255, 255, .18); color: #06231a; }
button.green:hover { filter: brightness(1.08); }
button.green:disabled { background: rgba(63, 207, 152, .25); color: var(--text); }
button.blue { background: linear-gradient(180deg, #5cb2ff, #2b7fd6); border-color: rgba(255, 255, 255, .18); }
button.big { padding: 13px 28px; font-size: 17px; border-radius: 12px; }
button.wide { width: 100%; margin-top: 6px; padding: 6px 10px; font-size: 13px; }
/* поля ввода должны выделяться: с user-select: none (наследуется от body) клавиатура Android
   со словарём (Gboard и др.) не вставляет текст, пока не сменишь язык */
input, textarea { -webkit-user-select: text; user-select: text; }
input.text, #nameInput, #pinInput, #chatInput {
  width: 100%; font-family: inherit; color: var(--text); outline: none;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
input.text:focus, #nameInput:focus, #pinInput:focus, #chatInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 207, 152, .2); }
input[type=range] { accent-color: var(--accent); width: 160px; }

/* ---------- Оверлеи и карточки ---------- */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10;
  background: radial-gradient(ellipse at center, rgba(4, 18, 24, .35), rgba(4, 18, 24, .7)); }
.card { background: var(--panel-strong); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px;
  max-width: 560px; width: calc(100% - 32px); max-height: 94vh; overflow-y: auto; text-align: center; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.err { color: var(--danger); min-height: 20px; font-size: 14px; margin: 6px 0; }
.small { font-size: 12px; margin: 14px 0 0; line-height: 1.5; }
.controls { margin-top: 18px; font-size: 13px; line-height: 1.75; color: var(--muted); text-align: left;
  background: var(--panel-soft); border-radius: 12px; padding: 12px 14px; }
.controls b { color: var(--text); font-weight: 600; }
#start .card { max-width: 480px; }
#logo { display: block; width: 100%; max-width: 400px; height: auto; margin: -6px auto 4px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
#start #nameInput { margin-top: 14px; }
#start #pinInput { margin-top: 8px; }
#start #playBtn { width: 100%; }

/* Окно (магазин, снасти, друзья…): шапка, прокрутка, кнопка закрыть */
.sheet { display: flex; flex-direction: column; padding: 0; text-align: left; overflow: hidden; max-width: 620px; }
.sheetHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.iconbtn { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 16px; flex: none; }
#modalBody { padding: 6px 20px 16px; overflow-y: auto; flex: 1; }
.sheetFoot { padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.sheetFoot button { width: 100%; }

/* Строки списков в окнах. На узком экране кнопки уходят на отдельную строку */
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; margin: 8px 0;
  background: var(--panel-soft); border: 1px solid transparent; border-radius: 12px; }
.item.active { border-color: rgba(63, 207, 152, .7); background: rgba(63, 207, 152, .08); }
.item.invite { border-color: rgba(255, 205, 77, .55); background: rgba(255, 205, 77, .07); }
.item.invite .info { flex: 1 1 220px; min-width: 0; }
.item .left { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; }
.item .left > div { min-width: 0; }
.item > :last-child { margin-left: auto; }
.item .d { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.item .btns { display: flex; gap: 6px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.tabs button { border-radius: 999px; padding: 7px 14px; }
.tabs button.on { background: var(--accent); color: #06231a; border-color: transparent; }
.progress { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .4); overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); border-radius: 4px; }
.online-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #5a6a6a; }
.online-dot.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- Карта ---------- */
.mapCard { max-width: 760px; text-align: left; }
#locTabs { margin-top: 0; }
#mapWrap { position: relative; width: 100%; aspect-ratio: 400 / 340; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); margin-top: 8px;
  background: center / cover no-repeat; }
#mapCanvas { width: 100%; height: 100%; }
.pin { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.pin .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); transition: transform .15s; }
.pin.locked .dot { background: #7a8584; }
.pin.sel .dot { background: var(--accent); transform: scale(1.3); }
.pin .lbl { margin-top: 4px; background: rgba(6, 18, 24, .88); padding: 3px 9px; border-radius: 999px; font-size: 12px; white-space: nowrap; font-weight: 600; }
/* Телефон: подписи не помещаются — у точек кружок с числом рыбаков, подпись только у выбранной */
@media (max-width: 600px), (max-height: 560px) {
  .pin { transform: translate(-50%, -50%); }
  .pin .dot { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #3a2a00; text-shadow: none; }
  .pin .dot::after { content: attr(data-n); line-height: 1; }
  .pin.locked .dot { font-size: 11px; }
  .pin.sel .dot { color: #06231a; }
  .pin .lbl { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; }
  .pin.sel { z-index: 2; }
  .pin.sel .lbl { display: block; }
}
#spotInfo { margin-top: 14px; min-height: 96px; }
#spotInfo .row { margin-top: 10px; flex-wrap: wrap; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
#hud button, #hud input, #catchCard { pointer-events: auto; }
.panel { position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
#lvlBox { top: 12px; left: 12px; width: 240px; }
#lvlBox b { font-size: 16px; font-weight: 600; }
.money { color: var(--gold); font-weight: 700; font-size: 18px; }
.xpbar { height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .4); margin: 8px 0 4px; overflow: hidden; }
#xpFill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-dark), var(--accent)); border-radius: 4px; }
#xpTxt { font-size: 12px; }
/* Меню — одна панель под блоком уровня */
#menu { position: absolute; top: 104px; left: 12px; display: flex; flex-direction: column; gap: 1px; width: 240px; padding: 5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
#menu button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 10px; border: none; border-radius: 9px;
  background: transparent; font-weight: 500; }
#menu button:hover { background: rgba(255, 255, 255, .09); }
#menu button i { font-style: normal; width: 24px; text-align: center; font-size: 15px; text-shadow: none; }
#menu kbd { margin-left: auto; font-family: inherit; font-size: 11px; font-weight: 600; color: var(--muted); text-shadow: none;
  padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; opacity: .6; }
#menu button:hover kbd { opacity: 1; }
#menu .badge { margin-left: auto; }
#menu .badge + kbd { margin-left: 8px; }
#menu .badge.hidden + kbd { margin-left: auto; }
#rightTop { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#rightTop .panel { position: static; }
#clockBox { text-align: right; min-width: 150px; }
#clockTxt { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
#weatherTxt, #onlineTxt { font-size: 13px; }
#tourBox, #baitZoneBox { min-width: 200px; max-width: 240px; font-size: 13px; line-height: 1.5; }
#tourBox .tt { font-weight: 700; font-size: 15px; color: var(--gold); }
#tourBox .me { color: var(--accent); font-weight: 600; }
#baitZoneBox { color: #e8c890; }
#cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 3px #000; }
#msg { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 22px; font-weight: 700; transition: opacity .3s; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); padding: 0 16px; }
#lockHint { position: absolute; left: 0; right: 0; top: calc(50% + 24px); text-align: center; font-size: 14px; font-weight: 500; }
#leftBottom { position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: calc(100% - 24px); }
#chat { width: 380px; max-width: 100%; }
#chatLog { font-size: 13px; line-height: 1.4; display: flex; flex-direction: column; gap: 3px; }
#chatLog div { background: rgba(4, 16, 20, .5); padding: 3px 9px; border-radius: 8px; width: fit-content; max-width: 100%; word-wrap: break-word; }
#chatLog .sys { color: #ffe08a; }
.lvl { display: inline-block; min-width: 1.6em; padding: 0 4px; margin-right: 5px; border-radius: 6px; font-size: .8em; font-weight: 700;
  line-height: 1.5; text-align: center; vertical-align: 1px; color: #0b1e25; }
.lvl.l1 { background: #a9b4b8; }
.lvl.l2 { background: var(--accent); }
.lvl.l3 { background: var(--blue); }
.lvl.l4 { background: var(--gold); }
/* Кубок перед заголовком турнира */
#tourBox .cup::before { content: ''; display: inline-block; width: 22px; height: 22px; margin: -4px 6px -4px 0;
  vertical-align: middle; background: center / contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
#tourBox .cup::before { background-image: url(icons/trophy.webp); }
.pmline { color: #f7a8ff; }
#chatInput { padding: 11px 14px; font-size: 15px; background: rgba(4, 16, 20, .6); }
#infoBox { position: static; font-size: 13px; line-height: 1.55; min-width: 220px; }
#infoBox b { font-size: 14px; font-weight: 600; }
.warn { color: #ffb347; font-weight: 600; }
#statusBox { left: 50%; bottom: 12px; transform: translateX(-50%); text-align: center; width: 520px; max-width: calc(100% - 520px); min-width: 300px; }
#statusTitle { color: var(--accent); font-weight: 700; font-size: 16px; }
#statusHint { font-size: 13px; margin-top: 2px; color: var(--muted); }
#castBox { left: 50%; bottom: 84px; transform: translateX(-50%); width: 420px; text-align: center; font-size: 13px; font-weight: 600; }
.bar { position: relative; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .45); margin-top: 7px; overflow: hidden; }
#castFill { height: 100%; width: 0; background: var(--accent); border-radius: 6px; }
#dragMark { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; box-shadow: 0 0 3px #000; }
#reelBox { right: 12px; bottom: 12px; font-size: 13px; line-height: 1.6; }
#reelBox .row { margin-top: 4px; }
#reelBox button { padding: 4px 10px; font-size: 12px; }

/* Уведомления */
#toasts { position: fixed; z-index: 30; pointer-events: none; text-shadow: none; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(460px, calc(100% - 24px)); }
.toast { pointer-events: auto; background: var(--panel-strong); border: 1px solid var(--line-strong); border-radius: 14px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); animation: toastIn .25s ease-out; }
.toast .tx { flex: 1; font-size: 14px; }
.toast button { padding: 6px 12px; font-size: 13px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Карточка улова ---------- */
#catchCard { right: 24px; top: 50%; transform: translateY(-50%); width: 340px; text-align: center; padding: 16px 20px 18px; background: var(--panel-strong); }
#catchCard .cap { font-size: 11px; letter-spacing: 2.5px; color: var(--muted); font-weight: 600; }
#catchCard h2 { font-size: 30px; font-weight: 700; margin: 2px 0; }
#ccRecord { color: var(--gold); font-weight: 600; font-size: 14px; }
#ccPhoto { display: block; width: 100%; max-height: 120px; object-fit: contain; margin: 6px 0 2px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }
#ccRows { margin: 12px 0; border-top: 1px solid var(--line); padding-top: 6px; }
#ccRows .row { padding: 6px 0; font-size: 15px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
#ccRows .row span:first-child { color: var(--muted); }
#ccRows .row span:last-child { font-weight: 600; text-align: right; }
#ccXp { color: var(--accent); font-size: 13px; margin-bottom: 14px; }
#catchCard .btns button { flex: 1; padding: 12px; font-size: 16px; }

/* ---------- Иконки ---------- */
.ico { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 6px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.ico-item { width: 48px; height: 48px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.ico-item[src*="fishpic"] { width: 84px; }
.ico-title { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; margin: -6px 8px -4px 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.ico-toast { width: 36px; height: 36px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.ico-cap { display: block; width: 44px; height: 44px; object-fit: contain; margin: 0 auto 2px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
/* Строка-ссылка «купить в магазине» в окне снастей */
.moreRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 2px 2px; margin-top: 10px; border-top: 1px solid var(--line); }
.moreRow button { padding: 6px 12px; font-size: 13px; }
/* Окно чата */
#chatWin { z-index: 11; }
.chatSheet { display: flex; flex-direction: column; max-width: 620px; height: min(640px, 88vh); padding: 0; text-align: left; overflow: hidden; }
.chatSheet h2 { display: flex; align-items: baseline; gap: 10px; }
.chatOnline { font-size: 13px; font-weight: 600; color: var(--accent); }
.chatTabs { margin: 10px 20px 0; }
.chatTabs .badge { margin-left: 6px; }
#chatList { flex: 1; overflow-y: auto; padding: 10px 20px; display: flex; flex-direction: column; gap: 12px; user-select: text; }
.chatEmpty { margin: auto; text-align: center; max-width: 300px; }
.cm { display: flex; gap: 12px; align-items: flex-start; }
.cmAva { flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #10202a; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.cmBody { min-width: 0; }
.cmHead { display: flex; align-items: baseline; gap: 8px; }
.cmHead .lvl { margin-right: -2px; }
.cmName { font-weight: 700; font-size: 14px; cursor: pointer; }
.cmName:hover { text-decoration: underline; }
.cmTime { font-size: 12px; color: var(--muted); }
.cmText { font-size: 15px; line-height: 1.45; margin-top: 2px; word-wrap: break-word; overflow-wrap: anywhere; }
.cm.mine .cmText { color: #dff7ec; }
.cmSys { align-self: center; text-align: center; font-size: 12px; color: #ffe08a; background: rgba(255, 224, 138, .07); padding: 4px 12px; border-radius: 999px; max-width: 92%; }
.cmSys.pm { color: #c8b8ff; background: rgba(160, 140, 255, .1); }
.chatInputRow { display: flex; gap: 8px; padding: 12px 20px 6px; border-top: 1px solid var(--line); }
#chatInput { flex: 1; width: auto; }
#chatSend { flex: none; width: 54px; font-size: 20px; padding: 0; border-radius: 12px; }
.chatHint { padding: 0 20px 12px; font-size: 12px; }
@media (max-width: 600px) {
  #chatWin { align-items: flex-end; }
  .chatSheet { width: 100%; max-width: none; height: 82vh; border-radius: 22px 22px 0 0; }
  #chatList, .chatInputRow, .chatHint { padding-left: 14px; padding-right: 14px; }
  .chatTabs { margin: 8px 14px 0; }
  .cmAva { width: 34px; height: 34px; font-size: 15px; }
}
/* Атлас рыб */
.atlasGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.atlasCard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; white-space: normal;
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 12px; font-weight: 500; }
.atlasCard:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .09); }
.atlasPic { width: 100%; height: 56px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.atlasCard .nm { font-size: 13px; font-weight: 600; margin-top: 4px; }
.atlasCard .st { font-size: 11px; color: var(--muted); }
.atlasCard .medal { position: absolute; top: 4px; right: 6px; font-size: 18px; }
.unknown .atlasPic, .unknown .heroPic { filter: brightness(0) opacity(.45); } /* ещё не пойман — силуэт */
.unknown .nm { color: var(--muted); }
.nopic { display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 26px; }
.atlasHero { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px 0 4px; }
.heroPic { width: 100%; max-width: 360px; height: 150px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.heroPic.nopic { height: 110px; font-size: 54px; }
.atlasHero h2 { font-size: 26px; font-weight: 700; }
.heroMedal { font-size: 14px; font-weight: 600; color: var(--gold); }
.atlasRow { padding: 7px 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 14px; }
.atlasRow span { color: var(--muted); }
.atlasRow b { font-weight: 600; text-align: right; }
.medalRow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.medalPill { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--panel-soft); border: 1px solid var(--line); opacity: .55; }
.medalPill.on { opacity: 1; border-color: rgba(255, 205, 77, .5); background: rgba(255, 205, 77, .08); }
.medalPill .mi { font-size: 24px; }
.medalPill .mw, .medalPill .mr { font-size: 11px; color: var(--muted); font-weight: 500; }
.about { font-size: 14px; line-height: 1.5; margin: 0 0 6px; text-align: left; }
.tipBox { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(63, 207, 152, .1); border: 1px solid rgba(63, 207, 152, .3); font-size: 14px; line-height: 1.45; }
@media (max-width: 600px) { .atlasGrid { grid-template-columns: repeat(2, 1fr); } }
/* Награда за вход: 7 дней */
.loginGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.loginDay { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; text-align: center;
  background: var(--panel-soft); border: 1px solid var(--line); border-radius: 12px; }
.loginDay.big { grid-column: span 2; background: rgba(255, 205, 77, .08); border-color: rgba(255, 205, 77, .35); }
.loginDay.now { border-color: var(--accent); background: rgba(63, 207, 152, .12); box-shadow: 0 0 0 2px rgba(63, 207, 152, .25); }
.loginDay.taken { opacity: .5; }
.loginDay .n { font-size: 12px; font-weight: 600; color: var(--muted); }
.loginDay .r { font-size: 12px; font-weight: 600; white-space: pre-line; line-height: 1.35; }
.loginDay .coin { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px;
  color: #6a4a00; background: radial-gradient(circle at 35% 30%, #ffe58a, #e0a820); box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.loginDay .ok { position: absolute; top: 6px; right: 8px; color: var(--accent); font-weight: 700; }
.ico-day { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.loginDay.big .ico-day { width: 52px; height: 52px; }
.center { text-align: center; margin-top: 10px; }
@media (max-width: 600px) { .loginGrid { grid-template-columns: repeat(3, 1fr); } .loginDay.big { grid-column: span 3; } }
.bonusLine { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bonusLine .ico-item { width: 40px; height: 40px; }
#menu button i img { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.ico-bait { float: right; width: 50px; height: 50px; object-fit: contain; margin: 0 0 4px 10px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }

/* ---------- Сенсорные кнопки ---------- */
#menuToggle { display: none; }
#touchUI { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
#touchUI .tcol { display: flex; flex-direction: column; gap: 8px; }
#touchUI .tbtn { pointer-events: auto; touch-action: none; background: var(--panel); border: 1px solid var(--line-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
#touchUI .tbtn.round { width: 46px; height: 46px; border-radius: 50%; padding: 0; font-size: 20px; }
#touchUI .tbtn.big { width: 92px; height: 92px; border-radius: 50%; font-size: 30px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: radial-gradient(circle at 35% 30%, #5fe0ad, var(--accent-dark)); border: 3px solid rgba(255, 255, 255, .55); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); color: #fff; }
#touchUI .tbtn.big small { font-size: 12px; font-weight: 700; }
#touchUI .tbtn.big.on { filter: brightness(1.2); transform: scale(.95); }
#touchUI .tbtn.big.alert { background: radial-gradient(circle at 35% 30%, #ffe27a, #e08a10); animation: pulse .4s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
body.touch #reelBox { right: 172px; }
body.touch #reelBox > div:first-child, body.touch #groundbaitBtn { display: none; }
body.touch #cross { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
body.touch canvas { touch-action: none; }

/* ---------- Небольшие экраны (телефон горизонтально, планшеты) ---------- */
@media (max-width: 900px), (max-height: 560px) {
  #menuToggle { display: block; position: absolute; top: 80px; left: 12px; padding: 7px 14px; font-size: 13px; pointer-events: auto;
    background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
  #menu { display: none; top: 118px; width: 150px; gap: 4px; background: var(--panel-strong); padding: 8px; border-radius: 14px; border: 1px solid var(--line); z-index: 6; box-shadow: var(--shadow); }
  #menu.open { display: flex; }
  #menu button { padding: 8px 10px; font-size: 13px; box-shadow: none; background: rgba(255, 255, 255, .06); }
  #menu kbd { display: none; }
  #lvlBox { width: 190px; padding: 7px 10px; }
  #lvlBox b { font-size: 14px; }
  .money { font-size: 15px; }
  #clockTxt { font-size: 20px; }
  #clockBox { min-width: 110px; padding: 6px 10px; }
  #weatherTxt, #onlineTxt { font-size: 11px; }
  #tourBox, #baitZoneBox { min-width: 140px; max-width: 190px; font-size: 11px; padding: 5px 9px; }
  #tourBox .tt { font-size: 13px; }
  #chat { width: 240px; }
  #chatLog { font-size: 11px; }
  #chatLog div:nth-last-child(n+4) { display: none; }
  #infoBox { font-size: 11px; min-width: 0; padding: 6px 10px; line-height: 1.35; }
  #infoBox b { font-size: 12px; }
  .ico-bait { width: 30px; height: 30px; }
  .ico { width: 16px; height: 16px; }
  #statusBox { bottom: auto; top: 10px; width: auto; min-width: 0; max-width: calc(100% - 440px); padding: 5px 12px; }
  #statusTitle { font-size: 13px; } #statusHint { font-size: 11px; }
  #castBox { bottom: auto; top: 62px; width: min(340px, calc(100% - 440px)); font-size: 12px; padding: 6px 10px; }
  #reelBox { font-size: 12px; padding: 6px 10px; line-height: 1.4; }
  #reelBox button { padding: 4px 8px; font-size: 12px; }
  #catchCard { width: 260px; right: 12px; padding: 10px 14px; }
  #catchCard h2 { font-size: 22px; }
  #ccPhoto { max-height: 64px; margin: 2px 0; }
  #ccRows { margin: 6px 0; }
  #ccRows .row { padding: 2px 0; font-size: 12px; }
  #catchCard .btns button { padding: 9px; font-size: 15px; }
  .card { padding: 18px 16px; }
  h1 { font-size: 28px; }
  #msg { font-size: 16px; top: 24%; }
  .sheet { max-height: 92vh; }
  .sheetHead { padding: 12px 16px 10px; }
  #modalBody { padding: 4px 16px 12px; }
  .sheetFoot { padding: 10px 16px 12px; }
  .controls { display: none; }
}

/* ---------- Телефон вертикально ---------- */
@media (max-width: 600px) {
  /* окна выезжают снизу листом */
  #modal { align-items: flex-end; }
  #modal .sheet { width: 100%; max-width: none; max-height: 86vh; border-radius: 22px 22px 0 0; border-bottom: none; animation: sheetUp .22s ease-out; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } }
  .item { padding: 12px; }
  .item .left { flex-basis: 100%; }
  .item > :last-child { margin-left: 0; width: 100%; }
  .item > button:last-child, .item .btns { width: 100%; }
  .item .btns button { flex: 1; }
  .item .d { font-size: 12px; }
  .ico-item { width: 42px; height: 42px; }
  input[type=range] { width: 100%; }
  /* HUD: снизу — тормоз и кнопки, над ними статус, выше — чат и снасти */
  #reelBox, body.touch #reelBox { left: 12px; right: auto; bottom: 12px; width: calc(100% - 184px); }
  #reelBox .row { justify-content: flex-start; }
  #statusBox { top: auto; bottom: 86px; left: 12px; right: 172px; width: auto; max-width: none; min-width: 0; transform: none; text-align: left; }
  #leftBottom { bottom: 150px; max-width: calc(100% - 184px); }
  #chat { width: 100%; }
  #chatLog div:nth-last-child(n+3) { display: none; }
  #infoBox div { display: none; }
  #infoBox .ico-bait { display: none; }
  #castBox { top: calc(50% + 28px); bottom: auto; left: 12px; right: 12px; width: auto; transform: none; }
  #msg { top: 22%; }
  #rightTop { max-width: 46%; }
  #tourBox, #baitZoneBox { min-width: 0; }
  #catchCard { left: 12px; right: 12px; width: auto; top: 46%; }
  #toasts { top: 120px; }
  .mapCard { padding: 14px 12px; }
  #spotInfo .row button { width: 100%; }
}

/* Пока открыта карточка улова: кнопки заброса, тормоз и часы не нужны — прячем, чтобы не перекрывали её */
body.card-open #touchUI, body.card-open #reelBox, body.card-open #castBox { display: none; }
@media (max-width: 900px), (max-height: 560px) {
  body.card-open #rightTop, body.card-open #statusBox { display: none; }
  #catchCard { max-height: calc(100% - 24px); overflow-y: auto; }
}
/* Телефон горизонтально: карточка улова компактная и по центру справа */
@media (max-height: 560px) and (min-width: 601px) {
  #catchCard { width: 300px; right: 16px; padding: 10px 16px 12px; }
  #catchCard h2 { font-size: 22px; }
  #ccPhoto { max-height: 56px; }
  #ccRows .row { padding: 2px 0; font-size: 12px; }
  #ccXp { margin-bottom: 8px; font-size: 12px; }
  #catchCard .btns button { padding: 10px; font-size: 15px; }
}
