/* Login + character select (title.js / account.js) and levels: XP bar, level-up banner, character sheet (progress.js) */

/* ---------------------------------------------------------------- login + character select */
.tnote { margin:0; max-width:320px; text-align:center; color:#d6c193; font-size:14px; text-shadow:0 1px 2px #000; }
#discordBtn:disabled { filter:grayscale(.8) brightness(.7); cursor:not-allowed; }
.charlist { display:grid; gap:8px; margin-bottom:10px; }
.charcard { width:100%; }
#chars .cpanel { width:min(720px, calc(100vw - 24px)); }
#chars .cgrid { grid-template-columns:auto 1fr; }                /* (the column fits the preview frame: no overflow onto the rim) */
#chars .tnote { text-align:left; max-width:none; margin:6px 0 2px; }
#chars .linkbtn { padding-left:0; }
.cfgap { flex:1; }
#chars .cfoot { justify-content:flex-start; }
#creator #tName { width:min(220px, 100%); font-size:16px; padding:8px 10px; }
#crErr { flex:1; margin:0; text-align:center; font-size:14px; }
@media (max-width: 680px) {
  #chars .cgrid { grid-template-columns:1fr; }
  #chars .cfoot .pxbtn { min-width:0; padding:10px 14px; }
}

/* ---------------------------------------------------------------- XP bar (under HP + stamina; click = sheet) */
#xpBar { height:12px; width:100%; margin-top:1px; pointer-events:auto; cursor:pointer; }
#xpBar i { background:linear-gradient(#b48cff, #6c3fc4); transition:transform .35s ease-out; }
#xpBar span { position:relative; display:block; padding-left:24px; font-size:9px; line-height:10px; color:#efe6ff;
  font-variant-numeric:tabular-nums; text-shadow:0 1px 1px #000; white-space:nowrap; }
#xpBar .xplv { position:absolute; left:0; top:0; bottom:0; z-index:1; min-width:20px; padding:0 4px; font-size:10px; line-height:10px;
  color:#2a1606; background:linear-gradient(#f8d982, #e3a640); border-radius:999px; text-align:center; }

/* ---------------------------------------------------------------- level-up banner */
#lvBanner { position:fixed; left:50%; top:22%; z-index:45; display:flex; flex-direction:column; align-items:center; gap:8px;
  pointer-events:none; transform:translateX(-50%); animation:lvban 3.6s ease-out forwards;
  filter:drop-shadow(0 0 8px rgba(0,0,0,.85)) drop-shadow(0 0 22px rgba(255,190,80,.55)); }
@keyframes lvban {
  0% { opacity:0; transform:translateX(-50%) scale(.4); }
  8% { opacity:1; transform:translateX(-50%) scale(1.15); }
  14% { transform:translateX(-50%) scale(1); }
  80% { opacity:1; transform:translateX(-50%) translateY(0); }
  100% { opacity:0; transform:translateX(-50%) translateY(-18px); }
}

/* ---------------------------------------------------------------- character sheet (reuses the Settings panel look) */
#sheet { position:fixed; z-index:35; left:50%; top:50%; transform:translate(-50%, -50%); width:min(420px, calc(100vw - 16px));
  max-height:calc(100dvh - 16px); font-family:Georgia, "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; }
.shtop { display:flex; align-items:baseline; gap:10px; margin:4px 0 8px; }
.shname { color:#f3cf7a; font-size:18px; }
.shcls { color:#d6c193; }
.shxp { height:16px; margin-bottom:6px; }
.shxp i { background:linear-gradient(#b48cff, #6c3fc4); }
.shxp span { position:relative; display:block; text-align:center; font-size:11px; line-height:14px; color:#efe6ff; text-shadow:0 1px 1px #000; }
.shsec { margin-top:10px; }
.shsec .ih { color:#bda97f; font-size:16px; letter-spacing:.06em; font-variant:small-caps; font-weight:600; margin-bottom:2px; }
.shrow { display:grid; grid-template-columns:1fr auto; gap:0 10px; padding:4px 6px; border-bottom:1px solid rgba(107,74,42,.35); }
.shrow b { color:#f6e7c1; font-variant-numeric:tabular-nums; }
.shrow em { grid-column:1 / -1; font-style:normal; font-size:12px; color:#a8977a; }
/* hover help (data-tip, progress.js ATTR_INFO / STAT_INFO): a small box under the row */
.shrow[data-tip] { position:relative; cursor:help; }
.shrow[data-tip]:hover { background:rgba(246,212,136,.07); }
.shrow[data-tip]:hover::after { content:attr(data-tip); position:absolute; left:4px; right:4px; top:calc(100% + 2px); z-index:5;
  padding:5px 7px; background:#1b120a; border:1px solid #8a6236; border-radius:3px; box-shadow:0 3px 8px rgba(0,0,0,.6);
  font-size:12px; line-height:1.35; color:#e9d9b4; pointer-events:none; }
.shrow.pw span, .shrow.pw b { color:#ffd27a; }
/* tabs: Character | Life Skills (lifeskills.js) */
.shtabs { display:flex; gap:4px; padding:0 12px; }
.shtab { flex:1; padding:5px 8px; border:0; cursor:pointer; color:#bda97f; background:rgba(40,26,14,.7); font:inherit; font-size:13px;
  box-shadow:inset 0 0 0 1px #5a3e20; }
.shtab.on { color:#f6d488; background:rgba(90,60,28,.85); box-shadow:inset 0 0 0 1px #a87a3a; }
.lsrow .lsbar { grid-column:1 / -1; height:10px; margin:2px 0; }
.lsbar i { background:linear-gradient(#a8e07a, #4a9a3a); }
.lsbar span { position:relative; display:block; text-align:center; font-size:9px; line-height:10px; color:#f0ffe8; text-shadow:0 1px 1px #000; }

/* party frames: the member's level */
.pflv { margin-left:auto; padding:0 4px; font-size:10px; color:#e8d7aa; opacity:.85; }
/* campfire + workbench panels (lifecraft.js), the food buff chip */
.lifepanel { position:fixed; z-index:35; left:50%; top:50%; transform:translate(-50%, -50%); width:min(460px, calc(100vw - 16px));
  max-height:calc(100dvh - 16px); font-family:Georgia, "Palatino Linotype", "Book Antiqua", "Times New Roman", serif; }
.lifepanel .sbody { overflow:auto; }
.lrec { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; padding:5px 6px; border-bottom:1px solid rgba(107,74,42,.35); }
.lrec.locked { opacity:.55; }
.lrec .ico { width:32px; height:32px; image-rendering:pixelated; }
.lrtxt b { display:block; color:#f6e7c1; }
.lrtxt em { display:block; font-style:normal; font-size:12px; color:#a8977a; }
.lring { display:flex; flex-wrap:wrap; gap:4px 10px; font-size:12px; }
.lring .have { color:#9ee08a; } .lring .miss { color:#e0907a; }
.lrec .pxbtn, .lcraftfoot .pxbtn { min-height:34px; min-width:74px; padding:6px 12px; }
.lchips { display:flex; flex-wrap:wrap; gap:5px; }
.lchip { padding:6px 10px; min-height:32px; border:0; cursor:pointer; color:#d8c8a4; background:rgba(40,26,14,.75); font:inherit; font-size:13px;
  box-shadow:inset 0 0 0 1px #5a3e20; }
.lchip.on { color:#ffe6a8; background:rgba(110,74,30,.9); box-shadow:inset 0 0 0 2px #d8a040; }
.lchip:disabled { opacity:.4; cursor:default; }
.lcraftfoot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; }
.lspit { padding:10px 4px 4px; touch-action:manipulation; cursor:pointer; }
.lspitbar { position:relative; height:22px; margin:10px 0; background:linear-gradient(90deg, #5a2a14, #8a4a20 50%, #3a1a0c); box-shadow:inset 0 0 0 2px #1a0c04; }
.lspitbar i.gold { position:absolute; top:2px; bottom:2px; background:rgba(255,200,80,.35); box-shadow:inset 0 0 0 1px #ffd070; }
.lspitbar.glow i.gold { background:rgba(255,220,110,.85); box-shadow:0 0 12px #ffc040; }
.lspitbar b { position:absolute; top:-4px; bottom:-4px; width:4px; margin-left:-2px; background:#fff4d8; box-shadow:0 0 4px #000; }
.lspitbar.perfect { box-shadow:inset 0 0 0 2px #ffd070, 0 0 16px #ffc040; }
.lspitbar.fine { box-shadow:inset 0 0 0 2px #c8a070; }
.lspitbar i.burn { position:absolute; top:2px; bottom:2px; background:rgba(40,16,8,.55); box-shadow:inset 0 0 0 1px #8a3a1a; }
.lspitbar.burnt { box-shadow:inset 0 0 0 2px #5a2a14; filter:saturate(.4) brightness(.7); }
body.touch .lspitbar { height:34px; }
