@font-face {
  font-family: "Benguiat";
  src: url("assets/fonts/benguiat-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #120d09;
  --ink: #eee1c9;
  --dim: #b3a087;
  --amber: #ffc95c;
  --red: #ed292b;
  --panel: #241a10;
  --line: #5a422b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  background: radial-gradient(120% 90% at 50% 0%, #29190e 0%, var(--bg) 55%, #090706 100%) fixed;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  display: flex;
  justify-content: center;
}
.app { width: min(620px, 100%); padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.top { position: relative; display: flex; justify-content: center; padding: 0 42px 4px; }
h1 {
  width: min(330px, 100%); margin: 0;
  font-family: "Benguiat", Georgia, serif; font-weight: 700;
  text-transform: uppercase; text-align: center; line-height: .88; letter-spacing: -1.5px;
  color: #1a0807; -webkit-text-stroke: 1px var(--red);
  text-shadow: 0 0 5px #ed292b88, 0 0 18px #ed292b44;
}
h1 span { display: block; }
.title-top { font-size: clamp(36px, 9.4vw, 50px); border-top: 2px solid var(--red); padding-top: 8px; }
.title-bottom { position: relative; width: 76%; margin: 5px auto 0; padding: 4px 0 2px; font-size: clamp(32px, 8.3vw, 46px); }
.title-bottom::before, .title-bottom::after { content: ""; position: absolute; top: 9px; width: 12%; height: 2px; background: var(--red); box-shadow: 0 0 7px #ed292b88; }
.title-bottom::before { right: 103%; }
.title-bottom::after { left: 103%; }
.icon-btn { position: absolute; right: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 18px; cursor: pointer; touch-action: manipulation; }
.icon-btn[aria-pressed="false"] { opacity: .65; }
.wall-wrap { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid #4a3620; box-shadow: 0 15px 40px #0007, 0 0 0 5px #20160c; background: #20160c; }
#wall { display: block; width: 100%; height: 100%; cursor: text; }
.typebox { display: flex; flex-direction: column; gap: 10px; }
.editor-label { font-family: "Benguiat", Georgia, serif; font-weight: 700; font-size: 19px; }
#msg { display: block; width: 100%; min-height: 155px; max-height: 65vh; resize: vertical; padding: 14px 16px; font: 17px/1.6 "Courier New", Courier, monospace; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; caret-color: var(--amber); }
#msg:focus { outline: 2px solid var(--amber); outline-offset: 2px; }
#msg::placeholder { color: #ac967c; opacity: 1; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.act { flex: 1; min-width: 85px; min-height: 44px; padding: 8px 6px; white-space: nowrap; border-radius: 7px; border: 1px solid var(--line); background: #2b1f12; color: var(--amber); font: 700 15px/1.2 "Benguiat", Georgia, serif; cursor: pointer; touch-action: manipulation; }
.act.ghost { color: var(--dim); }
.act:hover { background: #392817; }
.act:active { filter: brightness(1.3); }
.act[aria-pressed="true"] { border-color: var(--red); color: #ff9790; }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.count { color: var(--dim); font: 12px Georgia, serif; min-width: 75px; text-align: right; font-variant-numeric: tabular-nums; }
.tip { margin: 0; color: var(--dim); font-size: 13px; text-align: center; line-height: 1.8; }
.credit { color: #a38e76; font-size: 12px; text-align: center; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); width: max-content; max-width: calc(100% - 32px); background: #312313; border: 1px solid #826039; color: var(--ink); font-size: 14px; padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 420px) {
  .app { padding: 18px 14px; gap: 14px; }
  .tools .count { flex-basis: 100%; }
  .top { padding-inline: 36px; }
  .icon-btn { width: 34px; height: 34px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
