:root {
  color-scheme: light;
  --ink: #232b25;
  --soft: #506054;
  --paper: #f7f5ed;
  --white: #fffcf5;
  --line: #d4d7c9;
  --forest: #263e35;
  --moss: #355343;
  --gold: #e3c386;
  --serif: "STIX Two Text", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #9c6718; outline-offset: 3px; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); overflow-wrap: anywhere; }
.wrap { max-width: 860px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
.mast { color: var(--white); background: var(--forest); border-bottom: 3px solid #bd9d62; }
.brand { display: flex; align-items: center; gap: 12px; padding-block: 12px; font: 29px/1.2 var(--serif); letter-spacing: -.04em; }
.compass { position: relative; display: inline-block; width: 30px; height: 30px; flex: none; border: 1px solid #cdb98e; border-radius: 50%; }
.compass::before, .compass::after { position: absolute; content: ""; inset: 2px 7px; background: var(--gold); clip-path: polygon(50% 0, 62% 41%, 100% 50%, 62% 59%, 50% 100%, 38% 59%, 0 50%, 38% 41%); transform: rotate(30deg); }
.compass::after { inset: 5px 9px; transform: rotate(120deg); }
main.wrap { padding-top: 26px; padding-bottom: max(48px, env(safe-area-inset-bottom)); }
.gate { max-width: 500px; margin: 4em auto; text-align: center; }
.gate h1 { font-size: 34px; font-weight: 500; line-height: 1.15; }
.gate p { margin-top: 12px; color: var(--soft); }
.gate button { margin-top: 24px; }
.current { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 23px; border: 1px solid #c9cfbc; border-inline-start: 4px solid #75835a; background: #e9eddf; }
.current h2 { margin-block: 4px 2px; font-size: clamp(23px, 4vw, 32px); line-height: 1.16; font-weight: 500; }
.current p { color: var(--soft); font-size: 14px; overflow-wrap: anywhere; }
.eyebrow { color: #43523d; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow span { margin-left: 4px; white-space: nowrap; }
.light, .launch, .primary, .secondary { border-radius: 5px; padding: 8px 14px; font-size: 14px; font-weight: 600; min-height: 42px; }
.primary { border: 1px solid var(--forest); background: var(--forest); color: var(--white); }
.primary:hover { background: var(--moss); }
.light, .secondary { background: var(--white); border: 1px solid #a9b09f; }
.light { flex-shrink: 0; }
.light:hover, .secondary:hover { background: #edf0e4; }
.views { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid #bdc4b5; }
.current:not([hidden]) + .views { margin-top: 18px; }
.views > button:not(.launch) { align-self: stretch; position: relative; padding: 8px 0 10px; min-height: 48px; border: 0; background: transparent; color: var(--soft); font-size: 16px; }
.views > button[aria-current] { color: var(--ink); font-weight: 650; }
.views > button[aria-current]::after { content: ""; position: absolute; bottom: -1px; height: 3px; border-radius: 2px; left: 0; right: 0; background: var(--moss); }
#party-count { color: var(--soft); font-size: 12px; }
.launch { margin: 0 0 6px auto; border: 1px solid #a9b09f; background: transparent; }
.launch:hover { background: #e9eddf; }
.kinds { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 23px; }
.kinds button { display: flex; align-items: center; gap: 9px; min-height: 40px; border: 1px solid var(--line); border-radius: 30px; background: transparent; padding: 6px 13px; font-size: 14px; font-weight: 530; }
.kinds button[aria-pressed="true"] { border-color: var(--moss); color: var(--white); background: var(--moss); }
.kinds .count { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .9; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 14px; }
.section-head h1 { font-weight: 500; line-height: 1.1; font-size: clamp(34px, 5.5vw, 46px); letter-spacing: -.035em; }
.records { display: grid; gap: 10px; }
.record { width: 100%; display: flex; align-items: center; gap: 13px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 7px; padding: 15px; }
button.record:hover { border-color: #899b85; }
.record-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.record-title { display: block; font: 500 23px/1.18 var(--serif); }
.record-details { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 5px; color: var(--soft); font-size: 14px; }
.record-mark { background: #e7ebde; color: #385445; border: 1px solid #c8d1bd; width: 34px; height: 43px; border-radius: 2px 6px 6px 2px; box-shadow: inset 3px 0 0 #b6c5ac; flex: none; display: grid; place-items: center; font: 21px/1 var(--serif); }
.record-mark[data-kind="character"] { background: #efe6d9; color: #765634; border-color: #d8c8b1; box-shadow: inset 3px 0 0 #c8ac8a; }
.record-mark[data-kind="profile"] { background: #e3e9ec; color: #425c66; border-color: #c5d2d5; box-shadow: inset 3px 0 0 #aec4c9; }
.record-mark[data-kind="scenario"] { background: #ece4e4; color: #76505c; border-color: #d7c7cb; box-shadow: inset 3px 0 0 #c8b0b6; }
.arrow { color: var(--soft); font-size: 23px; }
.empty { padding: 25px 20px; text-align: center; border: 1px dashed #b6bfad; border-radius: 7px; color: var(--soft); }
.empty strong { display: block; color: var(--ink); font: 500 22px/1.3 var(--serif); margin-bottom: 4px; }
.empty p { font-size: 14px; }
#notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; margin-top: 14px; border-left: 3px solid #a08147; background: #efe9d8; font-size: 14px; }
dialog { width: min(480px, 94vw); padding: 0; max-height: 92dvh; color: var(--ink); background: var(--paper); border: 1px solid #abb5a4; border-radius: 12px; box-shadow: 0 15px 70px #19272042; }
dialog::backdrop { background: #17291fcc; }
dialog form { padding: 22px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 17px; }
.dialog-head h2 { font-weight: 500; font-size: 31px; line-height: 1.15; }
.close { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--white); font-size: 26px; line-height: 1; }
label { display: block; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; min-height: 43px; margin-top: 5px; padding: 9px 11px; border: 1px solid #9da894; border-radius: 5px; background: var(--white); color: var(--ink); font-weight: 400; font-size: 16px; line-height: 1.4; }
textarea { resize: vertical; }
.submit { width: 100%; margin-top: 18px; }
.form-error, .hint { margin-top: 12px; font-size: 14px; }
.form-error { color: #8c3324; }
.hint { color: var(--soft); }
@media (max-width: 580px) {
  main.wrap { padding-top: 15px; }
  .wrap { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .current { padding: 14px; gap: 9px; }
  .views { gap: 14px; }
  .views > button:not(.launch) { font-size: 15px; }
  .launch { padding: 6px 9px; font-size: 13px; }
  .kinds { gap: 6px; margin-top: 15px; }
  .kinds button { padding: 6px 10px; gap: 5px; }
  .section-head { margin-block: 18px 12px; }
  .record { padding: 12px; gap: 10px; }
  .record-title { font-size: 21px; }
  dialog form { padding: 17px; }
}
@media (max-width: 370px) {
  .views { gap: 8px; }
  .launch > span { display: none; }
  .section-head { flex-wrap: wrap; }
  .record.party { align-items: flex-start; flex-direction: column; }
}
