/* The game screen as a graphic novel (js/app/stage.js): the picture of the place on top, the text strip
   under it, the coat (pockets, notebook, journal, candle) as a panel.
   One of the stylesheets in css/, loaded in the order listed in index.html (order matters). */

.screen-game{background:#090a14;}

.vn-stage{
  position:relative;flex:1;min-height:0;
  display:flex;flex-direction:column;align-items:center;
  padding:calc(10px + var(--safe-top)) 12px calc(10px + var(--safe-bottom));
  gap:10px;overflow:hidden;
}
.vn-stage.shake{animation:shake .32s steps(6);}

/* ---------- The picture ---------- */
.vn-picture{position:relative;flex-shrink:0;max-width:100%;background:#10141f;cursor:pointer;}
.vn-picture img{display:block;width:100%;height:100%;image-rendering:pixelated;}

/* ---------- Conversations: the picture darkens, characters stand in it ---------- */
.vn-picture #placeImg{transition:filter .45s ease;}
.vn-stage.talk .vn-picture #placeImg{filter:brightness(.32) saturate(.7);}
.vn-picture img.vn-who{position:absolute;bottom:0;width:40%;height:88.9%;transition:filter .25s ease;animation:whoIn .35s ease-out;}
.vn-who.left{left:1.875%;}
.vn-who.right{right:1.875%;}
.vn-who.quiet{filter:brightness(.45);}
@keyframes whoIn{from{opacity:0;transform:translateY(4%);}to{opacity:1;transform:none;}}

/* A line said: a bubble in the picture between the two, or (tall screens) at the top of the strip. */
.vn-bubble{position:absolute;left:50%;top:7%;transform:translateX(-50%);width:min(48%, 620px);z-index:1;
  padding:10px 16px 12px;background:rgba(9,10,20,.86);box-shadow:inset 0 0 0 2px rgba(240,195,106,.55), 4px 5px 0 rgba(0,0,0,.5);}
.vn-bubble::after{content:'';position:absolute;bottom:-14px;border:14px solid transparent;border-bottom:0;}
.vn-bubble.from-left::after{left:28px;border-top-color:rgba(240,195,106,.55);border-left:0;}
.vn-bubble.from-right::after{right:28px;border-top-color:rgba(240,195,106,.55);border-right:0;}
.vn-bubble-name,.vn-speech-name{display:block;font-family:var(--font-ui);font-weight:400;font-size:20px;line-height:1.2;color:var(--accent);}
.vn-bubble-text{display:block;font-family:var(--font-story);font-size:18px;line-height:1.5;color:#f6ecd4;}
.vn-speech{margin-bottom:10px;}
.vn-speech-name{display:inline;margin-right:8px;}
.vn-speech-text{font-family:var(--font-story);font-size:18px;line-height:1.6;color:var(--text-hi);}
.vn-bubble.old,.vn-speech.old,.vn-text.old{opacity:.55;}

/* ---------- The text strip: almost see-through, light ink ---------- */
.vn-strip{
  --text:#e2d3b4;--text-hi:#f6ecd4;--dim:#a8b5b2;--accent:#f0c36a;--accent-ink:#090a14;--accent-2:#d9c7a0;
  --line:rgba(246,236,212,.16);--line-hi:rgba(240,195,106,.45);--panel-2:rgba(246,236,212,.07);--bg-deep:rgba(0,0,0,.3);
  --k-place:#a8ca58;--k-npc:#df84a5;--k-item:#e8c170;--k-danger:#e07a5f;
  flex:1;min-height:0;max-width:100%;display:flex;flex-direction:column;padding:6px 8px 8px;
  color:var(--text);background:rgba(16,20,31,.55);box-shadow:inset 0 0 0 1px rgba(246,236,212,.12);
}
.vn-stage.portrait .vn-strip{width:100%;}

.vn-hud{display:flex;align-items:center;gap:8px;padding:2px 4px 6px;border-bottom:1px solid var(--line);flex-shrink:0;}
.vn-hud .icon-btn{width:38px;height:38px;font-size:20px;background:transparent;color:var(--accent);box-shadow:inset 0 0 0 1px var(--line-hi);}
.vn-where{flex:1;min-width:0;}
.vn-where strong{display:block;font-family:var(--font-ui);font-weight:400;font-size:17px;line-height:1.2;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:none;}
.vn-hud-btn{height:38px;padding:0 12px;font-family:var(--font-ui);font-size:17px;color:var(--accent);box-shadow:inset 0 0 0 1px var(--line-hi);}
.vn-hud-btn:hover,.vn-hud .icon-btn:hover,.vn-hud .hp-chip:hover{background:var(--panel-2);}
.vn-hud .hp-chip{height:38px;font-size:17px;color:var(--text-hi);}

.vn-box{position:relative;flex:1;min-height:0;overflow-y:auto;padding:12px 14px 6px;cursor:pointer;-webkit-overflow-scrolling:touch;}
.vn-picked{font-family:var(--font-ui);font-size:16px;color:var(--accent);margin-bottom:6px;}
.vn-picked::before{content:'— ';}
.vn-text{font-family:var(--font-story);font-size:18px;line-height:1.6;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;}
.vn-stage.talk .vn-text{font-style:italic;color:var(--dim);}
.vn-more{position:sticky;bottom:0;text-align:right;font-family:var(--font-ui);font-size:22px;line-height:1;color:var(--accent);animation:vnMore 1s steps(2) infinite;pointer-events:none;}
@keyframes vnMore{50%{transform:translateX(4px);}}
.vn-choices{cursor:default;}
.vn-choices .choice-list{margin-top:10px;border-top-color:var(--line);}
.screen-game .vn-choices .choice-list .choice{border-bottom:1px solid var(--line);color:var(--text-hi);}
.screen-game .vn-choices .choice-list .choice:hover,.screen-game .vn-choices .choice-list .choice:focus-visible{background:var(--panel-2);}
.screen-game .vn-choices .choice-list .choice::before{color:var(--accent);}
.vn-choices .ending-summary{margin-top:10px;}

@media (min-width: 760px){
  .vn-text,.vn-speech-text{font-size:19px;}
}

/* ---------- New game: a man or a woman ---------- */
.look-grid{grid-template-columns:1fr 1fr;}
.look-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px;}
.look-card img{width:128px;height:160px;image-rendering:pixelated;background:#202e37;}

/* ---------- The coat ---------- */
.sheet.vn-coat{background-color:#3a2620;background-image:var(--desk-img, none);background-size:288px 288px;image-rendering:pixelated;}
.vn-coat .section{margin-bottom:10px;}
@media (min-width: 760px){
  .sheet.vn-coat{left:auto;top:0;width:400px;height:100%;padding:calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));transform:translateX(105%);}
  .sheet.vn-coat.open{transform:none;}
  .sheet.vn-coat .sheet-handle{display:none;}
}

/* Five inside pockets: dark lining, stitched edge. */
.coat-pockets{list-style:none;display:grid;grid-template-columns:repeat(5, minmax(0, 1fr));gap:8px;margin:6px 0 2px;}
.coat-pocket{
  aspect-ratio:3 / 4;display:flex;align-items:center;justify-content:center;padding:4px;
  background:#3a2620;box-shadow:inset 0 0 0 2px #241612, inset 0 0 0 4px #3a2620, inset 0 0 0 5px rgba(240,195,106,.35);
}
.coat-pocket.empty{opacity:.55;}
.coat-pocket .pocket-item{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;
  font-family:var(--font-ui);font-size:13px;line-height:1.1;color:#f6ecd4;overflow-wrap:anywhere;}
.coat-pocket .pocket-item:hover,.coat-pocket .pocket-item:focus-visible{color:#f0c36a;}
.coat-pocket .pocket-item.drawn img{width:100%;height:auto;}

/* ---------- The journal: the whole story so far ---------- */
.journal-dialog{max-width:680px;height:min(82vh, 900px);display:flex;flex-direction:column;text-align:left;}
.journal-dialog .box-title{text-align:center;}
.journal-dialog #chatLog{flex:1;min-height:0;margin:6px 0 12px;}

/* Toasts at the bottom, out of the way of the bubble and the faces. */
.screen-game .toast-stack{top:auto;bottom:calc(16px + var(--safe-bottom));}
.screen-game .vn-where #storyMeta{text-shadow:none;}
/* Paper in the coat and the journal: no shadows meant for writing on the wood. */
.vn-coat .pbox, .vn-coat .pbox *, .journal-dialog .box-title, .vn-strip *{text-shadow:none !important;}
