@font-face {
  font-family: MysSerif;
  src: url("fonts/title.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #38313b;
  --muted: #736976;
  --paper: #faf8f5;
  --line: #dfd9d9;
  --purple: #61516e;
  --sand: #f5d8b9;
  --sans: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --serif: MysSerif, "Noto Serif KR", Batang, Georgia, serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #1e1b28;
  color: var(--ink);
}
body {
  font: 16px/1.55 var(--sans);
  word-break: keep-all;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #a98dbe;
  outline-offset: 3px;
}
button i,
i[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}
button {
  touch-action: manipulation;
}
.glyph {
  width: 19px;
  height: 19px;
  display: block;
  flex: none;
}
[hidden] {
  display: none !important;
}
main:focus {
  outline: 0;
}
#main,
.play-view {
  width: 100%;
}
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: max(560px, 100svh);
  overflow: hidden;
  background: #292338;
  color: #fcf6ed;
}
.hero-art,
.hero-scrim,
.title-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-art {
  z-index: -3;
  object-fit: cover;
  object-position: 70% 39%;
  animation: title-enter 1.5s ease-out both;
}
.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      #171626ed 0%,
      #201c32b8 25%,
      #2a1e3680 42%,
      #29203420 61%,
      transparent 79%
    ),
    linear-gradient(
      0deg,
      #19152287 0%,
      transparent 20%,
      transparent 85%,
      #211b3729
    );
}
.title-frame {
  inset: clamp(14px, 2.4vw, 40px);
  width: auto;
  height: auto;
  border: 1px solid #f1d6c126;
  z-index: 1;
}
.title-frame:before,
.title-frame:after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
}
.title-frame:before {
  top: -1px;
  left: -1px;
  border-left: 1px solid #efdfc670;
  border-top: 1px solid #efdfc670;
}
.title-frame:after {
  bottom: -1px;
  right: -1px;
  border-right: 1px solid #efdfc670;
  border-bottom: 1px solid #efdfc670;
}
.hero-content {
  position: relative;
  z-index: 2;
  margin: 68px 0 95px clamp(48px, 9vw, 175px);
  align-self: center;
  animation: title-copy 0.85s ease-out both;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font:
    600 clamp(10px, 0.88vw, 13px)/1.4 Arial,
    sans-serif;
  letter-spacing: 0.25em;
  color: #f4d9bd;
}
.hero-kicker span {
  width: 38px;
  height: 1px;
  background: #e7c5a6;
}
.mys-title {
  font:
    400 clamp(77px, 9.4vw, 166px)/1.08 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.086em;
  white-space: nowrap;
  margin: 20px 0 8px;
  text-shadow: 0 3px 24px #170e262e;
}
.mys-title em {
  font-weight: 400;
}
.bracket {
  font-size: 0.7em;
  color: #e7bfa8;
  vertical-align: 0.08em;
}
.bracket:first-child {
  margin-right: 0.08em;
}
.bracket:last-child {
  margin-left: 0.12em;
}
.hero-intro {
  font: 500 clamp(16px, 1.25vw, 22px)/1.65 var(--sans);
  letter-spacing: 0.065em;
  margin: 0;
  color: #f5e9e8;
}
.hero-actions {
  display: grid;
  gap: 3px;
  margin: clamp(30px, 5.4vh, 60px) 0 0;
  width: clamp(230px, 21vw, 330px);
  position: relative;
}
.title-choice {
  position: relative;
  width: 100%;
  min-height: 49px;
  padding: 9px 15px 9px 35px;
  text-align: left;
  font: 500 clamp(16px, 1.25vw, 20px)/1.4 var(--sans);
  letter-spacing: 0.055em;
  color: #f1e5e5;
  transition:
    background 0.2s,
    color 0.2s,
    padding 0.2s;
  border: 1px solid transparent;
  border-radius: 1px;
}
.title-choice:before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid #eac9b69c;
}
.title-choice.main-choice,
.title-choice:hover,
.title-choice:focus-visible {
  background: linear-gradient(90deg, #ead1c132, #d9c8d010);
  border-color: #f0d6c14d;
  color: #fff8ef;
}
.title-choice.main-choice:before,
.title-choice:hover:before,
.title-choice:focus-visible:before {
  background: #f9dbc2;
}
.hero-actions:has(.title-choice:is(:hover, :focus-visible):not(.main-choice))
  .main-choice:not(:hover):not(:focus-visible) {
  background: none;
  border-color: transparent;
}
.title-choice small {
  display: block;
  font: 500 11px/1.5 var(--sans);
  color: #e5d2d0;
  letter-spacing: 0.02em;
}
.title-tools {
  position: absolute;
  z-index: 2;
  bottom: clamp(27px, 4.7vw, 72px);
  left: clamp(44px, 9vw, 175px);
  right: clamp(38px, 5vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.title-side,
.title-symbol {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  color: #faf1ea;
  font-size: 13px;
  letter-spacing: 0.035em;
  text-shadow: 0 1px 3px #1c142d;
}
.title-side {
  min-height: 42px;
  padding: 0 13px;
  background: #221a3180;
  border: 1px solid #ecd6c94a;
  border-radius: 3px;
}
.title-symbol {
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: #29223882;
  border: 1px solid #f5dccc62;
}
.title-side:hover,
.title-symbol:hover {
  background: #615061dc;
}
.utility-icons {
  display: flex;
  gap: 8px;
}
.title-tools .glyph {
  width: 17px;
  height: 17px;
}
.play-view {
  position: relative;
  min-height: 100svh;
  background: #1d1b25;
}
.play-view.story-container {
  display: grid;
  align-content: start;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #655c69;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex: none;
}
.icon-btn:hover {
  background: #eee8ec;
}
.btn {
  border: 1px solid transparent;
  border-radius: 3px;
  min-height: 43px;
  padding: 8px 17px;
  font-size: 14px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.solid {
  color: #fffbf7;
  background: #53465f;
}
.solid:hover {
  background: #3c3146;
}
.soft {
  background: #f3edf1;
  color: #4d4055;
  border-color: #d8ced9;
}
.soft:hover {
  background: #e8dfe9;
}
.danger {
  color: white;
  background: #8d4353;
}
.action-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.eyebrow,
.field-overline {
  font:
    700 10px/1.4 Arial,
    sans-serif;
  letter-spacing: 0.19em;
  color: #8a7480;
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--paper);
  box-shadow:
    -26px 0 0 var(--paper),
    26px 0 0 var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 26px;
  padding: 23px 0 17px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  margin: 3px 0 0;
  font-size: 26px;
  letter-spacing: -0.065em;
  line-height: 1.3;
}
.modal-body {
  padding: 22px 26px 26px;
}
.modal-body p {
  margin: 0 0 18px;
  color: #645c66;
  font-size: 14px;
}
#dialog {
  width: min(505px, calc(100% - 26px));
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #b7a8ae;
  padding: 0;
  border-radius: 7px;
  max-height: calc(100dvh - 24px);
  box-shadow: 0 20px 110px #08051066;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
#dialog[open] {
  animation: panel-in 0.19s ease-out;
}
#dialog::backdrop {
  background: #151324ab;
  backdrop-filter: blur(7px);
}
#dialog[data-kind="saves"] {
  width: min(790px, calc(100% - 26px));
}
#dialog[data-kind="storyboard"] {
  width: min(1080px, calc(100% - 26px));
}
#dialog[data-kind="party"] {
  width: min(720px, calc(100% - 26px));
}
.menu-actions {
  display: grid;
  gap: 3px;
}
.menu-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.menu-actions button:hover {
  background: #eee8ec;
}
.menu-actions small {
  font-size: 12px;
  color: var(--muted);
}
.menu-meta {
  padding: 6px 11px 14px;
  font-size: 13px;
  color: var(--muted);
}
.save-note {
  font-size: 13px !important;
}
.save-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.slot {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbd3d8;
  background: #fffdfb;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 80px 1fr;
  min-height: 111px;
}
.slot[data-slot="auto"] {
  grid-column: 1 / -1;
  grid-template-columns: clamp(80px, 22%, 166px) 1fr;
}
.slot[data-slot="auto"] .slot-image img {
  width: 100%;
}
.slot-image {
  position: relative;
  min-height: 100%;
  background: linear-gradient(150deg, #eee8ee, #ded5dd);
  display: grid;
  place-content: center;
  color: #998b9c;
  border-right: 1px solid #ddd4da;
}
.slot-image img {
  position: absolute;
  inset: 0;
  width: 80px;
  height: 100%;
  object-fit: cover;
}
.slot-copy {
  min-width: 0;
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.slot-name {
  font: 650 11px/1.5 var(--sans);
  color: #7a647c;
}
.slot-place {
  font-weight: 650;
  font-size: 14px;
}
.slot-copy time,
.slot-empty {
  font-size: 12px;
  line-height: 1.5;
  color: #79707a;
}
.slot-buttons {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding-top: 6px;
}
.slot-buttons button,
.sub-button {
  padding: 4px 9px;
  min-height: 30px;
  border: 1px solid #cfbfca;
  border-radius: 3px;
  background: #f7f1f4;
  font-size: 12px;
}
.slot-buttons button:hover,
.sub-button:hover {
  background: #e8dce5;
}
.slot-buttons .load {
  background: #584961;
  color: #fff;
  border-color: #584961;
}
.save-bottom {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.setting-row,
.help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.setting-row select {
  padding: 6px 10px;
  border: 1px solid #cfc5d1;
  border-radius: 3px;
  background: #fff;
  color: #574b5f;
}
.setting-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #705a7a;
}
.setting-row input[type="range"] {
  width: min(130px, 30vw);
  accent-color: #705a7a;
}
.help-section h3 {
  font-size: 17px;
  margin: 0 0 5px;
}
.help-section + .help-section {
  margin-top: 15px;
}
.help-row span {
  color: #726577;
  text-align: right;
}
.settings-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 20px;
}
.reset-link {
  font-size: 13px;
  color: #8a4454;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 36px;
}
.party-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.party-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d5ccd4;
  border-radius: 3px;
  text-align: left;
  background: white;
}
.party-card:hover {
  border-color: #7a657e;
}
.card-art img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}
.card-copy {
  display: grid;
  padding: 11px;
  gap: 3px;
}
.card-copy .label-en {
  font: 650 10px Arial;
  letter-spacing: 0.12em;
  color: #7d687c;
}
.card-copy strong,
.profile-info h3 {
  font:
    500 22px Georgia,
    serif;
}
.class-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.class-label .glyph {
  width: 15px;
  height: 15px;
}
.card-detail {
  display: none;
}
.profile-grid {
  display: grid;
  grid-template-columns: 40% 1fr;
}
.profile-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  min-height: 245px;
}
.profile-info {
  padding: 16px;
}
.profile-info p {
  font-size: 14px;
  color: #665b69;
}
.roster-select {
  display: grid;
  gap: 7px;
}
.roster-select button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px 4px 4px;
  background: #fff;
}
.roster-select img {
  width: 49px;
  height: 51px;
  object-fit: cover;
  object-position: 50% 20%;
}
.roster-select span {
  margin-left: auto;
  font-size: 13px;
}
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translate(-50%, 8px);
  padding: 8px 15px;
  border: 1px solid #b09cae66;
  border-radius: 4px;
  background: #30263de8;
  color: white;
  font-size: 13px;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transition: 0.17s;
  max-width: 90vw;
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.in-dialog-status {
  margin: 4px 0 0;
  color: #65495e;
  font-size: 13px;
}
.field-screen {
  background: #151f2c;
  color: white;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  height: 100svh;
}
.field-top,
.field-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 10px clamp(12px, 3vw, 40px);
  background: #202435;
}
.field-top {
  border-bottom: 1px solid #475060;
}
.field-overline {
  color: #d3bbd0;
}
.field-loc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  font-size: 19px;
}
.field-chips,
.field-goal {
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-chips button,
.field-bottom button {
  border: 1px solid #86788a;
  color: white;
  min-height: 35px;
  border-radius: 3px;
  padding: 5px 9px;
  font-size: 13px;
}
.field-chips button:hover,
.field-bottom button:hover {
  background: #514959;
}
.field-stage,
.field-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.field-goal {
  font-size: 14px;
}
.field-goal strong {
  font-size: 12px;
  color: #edc8af;
}
.field-key-hint {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  pointer-events: none;
  padding: 5px 9px;
  background: #171c2ec9;
  color: #f4e6cd;
  border: 1px solid #e2dcc64a;
  border-radius: 3px;
  font-size: 12px;
}
.field-key-hint i {
  margin-inline: 4px;
}
.field-progress {
  font-size: 12px;
  color: #cbbac4;
  white-space: nowrap;
}
.field-return {
  margin-left: auto;
}
.field-stage {
  overflow: hidden;
}
.high-contrast .hero-scrim {
  background: linear-gradient(90deg, #14111dec, #1c142a96 52%, transparent 88%);
}
.high-contrast .modal-body p {
  color: #302734;
}
@keyframes title-enter {
  from {
    filter: brightness(0.65);
    transform: scale(1.018);
  }
  to {
    filter: none;
    transform: none;
  }
}
@keyframes title-copy {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 680px) {
  .hero {
    min-height: max(535px, 100svh);
    align-items: flex-end;
  }
  .hero-art {
    object-position: 76% center;
  }
  .hero-scrim {
    background:
      linear-gradient(
        0deg,
        #161421f5,
        #241b31c9 25%,
        #291b3447 67%,
        transparent 90%
      ),
      linear-gradient(90deg, #281c3933, transparent);
  }
  .hero-content {
    margin: 170px 24px 92px clamp(30px, 8vw, 58px);
    align-self: flex-end;
  }
  .mys-title {
    font-size: clamp(68px, 15vw, 100px);
    margin: 10px 0 5px;
  }
  .hero-kicker {
    font-size: 9px;
  }
  .hero-kicker span {
    width: 22px;
  }
  .hero-intro {
    font-size: 14px;
  }
  .hero-actions {
    width: 200px;
    margin-top: 18px;
    gap: 0;
  }
  .title-choice {
    min-height: 40px;
    font-size: 15px;
    padding-block: 6px;
  }
  .title-tools {
    bottom: 25px;
    left: clamp(30px, 8vw, 58px);
    right: 24px;
  }
  .title-side,
  .title-symbol {
    min-height: 36px;
  }
  .title-symbol {
    min-width: 36px;
  }
  .save-grid {
    grid-template-columns: 1fr;
  }
  .modal-header {
    margin-inline: 18px;
    padding: 15px 0 11px;
  }
  .modal-header h2 {
    font-size: 23px;
  }
  .modal-body {
    padding: 15px 18px 18px;
  }
  .slot {
    min-height: 88px;
  }
  .field-top,
  .field-bottom {
    padding: 7px 10px;
  }
  .field-bottom {
    flex-wrap: wrap;
  }
  .field-loc {
    font-size: 16px;
  }
  .field-goal {
    font-size: 13px;
  }
  .field-overline {
    font-size: 9px;
  }
  .party-grid {
    gap: 6px;
  }
  .card-copy {
    padding: 6px;
  }
  .card-copy strong {
    font-size: 18px;
  }
  .class-label {
    gap: 3px;
    font-size: 11px;
  }
}
@media (pointer: coarse) {
  .field-key-hint {
    display: none;
  }
}
@media (max-height: 560px) and (orientation: landscape) {
  .hero {
    min-height: max(320px, 100svh);
  }
  .hero-content {
    align-self: center;
    margin: 24px 0 38px 7vw;
  }
  .hero-art {
    object-position: 66% 32%;
  }
  .mys-title {
    font-size: clamp(52px, 8vw, 80px);
    margin: 4px 0;
  }
  .hero-intro {
    font-size: 13px;
  }
  .hero-actions {
    margin-top: 9px;
    gap: 0;
    width: 195px;
  }
  .title-choice {
    min-height: 31px;
    font-size: 14px;
    padding-block: 3px;
  }
  .title-tools {
    left: auto;
    right: 4vw;
    bottom: 6vh;
    gap: 9px;
  }
  .hero-kicker {
    font-size: 9px;
  }
  .field-top,
  .field-bottom {
    padding-block: 4px;
  }
  .field-overline {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.dialog-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
.world-entry {
  padding: 0 24px 20px;
}
.world-entry button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
#dialog[data-kind="world"] {
  width: min(1180px, calc(100% - 18px));
  max-height: calc(100dvh - 16px);
  overflow: hidden;
}
#dialog[data-kind="world"] .modal-header {
  padding-block: 10px;
}
.zol-world {
  display: block;
  height: min(78dvh, 810px);
  width: 100%;
  border: 0;
  background: #f6f3ec;
}
.settings-foot {
  flex-wrap: wrap;
}
