@font-face {
  font-family: "ConanRegular";
  src: url("./assets/CrushYourEnemies_REGULAR.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "ConanBold";
  src: url("./assets/CrushYourEnemies_BOLD.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

:root {
  --bg-dark: #181512;
  --panel-dark: #221d19;
  --parchment: #eee4cf;
  --parchment-2: #e8ddc6;
  --ink: #2f241c;
  --accent: #7f120d;
  --accent-dark: #4f0c08;
  --line: rgba(73, 52, 34, 0.28);
  --field-fill: rgba(234, 239, 252, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #110f0d 0%, #1e1916 100%);
  color: #f4efe7;
}

.app-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.editor-panel {
  background: #161210;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  overflow-y: auto;
}

.editor-panel h1 {
  margin: 0 0 6px 0;
  color: #d4b27a;
  font-size: 30px;
}

.subtitle {
  margin: 0 0 20px 0;
  color: #c9b89d;
  font-size: 14px;
}

.form-section {
  margin-bottom: 18px;
  padding: 14px;
  background: #211a16;
  border: 1px solid rgba(212, 178, 122, 0.16);
  border-radius: 10px;
}

.form-section h2 {
  margin: 0 0 12px 0;
  color: #d9be8f;
  font-size: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #e7dac4;
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #5a4838;
  border-radius: 6px;
  background: #f5efe5;
  color: #201913;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.attribute-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

button {
  appearance: none;
  border: 1px solid #a06c4d;
  background: linear-gradient(180deg, #9f2a20 0%, #6e140e 100%);
  color: #fff4e6;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.sheet-wrap {
  overflow: auto;
  padding: 24px;
}

.character-sheet {
  width: 1200px;
  min-height: 1600px;
  margin: 0 auto;
  padding: 22px;
  background:
    linear-gradient(rgba(246, 239, 225, 0.95), rgba(236, 226, 205, 0.95)),
    radial-gradient(circle at top left, rgba(145, 116, 75, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(102, 67, 41, 0.08), transparent 30%);
  color: var(--ink);
  border: 18px solid #d8ccb5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.sheet-header {
  margin-bottom: 28px;
}

.logo-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.logo-title {
  font-family: "ConanBold", serif;
  font-size: 60px;
  line-height: 0.78;
  letter-spacing: 2px;
  color: #c10d06;
  margin: 0;
  text-shadow:
    -3px -3px 0 #351a10,
     3px -3px 0 #351a10,
    -3px  3px 0 #351a10,
     3px  3px 0 #351a10,
     0    0   10px rgba(255, 153, 0, 0.2);
}

.logo-subtitle {
  font-family: "ConanRegular", serif;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 1px;
  font-size: 18px;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
  transform: translateY(6px);
  text-align: center;
}

.top-info-grid {
  display: grid;
  grid-template-columns: 2.2fr 2.2fr 1.6fr;
  gap: 14px;
  align-items: start;
}

.field-row,
.quote-row,
.panel,
.combat-box,
.conditions-box,
.damage-box {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.field-row {
  min-height: 58px;
}

.field-label {
  display: block;
  font-family: "ConanRegular", serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-value {
  display: block;
  min-height: 24px;
  padding: 4px 8px;
  background: var(--field-fill);
  border: 1px solid rgba(75, 60, 48, 0.18);
}

.combat-box h3,
.conditions-box h3,
.damage-box h3,
.panel h3 {
  font-family: "ConanRegular", serif;
  margin: 0 0 10px 0;
  color: var(--accent-dark);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mini-grid,
.stat-grid {
  display: grid;
  gap: 6px;
}

.mini-grid {
  grid-template-columns: repeat(2, 1fr);
}

.quote-row {
  margin-top: 14px;
}

.sheet-columns {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.left-column,
.right-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.stat-grid {
  grid-template-columns: repeat(3, 1fr);
}

.list-box {
  min-height: 90px;
  padding: 8px 10px;
  background: rgba(244, 248, 255, 0.45);
  border: 1px solid rgba(75, 60, 48, 0.18);
  line-height: 1.5;
  white-space: pre-line;
}

.tall-panel .list-box {
  min-height: 680px;
}

@media print {
  html,
  body {
    width: 8.5in;
    height: 11in;
    margin: 0;
    padding: 0;
    background: white;
  }

  .no-print {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .sheet-wrap {
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  .character-sheet {
    width: 7.6in;
    min-height: 10in;
    margin: 0.3in auto;
    padding: 0.15in;

    transform: scale(0.92);
    transform-origin: top center;

    border: 1px solid #d8ccb5;
    box-shadow: none;

    page-break-inside: avoid;
    break-inside: avoid;
  }

  .sheet-columns {
    gap: 0.12in;
  }

  .left-column,
  .right-column {
    gap: 0.12in;
  }

  .panel,
  .field-row,
  .quote-row,
  .combat-box,
  .conditions-box,
  .damage-box {
    padding: 8px 10px;
  }

  .logo-title {
    font-size: 48px;
  }

  .logo-subtitle {
    font-size: 16px;
  }

  .field-label {
    font-size: 11px;
  }

  .field-value,
  .list-box,
  .mini-grid,
  .stat-grid,
  .panel,
  .combat-box,
  .conditions-box,
  .damage-box {
    font-size: 11px;
  }

  .combat-box h3,
  .conditions-box h3,
  .damage-box h3,
  .panel h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .list-box {
    min-height: 0;
  }

  .tall-panel .list-box {
    min-height: 3.4in;
  }

  @page {
    size: letter landscape;
    margin: 0.35in;
  }
}