﻿/* 스탯스토리 — 모험 기록·몬스터 도감·칭호 화면(js/records.js) */

/* 바탕: 하늘색 위에 옅은 점무늬(펼쳐 놓은 모험 수첩) */
.records-screen .scroll {
  background-color: #c4e6ff;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .55) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 65%, rgba(124, 92, 255, .13) 0 3px, transparent 4px);
  background-size: 64px 64px, 96px 96px;
}
.rec-wrap { display: grid; gap: 14px; padding-block: 14px 40px; }
.rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-head h1 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; color: #fff; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 0 4px 0 var(--ink); letter-spacing: -.5px; }

/* 탭: 수첩 옆에 붙은 색인표. 고른 탭은 금빛 */
.rec-tabs { display: flex; gap: 8px; }
.rec-tab {
  flex: 1 1 auto; min-width: 0; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 10px; font-family: var(--f-ui); font-size: 17px; line-height: 1.1; color: var(--ink); white-space: nowrap; cursor: pointer;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink), inset 0 -3px 0 #e4d4b2;
  transition: transform .08s;
}
.rec-tab svg { width: 22px; height: 22px; flex: none; }
.rec-tab[aria-selected="true"] { background: linear-gradient(180deg, #fff6c2 0%, var(--gold) 72%); box-shadow: 0 4px 0 var(--ink), inset 0 -4px 0 var(--gold-deep), inset 0 2px 0 rgba(255, 255, 255, .6); }
.rec-tab:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.rec-tab:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.rec-panel { display: grid; gap: 14px; min-width: 0; }

/* 마당 제목·설명 */
.rec-sec { padding: 14px 14px 16px; display: grid; gap: 10px; min-width: 0; }
.rec-sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.rec-sec-hd h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: -.3px; }
.rec-sec-hd h2 svg { width: 28px; height: 28px; flex: none; }
.rec-tot { font-family: var(--f-ui); font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.rec-tot b { font-family: var(--f-num); font-weight: 400; font-size: 20px; color: var(--ink); }
.rec-note { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.rec-note b { font-family: var(--f-ui); font-weight: 400; }
.rec-note b.r1 { color: #0f6a3a; } .rec-note b.r2 { color: var(--violet-deep); } .rec-note b.r3 { color: var(--orange-deep); }

/* 막대(맞힌 문제, 깬 층, 도감) */
.rec-bar { position: relative; height: 12px; border: 2px solid var(--ink); border-radius: 8px; background: #efe5cf; overflow: hidden; }
.rec-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #a6f3dc 0%, var(--mint) 55%, var(--mint-deep) 100%); }
.rec-bar.big { height: 16px; border-width: 2.5px; }
.rec-bar.big i { background: linear-gradient(180deg, #fff3b0 0%, var(--exp) 50%, var(--exp-deep) 100%); }

/* 시그마의 한마디 */
.rec-owl { display: flex; align-items: flex-end; gap: 6px; }
.rec-owl-pic { width: 78px; flex: none; animation: bob 2.6s ease-in-out infinite; }
.rec-bubble {
  position: relative; flex: 1; min-width: 0; margin: 0 0 14px; padding: 10px 14px 11px;
  background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--shade);
  font-family: var(--f-ui); font-size: 15.5px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere;
}
.rec-bubble::before { content: ""; position: absolute; left: -11px; bottom: 16px; width: 16px; height: 16px; background: inherit; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.rec-bubble b { font-weight: 400; color: var(--violet-deep); }
.rec-owl.gold .rec-bubble { background: linear-gradient(180deg, #fffdf0, #fff1c2); }
.rec-owl.gold .rec-bubble::before { background: #fff6d6; }

/* ---------- 기록 탭 ---------- */
.rec-top { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
/* 주인공 카드: 장비 화면(.char-card)의 작은 무대를 그대로 쓰고 높이만 줄인다 */
.records-screen .rec-hero.char-card .stagebox { height: 222px; }
.records-screen .rec-hero.char-card .stagebox .pedestal.hero-ped { height: 74%; }
.rec-measuring .idle { animation: none !important; } /* js/records.js 의 fitHero 가 제자리 크기를 잴 때 */
.rec-id { display: grid; justify-items: start; align-content: start; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.rec-nm { max-width: 100%; font-family: var(--f-ui); font-weight: 400; font-size: 22px; line-height: 1.15; word-break: keep-all; overflow-wrap: anywhere; }
.rec-ttl { max-width: 100%; font-family: var(--f-ui); font-size: 15px; line-height: 1.3; color: var(--violet-deep); word-break: keep-all; overflow-wrap: anywhere; }
.rec-ttl.none { color: var(--ink-soft); font-size: 14px; }
.rec-expl { justify-self: stretch; display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-family: var(--f-ui); font-size: 13px; color: var(--ink-soft); }
.rec-id .gauge { justify-self: stretch; }

/* 숫자 기록 칸 */
.rec-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.rec-tile {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center;
  padding: 10px 12px; min-width: 0; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 0 5px 0 var(--shade), inset 0 0 0 2px var(--paper-2);
}
.rec-tile-ic { grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center; }
.rec-tile-ic svg { width: 32px; height: 32px; }
.rec-tile-k { font-family: var(--f-ui); font-size: 13.5px; line-height: 1.2; color: var(--ink-soft); word-break: keep-all; }
.rec-tile-v { font-family: var(--f-num); font-weight: 400; font-size: 25px; line-height: 1.1; color: var(--ink); white-space: nowrap; }
.rec-tile-v small { font-size: 15px; color: var(--ink-soft); }
/* 근거의 조각 칸: 열두 조각(얻은 조각은 빛나고, 못 얻은 조각은 회색) */
.rec-tile.rec-shards { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; }
.rec-shards .rec-tile-k { grid-column: 1; grid-row: 1; }
.rec-shards .rec-tile-v { grid-column: 1; grid-row: 2; }
.rec-strip { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; }
.rec-strip i { display: grid; justify-items: center; }
.rec-strip .shard-img { width: 100%; max-width: 21px; }
.rec-tile.rec-shards.all { background: linear-gradient(180deg, #fffdf0, #fff1c2); }
.rec-tile.rec-shards.all .rec-strip { filter: drop-shadow(0 0 4px rgba(255, 230, 140, .95)); }

/* 챕터별 숙련도·던전 정복 */
.rec-chlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rec-ch, .rec-dg {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 56px; align-items: center; gap: 10px; min-width: 0;
  padding: 8px 10px 9px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--shade);
}
.rec-ch-sh { display: grid; place-items: center; height: 46px; }
.rec-ch-sh .shard-img { width: auto; height: 44px; }
.rec-ch.won .rec-ch-sh { filter: drop-shadow(0 0 4px rgba(255, 236, 150, .95)); }
.rec-ch-mid { min-width: 0; display: grid; gap: 5px; }
.rec-ch-nm { font-family: var(--f-ui); font-size: 16px; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.rec-ch-nm em { font-style: normal; font-size: 13px; color: var(--orange-deep); margin-right: 5px; }
.rec-ch-nm small { display: block; margin-top: 1px; font-family: var(--f-body); font-size: 12.5px; color: var(--ink-soft); }
.rec-ch-sub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 10px; font-family: var(--f-ui); font-size: 13px; line-height: 1.35; color: var(--ink-soft); }
.rec-ch-sub b { font-family: var(--f-num); font-weight: 400; font-size: 14px; color: var(--ink); }
.rec-boss.on { color: #0f6a3a; }
.rec-rank {
  display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 52px; padding: 3px 2px 4px;
  border: 2.5px solid; border-radius: 12px; font-family: var(--f-ui); font-size: 13.5px; line-height: 1.1;
}
.rec-rank svg { width: 24px; height: 24px; }
.rec-rank b { font-weight: 400; }
.rec-rank.r1 { background: var(--ok-bg); border-color: var(--ok); color: #0f6a3a; }
.rec-rank.r2 { background: #ece6ff; border-color: var(--violet); color: var(--violet-deep); }
.rec-rank.r3 { background: linear-gradient(180deg, #fff6c4, #ffd65a); border-color: var(--gold-deep); color: #6a4200; box-shadow: 0 0 10px rgba(255, 200, 61, .6); }
.rec-dglist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rec-dg { grid-template-columns: 44px minmax(0, 1fr) auto; }
.rec-dg-ico { width: 44px; height: 44px; display: grid; place-items: center; border: 2.5px solid var(--ink); border-radius: 12px; background: hsl(var(--hue) 70% 90%); }
.rec-dg-ico svg { width: 26px; height: 26px; }
.rec-state { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 2.5px solid #b9b0cc; border-radius: 10px; background: #ece8f3; color: var(--ink-soft); font-family: var(--f-ui); font-size: 14px; white-space: nowrap; }
.rec-state svg { width: 18px; height: 18px; }
.rec-state.go { background: #fff3cf; color: #7a4d00; border-color: var(--gold-deep); }
.rec-state.on { background: linear-gradient(180deg, #fff6c4, #ffd65a); color: #6a4200; border-color: var(--gold-deep); }

/* ---------- 몬스터 도감 탭 ---------- */
.rec-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-jump-btn {
  min-width: 40px; height: 40px; padding: 0 8px; display: grid; place-items: center; cursor: pointer;
  font-family: var(--f-num); font-size: 16px; color: var(--ink); background: #fff; border: 2.5px solid var(--ink); border-radius: 11px; box-shadow: 0 3px 0 var(--ink);
}
.rec-jump-btn.dg { font-family: var(--f-ui); font-size: 14px; }
.rec-jump-btn.done { background: linear-gradient(180deg, #fff6c4, var(--gold)); }
.rec-jump-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.rec-jump-btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.rec-region { display: grid; gap: 10px; min-width: 0; scroll-margin-top: 10px; }
.rec-rh { display: flex; align-items: center; gap: 10px; padding: 7px 12px 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--shade); }
.rec-rh-ico { width: 30px; height: 38px; flex: none; display: grid; place-items: center; }
.rec-rh-ico .shard-img { width: auto; height: 36px; }
.rec-rh-ico > svg { width: 28px; height: 28px; }
.rec-rh-t { flex: 1; min-width: 0; display: grid; }
.rec-rh-t .k { font-family: var(--f-ui); font-size: 13px; line-height: 1.25; color: var(--orange-deep); word-break: keep-all; }
.rec-rh-t b { font-family: var(--f-ui); font-weight: 400; font-size: 19px; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.rec-rh-n { font-family: var(--f-num); font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.rec-rh-n b { font-weight: 400; font-size: 20px; color: var(--ink); }
.rec-region.done .rec-rh { background: linear-gradient(180deg, #fffdf0, #fff1c2); }

.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.rec-mon {
  position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; padding: 0; text-align: left; color: var(--ink); font: inherit;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); overflow: hidden;
}
button.rec-mon { cursor: pointer; transition: transform .12s; }
button.rec-mon:hover { transform: translateY(-3px); }
button.rec-mon:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
button.rec-mon:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
/* 그림 칸: 지역 색으로 물든 종이 위에 발밑 그림자. 보스는 진하게, 부활한 보스는 보랏빛 */
.rec-mon-art, .rec-mm-art {
  position: relative; height: 132px; border-bottom: 3px solid var(--ink);
  background:
    radial-gradient(ellipse 34% 7% at 50% 91%, rgba(43, 33, 64, .24) 0 55%, transparent 100%),
    radial-gradient(circle at 50% 38%, #fff 0, hsl(var(--hue, 200) 85% 92%) 58%, hsl(var(--hue, 200) 62% 82%) 100%);
}
.rec-mon.boss .rec-mon-art, .rec-mm-art.boss {
  background:
    radial-gradient(ellipse 36% 7% at 50% 91%, rgba(20, 10, 40, .36) 0 55%, transparent 100%),
    radial-gradient(circle at 50% 42%, #fff6d8 0, hsl(var(--hue, 200) 72% 80%) 48%, hsl(var(--hue, 200) 46% 50%) 100%);
}
.rec-mon.boss { box-shadow: 0 5px 0 var(--ink), inset 0 0 0 3px var(--gold); }
.rec-mon.revived .rec-mon-art, .rec-mm-art.revived {
  background:
    radial-gradient(ellipse 36% 7% at 50% 91%, rgba(30, 10, 60, .4) 0 55%, transparent 100%),
    radial-gradient(circle at 50% 42%, #f4eeff 0, #c8b4ff 50%, #6f4fcf 100%);
}
.rec-mon.revived .rec-mon-pic .art-img, .rec-mm-art.revived .rec-mon-pic .art-img { filter: drop-shadow(0 0 4px rgba(170, 130, 255, .95)) drop-shadow(0 0 9px rgba(150, 110, 255, .7)); }
.rec-mon-no { position: absolute; left: 7px; top: 7px; z-index: 2; font-family: var(--f-num); font-size: 13px; line-height: 1; color: var(--ink); background: rgba(255, 255, 255, .9); border: 2px solid var(--ink); border-radius: 8px; padding: 3px 6px 2px; }
.rec-mon-art > .pill, .rec-mm-art > .pill { position: absolute; right: 7px; top: 6px; z-index: 2; }
.pill.rec-floor { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.rec-mon-pic { position: absolute; left: 8px; right: 8px; top: 30px; bottom: 8px; }
.rec-mon-pic > svg { width: 100%; height: 100%; }
.rec-mon-pic .mon-img { position: absolute; inset: 0; }
/* 그림은 늘리지 않고 칸 안에 맞춰 바닥 가운데에 세운다 */
.rec-mon-pic .mon-img .art-img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: auto; height: auto; max-width: 100%; max-height: 100%; margin: 0; }
.rec-mon-info { display: grid; gap: 5px; align-content: start; padding: 8px 10px 11px; min-width: 0; }
.rec-mon-nm { font-family: var(--f-ui); font-weight: 400; font-size: 16.5px; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.rec-mon-ds { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); word-break: keep-all; overflow-wrap: anywhere; }
.rec-mon-info .pill { justify-self: start; margin-top: 2px; }
.rec-mon-pl { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; justify-self: start; margin-top: 2px; } /* 몬스터 레벨 + 처치 횟수 */
.rec-mon-pl .pill { margin-top: 0; }
.rec-mon-pl .lv, .rec-mm-pills .lv { font-size: 13px; padding: 4px 7px; align-self: center; }
/* 아직 못 만난 몬스터: 줄무늬 종이 위의 검은 그림자와 물음표 */
.rec-mon.unknown { background: #f3ecdc; border-style: dashed; box-shadow: none; }
.rec-mon.unknown .rec-mon-art { background: repeating-linear-gradient(45deg, #faf3e3 0 7px, #f2e8d2 7px 14px); border-bottom-style: dashed; }
.rec-mon.unknown .rec-mon-pic .art-img, .rec-mon.unknown .rec-mon-pic > svg { filter: brightness(0); opacity: .3; }
.rec-mon-q { position: absolute; left: 50%; top: 58%; z-index: 2; transform: translate(-50%, -50%); pointer-events: none; font-family: var(--f-num); font-size: 36px; line-height: 1; color: #fff; -webkit-text-stroke: 1.5px var(--ink); text-shadow: 0 3px 0 var(--ink); }
.rec-mon.unknown .rec-mon-nm { color: var(--ink-soft); letter-spacing: 2px; }
.rec-mon.unknown .rec-mon-ds { color: var(--ink-soft); }

/* 몬스터 자세히 보기 창 */
.modal.rec-mm { max-width: 440px; text-align: left; gap: 12px; }
.rec-mm .rec-mm-art { height: clamp(180px, 32vh, 250px); margin: -26px -20px 0; border-radius: 17px 17px 0 0; }
.rec-mm .rec-mon-no { left: 12px; top: 12px; }
.rec-mm .rec-mm-art > .pill { right: 12px; top: 11px; }
.rec-mm .rec-mon-pic { left: 20px; right: 20px; top: 40px; bottom: 14px; }
.rec-mm-body { display: grid; gap: 8px; min-width: 0; }
.rec-mm-where { font-family: var(--f-ui); font-size: 14px; color: var(--orange-deep); }
.modal.rec-mm .rec-mm-name { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.15; letter-spacing: -.3px; word-break: keep-all; overflow-wrap: anywhere; }
.rec-mm-desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); word-break: keep-all; overflow-wrap: anywhere; }
.rec-mm-line {
  position: relative; margin: 8px 0 2px; padding: 10px 12px 11px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px;
  font-family: var(--f-ui); font-size: 15px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere;
}
.rec-mm-line::before { content: ""; position: absolute; left: 22px; top: -9px; width: 14px; height: 14px; background: #fff; border-left: 2.5px solid var(--ink); border-top: 2.5px solid var(--ink); transform: rotate(45deg); }
.rec-mm-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-mm-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 10px; background: var(--paper-2); border: 2px dashed var(--paper-line); border-radius: 12px; font-family: var(--f-ui); font-size: 14.5px; }
.rec-mm-reward .k { width: 100%; font-size: 13px; color: var(--ink-soft); }
.rec-mm-reward .it { display: inline-flex; align-items: center; gap: 6px; min-width: 0; word-break: keep-all; }
.rec-mm-reward .it > svg, .rec-mm-reward .it > .item-pic { width: 30px; height: 30px; flex: none; }
.rec-mm .modal-acts { justify-content: flex-end; }
/* 가로로 눕힌 휴대폰처럼 낮은 화면: 그림을 왼쪽, 설명을 오른쪽에 둔다(창이 화면 높이를 덜 넘게) */
@media (max-height: 560px) and (min-width: 600px) {
  .modal.rec-mm { max-width: 760px; padding-block: 18px 16px; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); column-gap: 18px; row-gap: 10px; }
  .rec-mm .rec-mm-art { grid-row: 1 / span 2; height: auto; min-height: 200px; margin: -18px 0 -16px -20px; border-radius: 17px 0 0 17px; border-bottom: 0; border-right: 3px solid var(--ink); }
  .rec-mm .modal-acts { grid-column: 2; margin-top: 0; }
  .rec-mm-body { gap: 5px; }
  .modal.rec-mm .rec-mm-name { font-size: 24px; }
  .rec-mm-line { margin-top: 6px; padding: 8px 11px 9px; }
  .rec-mm-reward { padding: 6px 10px; }
}

/* ---------- 칭호 탭 ---------- */
.rec-tt-now { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px 8px 12px; background: var(--paper-2); border: 2px solid var(--paper-line); border-radius: 12px; }
.rec-tt-now .k { font-family: var(--f-ui); font-size: 14px; color: var(--ink-soft); }
.rec-tt-now b { flex: 1 1 auto; min-width: 0; font-family: var(--f-ui); font-weight: 400; font-size: 17px; color: var(--violet-deep); word-break: keep-all; overflow-wrap: anywhere; }
.rec-tt-now .btn { min-height: 42px; margin-left: auto; }
.rec-tt-now .btn[disabled] { cursor: default; box-shadow: 0 2px 0 var(--ink); transform: none; }
.rec-ttlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rec-tt {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 66px; min-width: 0;
  padding: 8px 12px 8px 10px; text-align: left; color: var(--ink); font: inherit;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
}
button.rec-tt { cursor: pointer; transition: transform .12s; }
button.rec-tt:hover { transform: translateY(-2px); }
button.rec-tt:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
button.rec-tt:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.rec-tt-medal svg { width: 46px; height: 46px; }
.rec-tt-txt { min-width: 0; display: grid; gap: 2px; }
.rec-tt-txt b { font-family: var(--f-ui); font-weight: 400; font-size: 17px; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; }
.rec-tt-txt small { font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.rec-tt-act { font-family: var(--f-ui); font-size: 14px; padding: 5px 10px 6px; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--mint); color: #fff; text-shadow: 0 1px 0 var(--mint-deep); white-space: nowrap; box-shadow: 0 2px 0 var(--ink); }
.rec-tt.on { background: linear-gradient(180deg, #fffdf2, #fff1c2); box-shadow: 0 0 0 3px var(--gold), 0 4px 0 var(--ink); }
.rec-tt.on .rec-tt-act { background: var(--ok-bg); color: #0f6a3a; border-color: var(--ok); text-shadow: none; box-shadow: none; }
.rec-tt.locked { background: repeating-linear-gradient(45deg, #faf3e3 0 6px, #f2e8d2 6px 12px); border-style: dashed; box-shadow: none; }
.rec-tt.locked .rec-tt-txt b { color: var(--ink-soft); letter-spacing: 2px; }

/* ---------- 넓은 화면: 숫자 칸을 주인공 카드 높이에 맞춰 키우고, 몬스터 카드도 키운다 ---------- */
@media (min-width: 761px) {
  .rec-top { align-items: stretch; }
  .rec-tiles { grid-auto-rows: 1fr; }
  .rec-tile { grid-template-columns: 42px minmax(0, 1fr); align-content: center; column-gap: 12px; padding: 10px 14px; }
  .rec-tile-ic { width: 42px; height: 42px; }
  .rec-tile-ic svg { width: 40px; height: 40px; }
  .rec-tile-k { font-size: 14.5px; }
  .rec-tile-v { font-size: 31px; }
  .rec-tile-v small { font-size: 17px; }
  /* 숫자는 칸 폭에 맞춰 조금 줄어들 수 있다(칸이 좁을 때 숫자가 칸 밖으로 나가지 않게) */
  .rec-tile:not(.rec-shards) { container-type: inline-size; }
  .rec-tile:not(.rec-shards) .rec-tile-v { font-size: clamp(20px, 17cqi, 31px); }
  .rec-strip { gap: 6px; }
  .rec-strip .shard-img { max-width: 26px; }
  .rec-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
  .rec-mon-art { height: 150px; }
}
/* 태블릿 세로처럼 오른쪽 칸이 좁으면 숫자 칸을 두 줄로 */
@media (min-width: 761px) and (max-width: 959px) {
  .rec-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ---------- 휴대폰 ---------- */
@media (max-width: 760px) {
  .rec-wrap { gap: 12px; padding-block: 12px 32px; }
  .rec-top { grid-template-columns: minmax(0, 1fr); }
  /* 주인공 카드를 가로로: 왼쪽에 작은 무대, 오른쪽에 이름·칭호·경험치 */
  .records-screen .rec-hero.char-card { display: grid; grid-template-columns: 124px minmax(0, 1fr); }
  .records-screen .rec-hero.char-card .stagebox { height: auto; min-height: 178px; border-bottom: 0; border-right: 3px solid var(--ink); }
  .rec-id { align-content: center; padding: 10px 12px 12px; }
  .rec-nm { font-size: 20px; }
  .rec-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-strip { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
  .rec-chlist, .rec-dglist, .rec-ttlist { grid-template-columns: minmax(0, 1fr); }
  .rec-sec-hd h2 { font-size: 22px; }
  /* 바로 가기: 윗줄 챕터 1~7, 아랫줄 던전·챕터 8~12·탑(360px 화면에서도 단추 폭이 40px 넘게 양옆 여백을 조금 쓴다) */
  .rec-jump { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-inline: -6px; }
  .rec-jump-btn { min-width: 0; width: 100%; padding: 0; }
}
@media (max-width: 380px) {
  .rec-tab { font-size: 16px; padding: 6px 8px; gap: 5px; }
  .rec-tile { padding: 9px 10px; column-gap: 8px; }
}
@media (max-width: 340px) { .rec-tab svg { display: none; } }
