:root {
  --ink: #102247;
  --muted: #65718a;
  --line: #d4e1f1;
  --panel: #f7fbff;
  --surface: #ffffff;
  --blue: #1269e8;
  --blue-deep: #073a9a;
  --cyan: #1db7e8;
  --yellow: #ffd337;
  --green: #25b86f;
  --red: #f04b35;
  --shadow: 0 18px 42px rgba(10, 31, 73, 0.18);
  color-scheme: light;
  font-family: "Segoe UI", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(35, 193, 239, 0.5), transparent 26%),
    linear-gradient(135deg, rgba(9, 74, 182, 0.96), rgba(7, 58, 154, 0.92) 48%, rgba(17, 152, 210, 0.9)),
    #0b4db8;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 34px, rgba(255, 255, 255, 0.02) 34px 68px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  max-width: 1640px;
  margin: 0 auto 12px;
}

.eyebrow {
  margin: 0 0 3px;
  color: #cdefff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(5, 26, 76, 0.38);
}

.db-meta {
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.filters {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) repeat(6, minmax(110px, 1fr));
  gap: 9px;
  max-width: 1640px;
  margin: 0 auto 12px;
  padding: 10px;
  background: rgba(239, 248, 255, 0.94);
  border: 1px solid rgba(185, 221, 255, 0.82);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 31, 73, 0.08);
}

label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 40px;
  color: var(--ink);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  outline: none;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 105, 232, 0.16);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 1640px;
  margin: 0 auto;
}

.album-panel,
.detail {
  border: 1px solid rgba(212, 225, 241, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.album-panel {
  position: sticky;
  top: 12px;
  overflow: hidden;
  background: #ffffff;
}

.album-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.album-head div {
  display: grid;
  gap: 2px;
}

.album-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  min-width: 82px;
  color: #073a9a;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 4px 5px 4px 11px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.toggle-button[aria-pressed="true"] {
  color: #073a9a;
  background: #ffd337;
  border-color: #fff2a6;
  box-shadow: 0 3px 10px rgba(5, 26, 76, 0.28);
}

.toggle-track {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  background: #adc6e5;
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(10, 31, 73, 0.22);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(10, 31, 73, 0.3);
  transition: transform 0.18s ease;
}

.toggle-button[aria-pressed="true"] .toggle-track {
  background: #073a9a;
}

.toggle-button[aria-pressed="true"] .toggle-thumb {
  transform: translateX(16px);
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: calc(100vh - 200px);
  overflow: auto;
  padding: 10px;
  background: #ffffff;
}

button.album-card {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  min-height: 84px;
  text-align: left;
  background-color: #dff3ff;
  background-image: linear-gradient(180deg, #f8fdff 0%, #d8f0ff 100%);
  background-clip: padding-box;
  border: 1px solid #86bde8;
  border-radius: 8px;
  padding: 6px;
  overflow: hidden;
  cursor: pointer;
}

.album-card:hover,
.album-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(18, 105, 232, 0.14);
}

.album-card.is-npc {
  background-color: #dff3ff;
  background-image: linear-gradient(180deg, #f8fdff 0%, #d8f0ff 100%);
  border-color: #86bde8;
}

.album-card.is-npc.is-active,
.album-card.is-npc:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(18, 105, 232, 0.14);
}

.portrait-frame {
  display: grid;
  place-items: center;
  width: 50px;
  height: 60px;
  align-self: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #1ca8e4, #0a4dbc);
  border: 2px solid #0b3f9e;
  border-radius: 7px;
  font-weight: 900;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card-body {
  display: grid;
  grid-template-rows: 22px 26px;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.album-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 21px;
  padding-bottom: 1px;
}

.album-card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  min-width: 0;
}

.skill-name strong {
  overflow-wrap: anywhere;
}

.album-card-team {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-team.team-logo {
  display: inline-grid;
  width: 18px;
  height: 20px;
  flex: 0 0 18px;
  place-items: center start;
  overflow: visible;
}

.team-logo img {
  display: block;
  width: auto;
  max-width: 18px;
  height: auto;
  max-height: 20px;
  object-fit: contain;
}

.mini-meta,
.identity-strip,
.tag-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mini-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
  min-width: 0;
  overflow: hidden;
}

.card-badges,
.card-stars {
  display: inline-flex;
  align-items: center;
}

.card-badges {
  gap: 3px;
  flex: 0 0 auto;
}

.card-stars {
  justify-content: start;
  width: 42px;
  min-width: 0;
  overflow: hidden;
}

.detail {
  min-height: 800px;
  overflow: hidden;
  background: var(--surface);
}

.game-view {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(420px, 1fr);
  min-height: 900px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(17, 83, 215, 0.96) 0 34%, rgba(45, 178, 236, 0.7) 36%, rgba(223, 244, 255, 0.42) 100%),
    linear-gradient(180deg, #d9eef8 0 28%, #8cd9ee 29% 31%, #d5edf6 32% 100%);
}

.game-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 34%),
    repeating-linear-gradient(90deg, rgba(9, 62, 149, 0.12) 0 36px, rgba(255, 255, 255, 0.08) 36px 72px);
  opacity: 0.5;
  pointer-events: none;
}

.bolt {
  position: absolute;
  z-index: 1;
  background: rgba(18, 105, 232, 0.62);
  clip-path: polygon(0 0, 34% 28%, 21% 0, 100% 58%, 58% 52%, 72% 100%, 0 28%);
  pointer-events: none;
}

.bolt-one {
  top: 8px;
  left: -28px;
  width: 620px;
  height: 140px;
}

.bolt-two {
  right: 16%;
  bottom: 72px;
  width: 420px;
  height: 110px;
  opacity: 0.32;
}

.player-side,
.model-side {
  position: relative;
  z-index: 2;
}

.player-side {
  display: grid;
  align-content: start;
  padding: 22px 18px 18px 26px;
}

.screen-label {
  justify-self: start;
  min-height: 38px;
  margin-left: -26px;
  margin-bottom: 12px;
  padding: 7px 16px 7px 32px;
  color: #fff;
  background: #f0c512;
  border-radius: 0 6px 6px 0;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 2px 1px rgba(11, 46, 105, 0.5);
}

.card-title {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 3px rgba(5, 26, 76, 0.56);
}

.player-side h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 46px;
  line-height: 1.02;
  text-shadow:
    0 3px 0 #14356c,
    2px 0 0 #14356c,
    -2px 0 0 #14356c,
    0 0 8px rgba(5, 26, 76, 0.34);
}

.identity-strip {
  margin-bottom: 10px;
}

.tag-icons {
  margin-bottom: 12px;
}

.tag-chip {
  display: inline-grid;
  place-items: center;
  width: 43px;
  height: 43px;
  overflow: hidden;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 950;
}

.tag-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tag-chip > span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: #0c4eb8;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
}

.element-badge,
.position-badge,
.stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  font-weight: 950;
}

.element-badge {
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.element-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1daeea;
  border: 2px solid #0a3f98;
  border-radius: 4px;
}

.element-initial {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: #0a2e71;
  border-radius: 7px;
}

.position-badge {
  min-width: 0;
  padding: 0;
  color: #fff;
  border: 0;
  border-radius: 0;
  font-size: 0;
  line-height: 1;
  text-shadow: none;
}

.position-badge img {
  display: block;
  width: 72px;
  height: 32px;
  object-fit: contain;
}

.position-unknown {
  min-width: 56px;
  padding: 4px 10px;
  background: #0b4db8;
  border: 2px solid #0a2e71;
  border-radius: 8px;
  font-size: 18px;
}

.stars {
  gap: 1px;
  padding: 2px 4px;
}

.stars img {
  display: block;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 1px rgba(10, 36, 84, 0.38));
}

.mini-meta .element-icon {
  width: 20px;
  height: 20px;
  border-width: 1px;
  border-radius: 3px;
}

.mini-meta .position-badge {
  min-height: 23px;
}

.mini-meta .position-badge img {
  width: 31px;
  height: 20px;
}

.mini-meta .stars img {
  width: 11px;
  height: 11px;
}

.mini-meta .stars {
  min-height: 24px;
  gap: 0;
  justify-content: flex-start;
  padding: 0;
  white-space: nowrap;
}

.non-playable-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: #6b4200;
  background: #ffe4a3;
  border: 1px solid #f2c76d;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 2px 4px rgba(92, 58, 0, 0.14);
}

.character-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
  align-items: start;
  max-width: 380px;
  margin-bottom: 14px;
}

.stats-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stat-line {
  display: grid;
  grid-template-columns: 34px minmax(88px, 1fr) minmax(62px, auto);
  gap: 8px;
  align-items: center;
  min-height: 36px;
}

.stat-line img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px rgba(7, 31, 76, 0.42));
}

.stat-line span {
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  text-shadow:
    0 2px 0 #17396f,
    1px 0 0 #17396f,
    -1px 0 0 #17396f;
}

.stat-line strong,
.power-readout strong,
.level-readout {
  color: #fff;
  font-family: "Arial Black", "Segoe UI Black", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 3px 0 #7a8497,
    2px 0 0 #7a8497,
    -2px 0 0 #7a8497,
    0 0 8px rgba(25, 53, 93, 0.34);
}

.stat-line strong {
  justify-self: end;
  font-size: 23px;
}

.field-zone {
  display: grid;
  gap: 7px;
  justify-items: center;
  width: 130px;
}

.field-zone > span {
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 2px 0 #17396f;
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(4, 23px);
  grid-template-rows: repeat(5, 21px);
  gap: 3px;
  padding: 7px;
  background: #0e64c8;
  border: 3px solid #0d55aa;
  border-radius: 9px;
}

.zone-cell {
  display: grid;
  place-items: center;
  color: #0b326e;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 950;
}

.rank-s {
  background: #ffd337;
}

.rank-a {
  background: #9be335;
}

.rank-b {
  background: #21bc73;
}

.rank-empty {
  background: rgba(255, 255, 255, 0.16);
}

.skills-panel {
  display: grid;
  gap: 8px;
  max-width: 368px;
}

.skill-card {
  display: grid;
  grid-template-columns: 54px 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 5px 10px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #17396f;
  border-radius: 12px;
  cursor: pointer;
}

.skill-card:hover {
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(7, 58, 154, 0.18);
}

.skill-card.skill-move {
  position: relative;
  display: block;
  min-height: 76px;
  padding: 16px 0 0 18px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.skill-card.skill-move:hover {
  background: transparent;
  box-shadow: none;
}

.skill-level {
  align-self: start;
  color: #17396f;
  font-size: 18px;
  font-weight: 950;
}

.skill-card.skill-move .skill-level {
  position: absolute;
  top: -1px;
  left: 0;
  z-index: 3;
  color: #17396f;
  line-height: 1;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff;
}

.move-type-icon,
.passive-mark {
  width: 32px;
  height: 32px;
}

.move-type-icon {
  object-fit: contain;
}

.passive-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 950;
}

.skill-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.skill-name strong {
  font-size: 17px;
}

.skill-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.awakening-passive-card {
  grid-template-columns: 48px 32px minmax(0, 1fr);
  min-height: 62px;
  padding: 6px 10px;
}

.awakening-passive-card .skill-level {
  align-self: center;
}

.awakening-passive-card .skill-name small {
  display: block;
  overflow: hidden;
  color: #203151;
  text-transform: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.awakening-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 12px 3px 10px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  font-size: 12px;
  font-style: italic;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(8, 28, 73, 0.85);
  white-space: nowrap;
}

.awakening-tier-advanced {
  background: linear-gradient(90deg, #6821cf, #9d32ff);
}

.awakening-tier-advanced-plus {
  background: linear-gradient(90deg, #7c20dd, #5b19b8);
}

.awakening-tier-top {
  color: #fff7a0;
  background: linear-gradient(90deg, #f3d717, #ffe953);
}

.awakening-tier-top-plus {
  background: linear-gradient(90deg, #c98204, #f3b00c);
}

.awakening-tier-legendary {
  background: linear-gradient(90deg, #ff7d00, #ff3d00);
}

.awakening-tier-legendary-plus {
  background: linear-gradient(90deg, #ffb13b, #ff57c7, #35cfff, #21d29c);
}

.awakening-tier-unknown {
  background: linear-gradient(90deg, #52637b, #25364f);
}

.skill-frame {
  position: relative;
  display: block;
  overflow: visible;
  min-height: 56px;
  margin-left: 2px;
  background: #ffffff;
  border: 2px solid #17396f;
  border-radius: 3px 15px 3px 3px;
  box-shadow: 0 2px 0 #0a264f;
}

.skill-title-line {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 12px 2px 42px;
  gap: 4px;
  color: #142345;
  background: linear-gradient(180deg, #ffffff 0%, #f6f3ec 100%);
  border-radius: 1px 13px 0 0;
}

.skill-title-line strong {
  min-width: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-element-icon,
.skill-element-icon .element-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.skill-info-line {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 82px;
  align-items: center;
  min-height: 30px;
  background: #e9972c;
  border-top: 1px solid #d37a1d;
  border-radius: 0 0 1px 1px;
}

.skill-type-badge {
  position: absolute;
  left: -13px;
  bottom: -10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}

.skill-type-badge .move-type-icon {
  width: 48px;
  height: 48px;
}

.skill-tp {
  grid-column: 2;
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #9df144;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 0 #17396f;
}

.skill-tp strong {
  color: #17396f;
  font-weight: 950;
  text-shadow:
    -1px -1px 0 #ffffff,
    1px -1px 0 #ffffff,
    -1px 1px 0 #ffffff,
    1px 1px 0 #ffffff;
}

.skill-green-bar {
  display: block;
  height: 5px;
  overflow: hidden;
  background: #17396f;
  border: 1px solid #17396f;
}

.skill-green-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: #83e247;
}

.skill-power {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding-right: 8px;
  color: #ffffff;
}

.skill-power img {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.skill-power strong {
  font-size: 31px;
  font-weight: 950;
  line-height: 0.9;
  text-shadow: 0 2px 0 rgba(112, 69, 17, 0.45);
}

.passive-frame,
.passive-info-line,
.passive-type-badge,
.skill-passive-summary {
  display: contents;
}

.skill-detail {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #eef4fa;
  border-top: 1px solid var(--line);
}

.skill-detail p {
  margin: 0;
  color: #203151;
  line-height: 1.45;
}

.skill-detail ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-detail li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.skill-detail li strong {
  color: var(--blue-deep);
}

.skill-detail li.awakening-level-detail {
  grid-template-columns: 54px minmax(0, 1fr);
}

.skill-detail li.awakening-level-detail span {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.skill-detail li.awakening-level-detail .awakening-tier {
  width: fit-content;
}

.skill-level-description {
  display: block;
}

.skill-modal[hidden] {
  display: none;
}

.skill-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 20, 50, 0.55);
}

body.modal-open {
  overflow: hidden;
}

.skill-modal-window {
  position: relative;
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  color: var(--ink);
  background: #ffffff;
  border: 3px solid #17396f;
  border-radius: 12px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: #17396f;
  border: 0;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.modal-skill-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 18px 58px 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, #0c4eb8, #1db7e8);
}

.modal-skill-head p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-skill-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.modal-current-level {
  align-self: center;
  color: #fff;
  background: rgba(10, 39, 96, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 4px 10px;
  text-shadow: none;
}

.modal-skill-detail {
  padding: 16px;
  border-top: 0;
}

.modal-skill-detail li strong {
  color: #17396f;
}

.model-side {
  display: grid;
  align-content: start;
  justify-items: center;
  min-width: 0;
  padding: 24px 28px 64px 0;
}

.model-art {
  display: grid;
  place-items: center;
  width: min(520px, 100%);
  height: clamp(330px, 46vh, 470px);
}

.fullbody {
  display: block;
  width: auto;
  height: clamp(300px, 46vh, 430px);
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 2px rgba(20, 45, 88, 0.3));
}

.portrait-large {
  width: 280px;
  height: 340px;
  object-fit: cover;
  border-radius: 12px;
}

.model-fallback {
  display: grid;
  place-items: center;
  width: 240px;
  height: 300px;
  color: #fff;
  background: #0d55aa;
  border-radius: 12px;
  font-size: 54px;
  font-weight: 950;
}

.power-readout {
  justify-self: end;
  margin: 4px 24px 0 0;
  text-align: right;
}

.power-readout span {
  display: block;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  text-shadow: 0 2px 0 #7a8497;
}

.power-readout strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.level-readout {
  justify-self: end;
  margin: 0 22px 6px 0;
  font-size: 86px;
  line-height: 0.95;
}

.awakening-ribbon {
  justify-self: stretch;
  min-height: 64px;
  margin-left: 38px;
  padding: 13px 28px;
  color: #fff;
  background: linear-gradient(90deg, #ffc928, #ff7aaa 34%, #43d8ff 68%, #1fd3a0);
  clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%);
  font-size: 28px;
  font-style: italic;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 2px 2px rgba(25, 53, 93, 0.42);
}

.equipment-chip {
  justify-self: end;
  margin: 10px 24px 0 0;
  padding: 6px 12px;
  color: #0b326e;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.empty-state,
.empty-line {
  color: var(--muted);
}

.empty-state {
  padding: 36px;
  text-align: center;
}

.empty-state h2 {
  color: var(--ink);
}

@media (max-width: 1320px) {
  .filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .workspace {
    grid-template-columns: 340px minmax(0, 1fr);
  }

  .player-grid {
    grid-template-columns: 1fr;
  }

  .game-view {
    grid-template-columns: 390px minmax(0, 1fr);
  }

  .player-side h2 {
    font-size: 38px;
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .album-panel {
    position: static;
  }

  .player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 330px;
  }

  .game-view {
    grid-template-columns: 1fr;
  }

  .player-side {
    padding-right: 18px;
  }

  .model-side {
    padding: 10px 18px 48px;
  }

  .model-art {
    height: 520px;
  }

  .fullbody {
    height: 520px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    display: grid;
    align-items: start;
  }

  .db-meta {
    text-align: left;
  }

  h1 {
    font-size: 28px;
  }

  .filters,
  .player-grid {
    grid-template-columns: 1fr;
  }

  .game-view {
    min-height: 0;
  }

  .screen-label {
    font-size: 17px;
  }

  .player-side h2 {
    font-size: 34px;
  }

  .field-zone {
    margin-left: 0;
  }

  .skills-panel,
  .stats-block {
    max-width: none;
  }

  .character-info-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .field-zone {
    justify-self: start;
  }

  .stat-line {
    grid-template-columns: 36px minmax(90px, 1fr) minmax(70px, auto);
  }

  .stat-line span {
    font-size: 19px;
  }

  .stat-line strong {
    font-size: 22px;
  }

  .skill-card {
    grid-template-columns: 48px 30px minmax(0, 1fr);
  }

  .awakening-passive-card {
    grid-template-columns: 48px 30px minmax(0, 1fr);
  }

  .model-art {
    height: 430px;
  }

  .fullbody {
    height: 430px;
  }

  .level-readout {
    justify-self: center;
    margin-right: 0;
    font-size: 70px;
  }

  .power-readout,
  .equipment-chip {
    justify-self: center;
    margin-right: 0;
    text-align: center;
  }

  .awakening-ribbon {
    margin-left: 0;
    clip-path: none;
    border-radius: 8px;
    font-size: 22px;
  }
}
