/* 장비 tab: the captain with 6 slots, owned items (장착 / 해제 / 합성) and the equipment / ship gacha. */

/* the equipment tab covers the whole sea */
#app.sheet.full #panel { height: var(--seaH, min(calc(var(--game-height) * .8), 640px)); border-radius: 0; }
#app.sheet.full #toasts { z-index: 7; top: 8px; bottom: auto; }

.grade { display: inline-block; padding: 0 5px; border-radius: 6px; font-size: 10px; line-height: 15px; color: #10203e; background: var(--gc); text-shadow: none; }
.grade.off { background: #2c3550; color: var(--muted); }
.ipic {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  border: 2px solid var(--gc, #3a4a6a); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--gc, #3a4a6a) 35%, #12284c), #0c1e3e);
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--gc, #3a4a6a) 45%, transparent);
}
.ipic .i { width: 32px; height: 32px; }
.ipic.sm { width: 38px; height: 38px; }
.ipic.sm .i { width: 28px; height: 28px; }
.ipic.big { width: 84px; height: 84px; margin: 2px auto 6px; border-width: 3px; border-radius: 16px; }
.ipic.big .i { width: 62px; height: 62px; }
.ipic.none { border-style: dashed; color: var(--muted); font-size: 26px; }
.ipic.big.none { font-size: 40px; }
.shipico canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.ipic .shipico { width: 92%; height: 70%; }

/* captain + 6 slots */
.gearstage { display: flex; align-items: stretch; gap: 6px; margin: 0 0 6px; }
.gcol { flex: 0 0 31%; display: flex; flex-direction: column; gap: 5px; }
.gslot {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center;
  padding: 5px 6px; border-radius: 12px; text-align: left;
  border: 2px solid var(--line); border-bottom: 4px solid color-mix(in srgb, var(--gc, #3a4a6a) 70%, #000);
  background: linear-gradient(color-mix(in srgb, var(--gc, #3a4a6a) 22%, var(--card2)), var(--card));
}
.gslot.empty { --gc: #3a4a6a; }
.gslot .slotpic { grid-row: 1 / 3; width: 42px; height: 42px; }
.gslot .slotpic .i { width: 30px; height: 30px; }
.gslot .gsn { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gslot .gsn b { font-weight: normal; color: #8ff58a; }
.gslot .grade { justify-self: start; }
.gchar {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  border-radius: 14px; border: 2px solid var(--line); background: radial-gradient(circle at 50% 35%, #4f8ad0, #163262 75%); overflow: hidden;
}
.gchar .pt { width: 104px; height: 164px; }
.gchar .pt canvas { width: 100%; height: 100%; display: block; }
.gpow { display: flex; align-items: center; gap: 4px; padding: 2px 8px 3px; font-size: 13px; }
.gpow b { font-weight: normal; color: var(--gold); }
.gpow .hi { width: 18px; height: 18px; }
.gchips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.gchips span { font-size: 10px; padding: 2px 6px; border-radius: 8px; background: rgba(0, 0, 0, .35); color: var(--muted); }
.gchips b { font-weight: normal; color: #fff; }

/* owned items */
.gcats { display: flex; gap: 3px; overflow-x: auto; margin: 0 -2px 6px; padding: 0 2px 2px; scrollbar-width: none; }
.gcats button { flex: 0 0 auto; padding: 4px 9px; border-radius: 8px; border: 2px solid var(--line); background: #23406e; font-size: 12px; }
.gcats button.on { background: linear-gradient(#ffd96a, #e6a020); color: #3a2200; text-shadow: none; }
.ginv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding-bottom: 6px; }
.gitem {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 3px 5px; border-radius: 10px;
  border: 2px solid var(--gc); background: linear-gradient(color-mix(in srgb, var(--gc) 25%, #17345f), #0f2448);
}
.gitem.on { box-shadow: 0 0 0 2px #fff6c0; }
.gitem.merge { animation: glow 1s infinite alternate; }
.gipic { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.gipic .i { width: 36px; height: 36px; }
.gipic .shipico { width: 100%; height: 70%; }
.gipic i { position: absolute; left: -4px; top: -3px; padding: 0 4px; border-radius: 6px; font-size: 9px; font-style: normal; background: #e8434d; }
.ginm { font-size: 10px; line-height: 1.15; color: var(--gc); min-height: 2.3em; text-align: center; word-break: keep-all; }
.gcnt { position: relative; width: 100%; height: 12px; border-radius: 6px; background: #0c1e3e; overflow: hidden; }
.gcnt i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#8ff58a, #3aa84a); }
.gcnt b { position: relative; display: block; font-size: 9px; line-height: 12px; font-weight: normal; text-align: center; }
.gcnt.top { background: none; }
.gnone { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--muted); padding: 14px 0; }
.gacts { position: sticky; bottom: -10px; display: flex; gap: 6px; margin: 4px -8px -10px; padding: 8px; background: linear-gradient(#1a3460, #10264a); border-top: 2px solid var(--line); }
.gacts .buy { flex: 1; min-width: 0; padding: 8px 4px; }
.gacts .buy .bl { font-size: 14px; }

/* gacha */
.gacha { padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: radial-gradient(circle at 50% 0%, #3a5fa8, #142c58 70%); text-align: center; }
.gatitle { font-size: 19px; color: #fff3b0; }
.gasub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gapics { display: flex; justify-content: center; gap: 5px; margin: 8px 0; }
.galv { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.galv b { font-weight: normal; color: var(--gold); white-space: nowrap; }
.galvbar { position: relative; flex: 1; height: 16px; border-radius: 8px; border: 2px solid var(--line); background: #0c1e3e; overflow: hidden; }
.galvbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#8ff58a, #3aa84a); }
.galvbar span { position: relative; font-size: 9px; line-height: 12px; }
.gaodds { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 6px 0 10px; }
.gaodds div { padding: 3px 0; border-radius: 6px; border: 2px solid var(--gc); background: #0c1e3e; display: flex; flex-direction: column; }
.gaodds b { font-weight: normal; font-size: 10px; color: var(--gc); }
.gaodds span { font-size: 10px; }
.gabtns { display: flex; gap: 6px; }
.gabtns .buy { flex: 1; min-width: 0; padding: 9px 4px; }
.gabtns .buy .bl { font-size: 14px; }
.buy.gfree { background: linear-gradient(#5fd06a, #2a9a3e); }
.buy.gfree:disabled { background: linear-gradient(#5a6478, #3c4458); }

/* draw results and the item / slot popups */
.mbox.draw { max-width: 360px; }
.dres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 10px; }
.ditem { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: pop .3s both; }
.ditem small { font-size: 9px; line-height: 1.15; color: var(--gc); min-height: 2.3em; }
.ditem em { position: absolute; top: -4px; right: -2px; padding: 0 3px; border-radius: 5px; font-size: 9px; font-style: normal; background: #e8434d; }
.ditem.shine .ipic { animation: glow .8s infinite alternate; }
.ipop h2 { margin: 2px 0 4px !important; font-size: 19px !important; }
.ipop p { margin: 3px 0 !important; font-size: 13px !important; }
.ipop .idesc { color: var(--muted); font-size: 12px !important; }
.ipop .ieff { color: #fff3b0; }
.ipop .ieff small { color: var(--muted); font-size: 11px; }
.ipop .ieff .nx { color: #8ff58a; font-weight: normal; }
.ipop .isub { color: var(--muted); font-size: 12px !important; }
.mbtn.gold { background: linear-gradient(#ffd96a, #e08a10); }
.mbtn.gem { background: linear-gradient(#ff7ac8, #c83a8a); }
.mbtn.sup { display: flex; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(#5fd06a, #2a9a3e); touch-action: none; user-select: none; }
.mbtn.sup.no { background: linear-gradient(#6a7488, #444c60); }
.mbtn:disabled { filter: grayscale(.8) brightness(.7); }

/* 어탁 도감 */
.dexhead { padding: 8px; border-radius: 12px; border: 2px solid var(--line); background: linear-gradient(#3a2a1e, #24180f); margin-bottom: 4px; }
.dexcount { display: flex; align-items: center; gap: 5px; font-size: 15px; margin-bottom: 5px; }
.dexcount b { font-weight: normal; color: var(--gold); }
.dexsub { margin: 5px 0 0; font-size: 11px; color: #d8c8a8; }
.dexgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.dexcard {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px 4px 5px; border-radius: 8px;
  border: 2px solid #3a2410; background: #f4ecd8; color: #2a1c12; text-shadow: none; box-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}
.dexcard.giant { border-color: #b8862a; box-shadow: 0 0 0 2px #e8c060, 0 2px 0 rgba(0, 0, 0, .4); }
.dexcard.unk { background: #d8d0bc; }
.dexpic { position: relative; aspect-ratio: 3 / 2; border-radius: 4px; overflow: hidden; background: #efe5cf; }
.dexpic img { width: 100%; height: 100%; display: block; }
.seal {
  position: absolute; right: 3px; bottom: 3px; min-width: 24px; height: 24px; padding: 0 2px; border-radius: 4px;
  display: grid; place-items: center; background: #c8302a; color: #fff6e0; font-size: 13px; line-height: 1; border: 1px solid #7a1410;
  box-shadow: inset 0 0 0 2px rgba(255, 220, 200, .35); transform: rotate(-6deg);
}
.seal small { display: block; font-size: 7px; line-height: 1; }
.seal.big { right: 10px; bottom: 10px; min-width: 42px; height: 42px; font-size: 22px; }
.seal.big small { font-size: 10px; }
.dexpic .q, .q.big { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: rgba(60, 40, 30, .45); }
.q.big { font-size: 60px; }
.dexnm { font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dexst { font-size: 9px; text-align: center; color: #8a3a2a; }
.dexcard.unk .dexst { color: #6a5a4a; }
.mbox.dexpop { max-width: 360px; }
.dexbig { position: relative; margin: 0 auto 8px; border-radius: 8px; border: 3px solid #3a2410; overflow: hidden; background: #efe5cf; }
.dexbig img { width: 100%; display: block; }
.dexvert { position: absolute; left: 8px; top: 8px; writing-mode: vertical-rl; font-size: 18px; color: #2a1c12; text-shadow: none; letter-spacing: 2px; }
.dexnext { color: #9fe8ff; }

/* gacha hub banners: characters (pieces) and skills */
.gseg { margin: 0 0 6px; }
.gseg button { padding: 5px 4px; font-size: 13px; }
.cglist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 10px; }
.cgcard { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 10px; border: 2px solid var(--line); background: linear-gradient(color-mix(in srgb, var(--cc) 30%, #17345f), #0f2448); }
.cgcard .hd { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: radial-gradient(circle at 50% 35%, #bfeaff, #2a6fb0); }
.cgcard .hd canvas { width: 100%; height: 100%; display: block; }
.cgcard.own { opacity: .65; }
.cgname { font-size: 13px; }
.cgrade { display: inline-block; padding: 0 4px; border-radius: 5px; font-size: 10px; line-height: 14px; color: #fff; background: var(--gc); text-shadow: none; vertical-align: 1px; }
.pcs { position: relative; display: block; width: 100%; height: 14px; border-radius: 7px; border: 1px solid var(--line); background: #0c1e3e; overflow: hidden; }
.pcs i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#d9a6ff, #8a3ad8); }
.pcs em { position: relative; display: block; font-size: 9px; line-height: 13px; font-style: normal; text-align: center; }
.gadone { font-size: 12px; color: #8ff58a; margin: 4px 0 8px; }
.sglist { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 10px; text-align: left; }
.sgrow { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; border: 2px solid var(--line); background: linear-gradient(color-mix(in srgb, var(--cc) 25%, #17345f), #0f2448); }
.sgrow.off { opacity: .75; }
.sgrow .ico { width: 34px; height: 34px; }
.sgrow .ico .i { width: 26px; height: 26px; }
.sgname { flex: 1; font-size: 14px; }
.sgname small { margin-left: 5px; font-size: 10px; color: var(--muted); }
.sglv { font-size: 12px; color: var(--gold); }
.sgp { min-width: 44px; text-align: right; font-weight: normal; font-size: 14px; color: #8ff58a; }
.ditem .ipic .hd { width: 100%; height: 100%; }
.ditem .ipic .hd canvas { width: 100%; height: 100%; display: block; }
.ditem em.lvup { background: #2a9a3e; }
.gotodraw { display: flex; align-items: center; gap: 5px; width: 100%; margin: 0 0 6px; padding: 7px 8px; border-radius: 10px; border: 2px solid var(--line); background: linear-gradient(#5a2a6a, #3a1a4a); font-size: 12px; text-align: left; }
.gotodraw b { font-weight: normal; color: #ffb8e8; }
.gotodraw span { margin-left: auto; color: var(--gold); white-space: nowrap; }
.gotodraw .si { width: 18px; height: 18px; }
.avcard { position: relative; }
.avcard .cgrade { position: absolute; top: 4px; left: 4px; z-index: 1; }
.avcard.lockedc .pt { filter: grayscale(.85) brightness(.55); }
.avcard.lockedc .pcs { margin-top: 2px; }
.gotodraw em { font-style: normal; line-height: 1.35; }

/* skill bar: chat preview on the left, 3 small skills + AUTO on the right, one row */
#actionbar { gap: 5px; padding: 5px 6px; }
#actionbar #chatbar {
  flex: 1 1 auto; min-width: 0; width: auto; height: 40px; padding: 0 6px; gap: 5px;
  border: 2px solid var(--line); border-radius: 10px; background: rgba(8, 20, 44, .55);
}
#actionbar #chatbar .cicon, #actionbar #chatbar .cicon img { width: 24px; height: 24px; }
#actionbar .cprev { font-size: 10px; line-height: 1.35; }
#skillSlots { flex: 0 0 auto; gap: 4px; }
#skillSlots .skill { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; }
#skillSlots .skill .cdt { font-size: 13px; }
#btnAuto { width: 40px; height: 40px; border-radius: 10px; }
#btnAuto b { font-size: 11px; }
#btnAuto small { font-size: 8px; }
.loslots { grid-template-columns: repeat(3, 1fr); }

/* 장비: the character opens the avatar setup */
button.gchar { padding: 0; position: relative; cursor: pointer; }
.gcharhint { display: flex; align-items: center; justify-content: center; gap: 3px; align-self: stretch; margin: 0 4px 4px; padding: 3px 6px; border-radius: 8px; background: linear-gradient(#8093f1, #6c82ee); font-size: 11px; white-space: nowrap; }
.gcharhint .si { width: 13px; height: 13px; }
.gback2 { display: block; width: 100%; margin: 0 0 6px; padding: 7px; border-radius: 10px; border: 2px solid var(--line); background: linear-gradient(#2a4f86, #1a3360); font-size: 13px; text-align: left; }

/* 상점 */
.shopdaily { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 6px; border-radius: 12px; border: 2px solid var(--line); background: linear-gradient(#3a6a3a, #1e3e22); }
.shopdaily > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.shopdaily b { font-weight: normal; font-size: 14px; color: #d8ffb0; }
.shopdaily small { font-size: 11px; }
.shopgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gemcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 14px 4px 6px; border-radius: 12px; border: 2px solid var(--line); background: radial-gradient(circle at 50% 30%, #4a3a8a, #1e1a4a); }
.gemstack .ci { width: 34px; height: 34px; }
.gemcard b { font-weight: normal; font-size: 16px; color: #ffd6f4; }
.gemcard small { font-size: 10px; color: #8ff58a; }
.gemcard .price { margin-top: 4px; width: 100%; padding: 4px 0; border-radius: 8px; background: linear-gradient(#5fd06a, #2a9a3e); font-size: 13px; }
.sbadge { display: inline-block; padding: 1px 5px; border-radius: 6px; font-size: 9px; background: #e8434d; color: #fff; text-shadow: none; }
.sbadge.b { background: #3a7ad8; }
.gemcard .sbadge { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.packcard { padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; border: 2px solid var(--line); background: linear-gradient(#5a3a1e, #2e1e10); }
.packcard.pass { background: linear-gradient(#2a4a8a, #16285a); }
.packcard.done { opacity: .55; }
.ptitle { display: flex; align-items: center; gap: 6px; font-size: 15px; color: #fff3b0; }
.packcard p { margin: 4px 0 6px; font-size: 12px; line-height: 1.5; }
.packcard .buy { width: 100%; }
.shopnote { font-size: 11px !important; color: var(--muted); text-align: center; margin: 8px 0 4px; }
.shopnote b { color: #ffd6a0; font-weight: normal; }
.sprice { font-size: 22px !important; color: var(--gold); }
