/* AMES Chat Diary v1
   Modern paper/diary treatment layered on Scene Conversation UI.
   No image texture or heavy animation: typography and spacing do the work. */
.v2f-root.v2f-chat-v2{
  --v2f-canvas:#f3eee5;
  --v2f-paper:#fffdf8;
  --v2f-ink:#2e3338;
  --v2f-muted:#747a80;
  --v2f-line:rgba(105,92,74,.14);
  --v2f-user:#ece8df;
  --v2f-user-line:#ddd6ca;
  --v2f-send:#5c6973;
}
.v2f-root.v2f-chat-v2 .v2f-shell{
  background:#f7f2e9;
  border-color:rgba(114,96,74,.19);
  box-shadow:0 26px 76px rgba(31,34,37,.27),0 0 0 1px rgba(255,255,255,.45) inset;
}
.v2f-root.v2f-chat-v2 .v2f-shell header{
  background:rgba(253,250,244,.98);
  border-bottom-color:rgba(111,94,72,.15);
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset;
}
.v2f-root.v2f-chat-v2 .v2f-title strong{color:#30343a}
.v2f-root.v2f-chat-v2 .v2f-title span{color:#807a72}
/* The old 7vw padding used the whole browser width and made a 750px chat feel squeezed.
   Keep a real reading gutter instead. */
.v2f-root.v2f-chat-v2 .v2f-shell main{
  position:relative;
  padding:30px 32px 42px;
  background-image:
    linear-gradient(90deg,transparent 0,transparent 22px,rgba(157,105,91,.095) 22px,rgba(157,105,91,.095) 23px,transparent 23px),
    repeating-linear-gradient(180deg,rgba(111,98,77,.022) 0,rgba(111,98,77,.022) 1px,transparent 1px,transparent 31px),
    linear-gradient(180deg,rgba(250,247,240,.94),rgba(248,244,236,.97)),
    var(--v2f-bg-image,none);
  background-size:auto,auto,cover,cover;
  background-position:center,center,center,center;
}
.v2f-root.v2f-chat-v2 .v2f-msg{max-width:min(690px,94%)}
.v2f-root.v2f-chat-v2 .v2f-msg.mine{max-width:min(620px,82%)}
.v2f-root.v2f-chat-v2 .v2f-msg.theirs.v2f-character-turn{margin-bottom:31px}
.v2f-root.v2f-chat-v2 .v2f-msg-head{color:#958e84}
.v2f-root.v2f-chat-v2 .v2f-msg.theirs .v2f-msg-head span{letter-spacing:-.012em}
.v2f-root.v2f-chat-v2 .v2f-bubble,
.v2f-root.v2f-chat-v2 .v2f-rp-dialogue{
  background:#fffdf8;
  border-color:rgba(107,91,72,.14);
  box-shadow:0 3px 12px rgba(61,52,43,.055),0 1px 0 rgba(255,255,255,.75) inset;
}
.v2f-root.v2f-chat-v2 .v2f-rp-dialogue{
  padding:12px 16px;
  color:#30353a;
  line-height:1.72;
}
.v2f-root.v2f-chat-v2 .v2f-rp-stage{
  padding:10px 13px 10px 14px;
  border-left-width:3px;
  border-radius:0 8px 8px 0;
  background:color-mix(in srgb,var(--v2f-speaker-accent,#7b8794) 4.5%,rgba(255,252,246,.76));
  color:#515a61;
  font-size:13.7px;
  font-weight:560;
  line-height:1.82;
}
.v2f-root.v2f-chat-v2.v2f-chat-group .v2f-rp-stage{
  background:color-mix(in srgb,var(--v2f-speaker-accent,#7b8794) 5.5%,rgba(255,252,246,.78));
}
.v2f-root.v2f-chat-v2 .v2f-msg.mine .v2f-bubble{
  background:#ece8df;
  border-color:#ddd5c8;
  color:#41464b;
  box-shadow:0 3px 10px rgba(61,52,43,.04);
}
.v2f-root.v2f-chat-v2 .v2f-shell footer{
  background:rgba(253,250,244,.985);
  border-top-color:rgba(111,94,72,.15);
}
.v2f-root.v2f-chat-v2 .v2f-shell footer textarea,
.v2f-root.v2f-chat-v2 .v2f-inject,
.v2f-root.v2f-chat-v2 .v2f-recipient{
  background:#fffdf8;
  border-color:#ddd6ca;
}
.v2f-root.v2f-chat-v2 .v2f-shell footer>button[data-send]{background:#5c6973}
.v2f-root.v2f-chat-v2 .v2f-narrator{background:rgba(226,220,210,.62);color:#7b746c}
/* Chat settings: keep the character switch in the same diary language without turning it into decoration. */
.v2cs-character-switch{background:#fdfaf4!important;border-color:#ded5c7!important}
.v2cs-character-switch h4{color:#514b44!important}
.v2cs-character-switch p{color:#7a746d!important}
.v2cs-switch-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;margin-top:8px}
.v2cs-switch-line .v2cs-select{margin-top:0;background:#fffdf8;border-color:#ddd5c8}
.v2cs-switch-line .v2cs-btn{min-width:64px;height:35px}
@media(max-width:980px){
  .v2f-root.v2f-chat-v2 .v2f-shell main{padding:27px 26px 38px}
}
@media(max-width:760px){
  .v2f-root.v2f-chat-v2 .v2f-shell main{padding:20px 14px 28px;background-image:linear-gradient(180deg,rgba(250,247,240,.96),rgba(248,244,236,.98)),var(--v2f-bg-image,none);background-size:cover,cover}
  .v2f-root.v2f-chat-v2 .v2f-msg{max-width:96%}
  .v2f-root.v2f-chat-v2 .v2f-msg.mine{max-width:88%}
  .v2f-root.v2f-chat-v2 .v2f-rp-stage{font-size:13.2px;line-height:1.76}
  .v2cs-switch-line{grid-template-columns:1fr}.v2cs-switch-line .v2cs-btn{width:100%}
}
