/* The start screen, stories, creations and the creator, in the Charme after-dark palette. */
#app .messages.is-wide { padding: 34px max(28px, calc((100% - 1080px) / 2)) 48px; }
#app .hub, #app .creator { max-width: 1080px; margin-inline: auto; }
#app .hub-intro h2, #app .creator-intro h2 { color: #f4e7d4; font-size: clamp(30px, 3vw, 40px); max-width: 20ch; }
#app .hub-intro p, #app .creator-intro p { color: #b5b8c8; font-size: 15px; line-height: 1.7; margin-top: 10px; max-width: 58ch; }
#app .hub-small { color: #b5b8c8; font-size: 12px; line-height: 1.6; margin-top: 10px; }
#app .hub ul { list-style: none; margin: 0; padding: 0; }
#app .hub-way, #app .hub-resume, #app .hub-kept { margin-top: 34px; padding-top: 28px; border-top: 1px solid #34394e; }
#app .hub-way-heading, #app .hub-row-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 18px; }
#app .hub-way-heading h3, #app .hub-row-heading h3, #app .hub-create-words h3 { color: #f4e7d4; font-size: 26px; }
#app .hub-way-heading p { color: #b5b8c8; font-size: 14px; max-width: 46ch; }
#app .hub-way.is-lead { border-top: 0; padding-top: 0; margin-top: 30px; }
#app .hub-way.is-lead .hub-way-heading h3, #app .hub-create.is-lead h3 { color: #f4e7d4; font-size: 32px; }

/* Stories: one feature scene and two quieter ones, all photographs of the same painted world. */
#app .story-tiles { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: auto auto; gap: 16px; }
#app .story-tiles > li:first-child { grid-row: span 2; }
#app .story-tile { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; width: 100%; height: 100%; padding: 0; text-align: left; font-weight: 400;
  background: #191d2d; border: 1px solid #34394e; border-radius: 10px; overflow: hidden; color: #f4e7d4; }
#app .story-tile:hover { background: #191d2d; border-color: #666e87; color: #f4e7d4; }
#app .story-tile:hover .story-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#app .story-art { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; background: #23283c; }
#app .story-tiles > li:not(:first-child) .story-art { aspect-ratio: 16 / 7; }
#app .story-words { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
#app .story-title { font: 400 22px/1.2 var(--display); color: #f4e7d4; }
#app .story-tiles > li:not(:first-child) .story-title { font-size: 19px; }
#app .story-meta { font-size: 12px; font-weight: 600; color: #f4e7d4; }
#app .story-premise { font-size: 14px; line-height: 1.6; color: #b5b8c8; }
#app .story-tiles > li:not(:first-child) .story-premise { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Meet: arched portraits, like windows onto each character. */
#app .meet-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
#app .meet-person { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; padding: 0 0 8px; background: transparent; border: 0; text-align: left; font-weight: 400; color: #f4e7d4; }
#app .meet-person:hover { background: transparent; color: #f4e7d4; }
#app .meet-person:hover .meet-portrait { filter: saturate(1.08); box-shadow: 0 10px 28px #18362924; }
#app .meet-person:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#app .meet-portrait { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: center 28%; border-radius: 999px 999px 10px 10px; background: #23283c; transition: box-shadow .2s, filter .2s; }
#app .meet-words { display: flex; flex-direction: column; gap: 4px; padding-inline: 4px; }
#app .meet-words strong { font: 400 23px/1.2 var(--display); color: #f4e7d4; }
#app .meet-words span { font-size: 13px; line-height: 1.55; color: #b5b8c8; }

/* Create: the easel beside a single clear action. */
#app .hub-create { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 28px; align-items: center; background: #191d2d; border: 1px solid #34394e; border-radius: 12px; padding: 22px; }
#app .hub-create.is-lead { margin-top: 30px; grid-template-columns: minmax(200px, 300px) 1fr; padding: 28px; }
#app .hub-create-art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: #23283c; }
#app .hub-create-words p { color: #b5b8c8; font-size: 14px; line-height: 1.65; margin-top: 8px; max-width: 42ch; }
#app .hub-create-words .primary { margin-top: 18px; }

/* Resume and kept pictures. */
#app .resume-list { display: grid; gap: 10px; }
#app .resume-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid #34394e; border-radius: 10px; background: #191d2d; }
#app .resume-art { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #23283c; }
#app .resume-text { display: flex; flex-direction: column; min-width: 0; }
#app .resume-text strong { font-size: 15px; color: #f4e7d4; }
#app .resume-text span { font-size: 12px; color: #b5b8c8; }
#app .resume-actions { display: flex; gap: 6px; }
#app .kept-list { display: flex; flex-wrap: wrap; gap: 14px; }
#app .kept-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#app .kept-art, #app .kept-video { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; background: #23283c; }
#app .kept-video { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #f4e7d4; border: 1px solid #34394e; }

#app .monogram { display: inline-flex; align-items: center; justify-content: center; font: 400 20px/1 var(--display); color: #f4e7d4; background: #2a3046; }
#app .resume-art.monogram { font-size: 24px; }

/* Stories in the conversation. */
#app .scene-card { max-width: 72ch; margin: 0 auto 26px; }
#app .scene-art { display: block; width: 100%; height: min(28vh, 240px); object-fit: cover; object-position: center 35%; border-radius: 12px; background: #23283c; }
#app .scene-card figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; }
#app .scene-card figcaption strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app .scene-card figcaption span { font-size: 12px; color: #b5b8c8; }
#app .story-next { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
#app .reply-chips, #app .direction-chips, #app .story-tools { display: flex; flex-wrap: wrap; gap: 8px; }
#app .reply-chip { justify-content: flex-start; text-align: left; font-size: 14px; font-weight: 500; line-height: 1.4; padding: 10px 14px; background: #191d2d; border: 1px solid #596078; color: #f4e7d4; max-width: 100%; }
#app .reply-chip:hover { border-color: #f4e7d4; background: #242b40; }
#app .story-tools button { font-size: 13px; padding: 9px 13px; }
#app .story-tools button[aria-expanded=true] { background: #2a3046; color: #f4e7d4; border-color: #f4e7d4; }
#app .direction-chips { padding: 12px; border: 1px solid #34394e; border-radius: 10px; background: #191d2d; }
#app .direction-chips .reply-chip { background: #101223; }
#app .message.user.directive { background: #23283c; border-color: #444a63; }
#app .message.user.directive .message-body { font-style: italic; font-size: 14px; color: #f4e7d4; }

/* Creations: one card that moves through confirm, working, done and failed. */
#app .media-card { max-width: 560px; margin: 0 0 26px; border: 1px solid #34394e; border-radius: 12px; background: #191d2d; overflow: hidden; }
#app .media-card.is-portrait { max-width: 360px; }
#app .media-card.is-confirm { background: #191d2d; }
#app .media-frame { position: relative; aspect-ratio: 4 / 3; background: #23283c; display: flex; align-items: center; justify-content: center; }
#app .media-card.is-portrait .media-frame { aspect-ratio: 3 / 4; }
#app .media-frame img, #app .media-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
#app .media-frame > p { padding: 20px; text-align: center; }
#app .media-frame.is-waiting { background: linear-gradient(100deg, #23283c 30%, #30374f 50%, #23283c 70%) 0 0 / 300% 100%; animation: media-wait 2.4s ease-in-out infinite; }
@keyframes media-wait { from { background-position: 100% 0; } to { background-position: 0 0; } }
#app .media-caption { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
#app .media-title { font: 400 19px/1.3 var(--display); color: #f4e7d4; }
#app .media-status { font-size: 14px; line-height: 1.6; color: #f4e7d4; }
#app .media-card.is-failed .media-status, #app .media-card.is-lost .media-status { color: #f4e7d4; }
#app .media-progress { width: 100%; height: 6px; margin-top: 4px; accent-color: #f4e7d4; border: 0; border-radius: 3px; background: #343c56; appearance: none; }
#app .media-progress::-webkit-progress-bar { background: #343c56; border-radius: 3px; }
#app .media-progress::-webkit-progress-value { background: #f4e7d4; border-radius: 3px; }
#app .media-progress::-moz-progress-bar { background: #f4e7d4; border-radius: 3px; }
#app .media-elapsed { font-size: 12px; color: #b5b8c8; font-variant-numeric: tabular-nums; }
#app .media-small { font-size: 12px; line-height: 1.55; color: #b5b8c8; }
#app .media-simulated { align-self: flex-start; font-size: 12px; line-height: 1.5; color: #f4e7d4; background: #2e2a34; border: 1px solid #736275; border-radius: 6px; padding: 5px 10px; }
#app .media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#app .media-actions button { font-size: 13px; padding: 9px 14px; }

/* The creator: choices on the left, the portrait and the way forward on the right. */
#app .creator-back { margin: -6px 0 14px -10px; font-size: 13px; }
#app .creator-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 40px; align-items: start; margin-top: 26px; }
#app .creator-form { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
#app .creator-field { display: flex; flex-direction: column; gap: 8px; }
#app .creator-field > label, #app .chip-set legend { font-size: 13px; font-weight: 600; color: #f4e7d4; }
#app .creator input:not([type=radio]), #app .creator select, #app .creator textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #666e87; border-radius: 6px; background: #191d2d; color: #f4e7d4; font-size: 16px; }
#app .creator input:not([type=radio]):hover, #app .creator select:hover, #app .creator textarea:hover { border-color: #f4e7d4; }
#app .creator textarea { resize: vertical; line-height: 1.6; }
#app .creator-name { display: flex; gap: 8px; }
#app .creator-name input { flex: 1; min-width: 0; }
#app .creator-name button { flex-shrink: 0; font-size: 13px; }
#app .chip-set { border: 0; margin: 0; padding: 0; min-width: 0; }
#app .chip-set legend { padding: 0; margin-bottom: 8px; }
#app .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
#app .chip { position: relative; display: inline-flex; }
#app .chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
#app .chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid #596078; border-radius: 6px; background: #191d2d; font-size: 14px; color: #f4e7d4; }
#app .chip:hover span { border-color: #f4e7d4; background: #242b40; }
#app .chip input:checked + span { background: #f4e7d4; border-color: #f4e7d4; color: #101223; }
#app .chip input:focus-visible + span { outline: 3px solid #f4e7d4; outline-offset: 3px; }
#app .creator-more { border-bottom: 1px solid #34394e; border-top: 1px solid #34394e; }
#app .creator-more[open] { padding-bottom: 18px; }
#app .creator-more summary { font-size: 14px; font-weight: 600; color: #f4e7d4; }
#app .creator-more > .creator-field + .creator-field { margin-top: 16px; }
#app .creator-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: #191d2d; border: 1px solid #34394e; border-radius: 12px; }
#app .creator-portrait { display: flex; flex-direction: column; gap: 10px; }
#app .creator-portrait .media-card { margin: 0; max-width: none; }
#app .creator-portrait .media-card .media-frame { aspect-ratio: auto; height: min(44vh, 420px); }
#app .creator-easel { display: block; width: 100%; height: min(46vh, 440px); object-fit: cover; border-radius: 999px 999px 10px 10px; background: #23283c; }
#app .creator-start { width: 100%; margin-top: 4px; }

/* Credits and the start screen entry. */
#app .credits-pill { font-size: 13px; font-variant-numeric: tabular-nums; border: 1px solid #596078; color: #f4e7d4; }
#app #save-story { min-width: 76px; font-size: 12px; }
#app .companions > .hub-open { margin-top: 18px; font-size: 13px; }
#app .companions > .hub-open + #companion-list { margin-top: 14px; }

@media (max-width: 1150px) {
  #app .creator-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 28px; }
}
@media (max-width: 760px) {
  #app .messages.is-wide { padding: 22px 18px 36px; }
  #app .hub-intro h2, #app .creator-intro h2 { font-size: 29px; }
  #app .hub-intro p, #app .creator-intro p { font-size: 14px; }
  #app .hub-way, #app .hub-resume, #app .hub-kept { margin-top: 26px; padding-top: 22px; }
  #app .hub-way-heading h3, #app .hub-row-heading h3, #app .hub-create-words h3 { font-size: 23px; }
  #app .hub-way.is-lead .hub-way-heading h3, #app .hub-create.is-lead h3 { font-size: 27px; }
  #app .story-tiles { grid-template-columns: 1fr; gap: 12px; }
  #app .story-tiles > li:first-child { grid-row: auto; }
  #app .story-tiles > li:not(:first-child) .story-tile { flex-direction: row; align-items: stretch; }
  #app .story-tiles > li:not(:first-child) .story-art { width: 108px; flex-shrink: 0; aspect-ratio: auto; height: auto; min-height: 100%; }
  #app .story-tiles > li:not(:first-child) .story-words { padding: 12px 14px; }
  #app .story-tiles > li:not(:first-child) .story-premise { display: none; }
  #app .story-title { font-size: 20px; }
  #app .meet-roster { gap: 10px; }
  #app .meet-person { gap: 8px; }
  #app .meet-words strong { font-size: 19px; }
  #app .meet-words span { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  #app .hub-create, #app .hub-create.is-lead { grid-template-columns: 104px 1fr; gap: 16px; padding: 16px; align-items: start; }
  #app .hub-create-words .primary { margin-top: 14px; }
  #app .resume-item { grid-template-columns: 48px 1fr; }
  #app .resume-art { width: 48px; height: 48px; }
  #app .resume-actions { grid-column: 1 / -1; }
  #app .resume-actions button { flex: 1; }
  #app .scene-art { height: min(22vh, 170px); border-radius: 10px; }
  #app .scene-card { margin-bottom: 16px; }
  #app .reply-chip { font-size: 14px; }
  #app .media-card.is-portrait { max-width: 300px; }
  #app .creator-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 20px; }
  #app .creator-preview { position: static; }
  #app .creator-easel { height: 260px; }
  #app .creator-portrait .media-card .media-frame { height: 320px; }
  #app .credits-pill { padding-inline: 8px; font-size: 12px; }
}
@media (max-width: 420px) {
  #app .credits-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #app .media-frame.is-waiting { animation: none; }
  #app .meet-portrait { transition: none; }
}

/* Landing: three ways in, and what things cost. */
#site .ways-in { padding-block: 72px; border-top: 1px solid #34394e; scroll-margin-top: 24px; }
#site .ways-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 36px; }
#site .ways-intro h2 { font-size: clamp(32px, 3.4vw, 48px); margin: 0; line-height: 1.15; }
#site .ways-intro p { font-size: 16px; line-height: 1.65; max-width: 46ch; color: #f4e7d4; }
#site .ways-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; align-items: start; }
#site .way { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: #f4e7d4; }
#site .way img { display: block; width: 100%; height: 380px; object-fit: cover; background: #23283c; border-radius: 12px; }
#site .way-meet img { border-radius: 999px 999px 12px 12px; object-position: center 25%; }
#site .way-words { display: flex; flex-direction: column; gap: 6px; }
#site .way-words strong { font: 400 26px/1.2 var(--display); color: #f4e7d4; }
#site .way-words > span { font-size: 14px; line-height: 1.65; color: #b5b8c8; max-width: 44ch; }
#site .way:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
#site .way:hover img { box-shadow: 0 14px 34px #18362924; }
#site .ways-note { margin-top: 28px; font-size: 13px; color: #b5b8c8; max-width: 68ch; }
#site .faq details p { max-width: 66ch; }
#site .credit-table { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; border-block: 1px solid #aab9ac; padding-block: 28px; }
#site .credit-costs { margin: 0; }
#site .credit-costs > div { padding-block: 12px; border-bottom: 1px solid #34394e; }
#site .credit-costs > div:last-child { border-bottom: 0; }
#site .credit-costs dt { font: 400 21px/1.3 var(--display); }
#site .credit-costs dd { margin: 4px 0 0; font-size: 14px; color: #b5b8c8; }
#site .credit-packs { list-style: none; margin: 0; padding: 0; }
#site .credit-packs li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 24px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid #34394e; }
#site .credit-packs li:first-child { padding-top: 12px; }
#site .credit-packs li:last-child { border-bottom: 0; }
#site .credit-packs strong { font: 400 24px/1.2 var(--display); font-weight: 400; }
#site .credit-packs span { font-size: 14px; color: #b5b8c8; font-variant-numeric: tabular-nums; }
#site .credit-packs .credit-price { color: #f4e7d4; font-weight: 600; }
@media (max-width: 1000px) {
  #site .way img { height: 300px; }
  #site .credit-table { gap: 32px; }
}
@media (max-width: 760px) {
  #site .ways-in { padding-block: 44px; }
  #site .ways-intro { grid-template-columns: 1fr; gap: 16px; margin-bottom: 26px; }
  #site .ways-intro h2 { font-size: 34px; }
  #site .ways-intro p { font-size: 15px; }
  #site .ways-grid { grid-template-columns: 1fr 1fr; gap: 26px 16px; }
  #site .way-story { grid-column: 1 / -1; }
  #site .way-story img { height: 230px; }
  #site .way-meet img, #site .way-create img { height: 210px; }
  #site .way-words strong { font-size: 21px; }
  #site .way-words > span { font-size: 13px; }
  #site .credit-table { grid-template-columns: 1fr; gap: 12px; padding-block: 18px; }
  #site .credit-packs li { grid-template-columns: 1fr auto; }
  #site .credit-packs .credit-price { grid-column: 1 / -1; }
}
