:root {
  --deep: #09243d;
  --blue: #183c59;
  --gold: #e8c878;
  --paper: #f4f0e7;
  --ink: #183348;
  --muted: #74808a;
  --line: #e0e5e8;
  --radius: 14px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #f3f5f6;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 15px;
  background: white;
  color: var(--ink);
  font-weight: 600;
}
button:hover {
  border-color: #5c7c93;
  background: #edf2f5;
}
button.primary {
  background: var(--deep);
  color: white;
  border-color: var(--deep);
}
button.gold {
  background: var(--gold);
  color: var(--deep);
  border-color: var(--gold);
}
button.danger {
  color: #a63636;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd9e0;
  border-radius: 8px;
  padding: 10px;
  background: white;
  color: var(--ink);
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--deep);
}
input[type="color"] {
  padding: 3px;
  height: 40px;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--blue);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: #536674;
  margin-bottom: 14px;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 6px;
}
small,
.muted {
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #7792a5;
  font-size: 10px;
  font-weight: 750;
  margin-bottom: 12px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: var(--deep);
  color: #c3d1db;
  display: flex;
  flex-direction: column;
  padding: 32px 18px;
  z-index: 5;
}
.brand {
  padding: 0 14px 28px;
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: bold;
}
.brand span {
  display: block;
  font: 10px system-ui;
  letter-spacing: 3px;
  color: var(--gold);
  margin-top: 7px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav button {
  text-align: left;
  background: none;
  border: 0;
  color: #adbfcc;
  padding: 13px 14px;
  font-size: 13px;
}
.sidebar nav button.active {
  background: #21405a;
  color: var(--gold);
}
.sidebar nav button:hover {
  background: #183c59;
}
.navicon {
  display: inline-block;
  width: 27px;
  font-size: 16px;
}
.account {
  margin-top: auto;
  border-top: 1px solid #294257;
  padding: 22px 12px 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.account button {
  margin-top: 12px;
  background: transparent;
  color: #aec1cf;
  border-color: #304b60;
  font-size: 11px;
  padding: 7px 12px;
}
.main {
  margin-left: 232px;
  padding: 36px 40px;
  max-width: 1920px;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.stat,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.stat span {
  font-size: 12px;
  color: #657580;
}
.stat b {
  display: block;
  font-size: 32px;
  letter-spacing: -1px;
  margin-top: 15px;
}
.stat:first-child {
  background: var(--deep);
  color: var(--paper);
}
.stat:first-child span {
  color: #bdd0dc;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.listrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.listrow:last-child {
  border: 0;
}
.listrow a {
  text-decoration: none;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 5px 8px;
  background: #eef2f4;
  border-radius: 6px;
  color: #63737f;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.badge.published {
  background: #e4f2e8;
  color: #277043;
}
.badge.draft {
  background: #fff4d6;
  color: #886211;
}
.badge.legendary {
  background: #fcf0c7;
  color: #9b720d;
}
.badge.epic {
  background: #f0e5fb;
  color: #7a46a0;
}
.badge.rare {
  background: #e2effb;
  color: #356c9e;
}
.filters {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  align-items: center;
  flex-wrap: wrap;
}
.filters input {
  flex: 2;
  min-width: 180px;
}
.filters select {
  flex: 1;
  min-width: 140px;
}
.tablewrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  background: #f8fafb;
  color: #768590;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 12px;
  white-space: nowrap;
}
td {
  padding: 12px;
  border-top: 1px solid #edf0f2;
}
td button {
  padding: 6px 9px;
  font-size: 11px;
}
.thumb {
  width: 35px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #e6eaed;
}
.series-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 18px;
}
.series-cover {
  height: 132px;
  background: linear-gradient(135deg, #183c59, #56798d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e8c878;
  font-family: Georgia, serif;
  font-size: 36px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.series-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-item {
  padding: 10px;
  text-align: left;
  overflow: hidden;
}
.media-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
.media-item b {
  display: block;
  margin: 10px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at top right, #345872, var(--deep) 60%);
  padding: 24px;
}
.loginbox {
  background: var(--paper);
  padding: 42px;
  width: min(440px, 100%);
  border-radius: 18px;
  box-shadow: 0 30px 90px #0003;
}
.loginbox .brand {
  color: var(--deep);
  padding: 0 0 30px;
}
.loginbox .brand span {
  color: #8d7537;
}
.loginbox button {
  width: 100%;
}
.formerror {
  color: #ac3939;
  min-height: 20px;
  font-size: 12px;
}
.modal-shade {
  position: fixed;
  inset: 0;
  background: #06192dbb;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}
.modal {
  background: #fff;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 25px 90px #0004;
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modalhead h2 {
  margin: 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.fields .wide {
  grid-column: 1/-1;
}
.notice {
  background: #fff6dd;
  border: 1px solid #ecdca7;
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.upload {
  border: 2px dashed #b9c9d4;
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  background: #f8fafb;
}
.upload.over {
  border-color: #c4a453;
  background: #fff8e5;
}
.upload input {
  border: 0;
  background: none;
}
.designer-main {
  padding: 26px 24px;
}
.designer {
  display: grid;
  grid-template-columns: 188px minmax(300px, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.toolbox,
.properties {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.toolbox h3,
.properties h3 {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: #738795;
}
.toolbox button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  font-size: 12px;
  text-align: left;
}
.toolbox button.active {
  border-color: var(--gold);
  background: #fff9e9;
}
.toolcontent {
  padding-top: 14px;
}
.toolcontent img {
  width: 100%;
  height: 75px;
  object-fit: cover;
  border-radius: 5px;
}
.toolmedia {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  max-height: 330px;
  overflow: auto;
}
.toolmedia button {
  padding: 3px;
  margin: 0;
}
.canvas-space {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 16px 16px 28px;
  min-height: 710px;
  background-color: #e7ecef;
  background-image: radial-gradient(#aab9c5 0.6px, transparent 0.6px);
  background-size: 15px 15px;
  border-radius: 12px;
  border: 1px solid #d6dfe5;
  overflow: auto;
}
.previewtools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.previewtools button {
  padding: 7px 9px;
  font-size: 11px;
}
.card-holder {
  width: 315px;
  flex-shrink: 0;
  transform-origin: top center;
  margin-bottom: 20px;
}
.card {
  position: relative;
  width: 315px;
  height: 440px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--deep);
  box-shadow: 0 14px 30px #09243d33;
  color: #f4f0e7;
  isolation: isolate;
  touch-action: none;
  user-select: none;
}
.card-image-mask {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.card-motif {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  pointer-events: none;
}
.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 35%, #09243d55 58%, #09243df7 100%);
}
.card-frame {
  position: absolute;
  inset: 9px;
  border: 3px solid #abb4bd;
  border-radius: 12px;
  pointer-events: none;
  z-index: 3;
}
.card-decoration {
  position: absolute;
  inset: 18px;
  border: 1px solid #ffffff44;
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}
.card-top {
  position: absolute;
  top: 27px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 5px #000;
  z-index: 4;
}
.card-bottom {
  position: absolute;
  bottom: 34px;
  left: 28px;
  right: 28px;
  z-index: 4;
}
.card-title {
  font:
    700 27px Georgia,
    serif;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  line-height: 1.1;
}
.card-series {
  font-size: 8px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.card-symbol {
  font-size: 18px;
  line-height: 1;
}
.card-holo {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    transparent 10%,
    #fd746c40 25%,
    #93f9b945 42%,
    #70e1f543 58%,
    #b499ff45 75%,
    transparent 90%
  );
  mix-blend-mode: screen;
  animation: holo 5s ease-in-out infinite alternate;
}
.card-shine {
  position: absolute;
  inset: -100%;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 43%,
    #ffffff55 50%,
    transparent 57%
  );
  animation: shine 4s ease-in-out infinite;
}
.paused .card-holo,
.paused .card-shine {
  animation: none;
}
.card-back {
  position: absolute;
  inset: 24px;
  border: 1px solid #e8c87899;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--gold);
  font:
    700 27px Georgia,
    serif;
  letter-spacing: 1px;
}
.card-back span {
  font-size: 65px;
  margin-bottom: 25px;
}
.guides:after {
  content: "";
  position: absolute;
  inset: 23px;
  border: 1px dashed #ff7878;
  pointer-events: none;
  z-index: 10;
}
.guides:before {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  border-top: 1px dashed #fff7;
  z-index: 10;
  pointer-events: none;
}
.canvas-caption {
  text-align: center;
  color: #758897;
  font-size: 10px;
  line-height: 1.8;
}
.properties label {
  margin-bottom: 12px;
}
.properties input,
.properties select {
  padding: 8px;
  font-size: 12px;
}
.properties textarea {
  min-height: 65px;
  font-size: 12px;
}
.properties .divider {
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.rangeval {
  float: right;
  font-weight: 400;
}
.save-status {
  font-size: 11px;
  color: #718697;
}
.mobile-menu {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 450px;
  background: var(--deep);
  color: white;
  border-radius: 10px;
  padding: 16px 22px;
  z-index: 60;
  box-shadow: 0 8px 25px #0003;
  display: none;
}
#toast.error {
  background: #8e3131;
}
.loading {
  padding: 50px;
}
.small {
  font-size: 11px;
}
.timeline {
  font-size: 12px;
}
.timeline pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f6f8;
  padding: 12px;
  border-radius: 8px;
}
.dirty {
  color: #ac7013;
}
@keyframes holo {
  from {
    opacity: 0.35;
    filter: hue-rotate(0);
  }
  to {
    opacity: 0.85;
    filter: hue-rotate(50deg);
  }
}
@keyframes shine {
  from {
    transform: translateX(-45%);
  }
  to {
    transform: translateX(45%);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
  }
}
@media (min-width: 1600px) {
  .designer {
    grid-template-columns: 220px minmax(400px, 1fr) 320px;
  }
  .canvas-space {
    min-height: 800px;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 195px;
    padding: 25px 12px;
  }
  .main {
    margin-left: 195px;
    padding: 25px;
  }
  .designer {
    grid-template-columns: 150px minmax(280px, 1fr);
  }
  .properties {
    grid-column: 1/-1;
    display: block;
  }
  .properties form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 16px;
  }
  .properties .divider {
    grid-column: 1/-1;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: relative;
    width: 100%;
    padding: 16px;
  }
  .brand {
    padding: 0 10px 15px;
    font-size: 23px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 3px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 10px;
  }
  .sidebar .account {
    display: none;
  }
  .main {
    margin: 0;
    padding: 22px 16px;
  }
  .topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  h1 {
    font-size: 26px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .designer {
    grid-template-columns: 1fr;
  }
  .toolbox {
    order: 2;
  }
  .canvas-space {
    min-height: 580px;
    order: 1;
  }
  .properties {
    order: 3;
  }
  .toolbox > div:first-of-type {
    display: flex;
    flex-wrap: wrap;
  }
  .toolbox button {
    width: auto;
  }
  .properties form {
    grid-template-columns: 1fr 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .modal-shade {
    padding: 10px;
  }
  .modal {
    padding: 20px;
  }
  .card-holder {
    max-width: none;
  }
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
