@font-face{font-family:'Nintendo DS';src:url('fonts/Nintendo-DS-BIOS.ttf') format('truetype');font-display:swap}
.tbt-style-reveal .game-tools{animation:ds-tools-reveal .45s ease-out both}
.tbt-style-reveal #ds-dialogue{animation:ds-frame-reveal .45s cubic-bezier(.2,.7,.3,1) both}
@keyframes ds-tools-reveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes ds-frame-reveal{from{opacity:0;transform:translateY(25px)}to{opacity:1;transform:none}}
#ds-dialogue{position:absolute;z-index:16;left:1.5%;right:1.5%;bottom:1.5%;display:flex;min-height:23%;padding:3.2% 2.8% 1.6%;border:3px solid #30291f;border-radius:13px;background:linear-gradient(#fff7d7,#e9d6a7);box-shadow:inset 0 0 0 2px #b39a67,0 4px 0 #181c16aa;color:#30291f;font-family:'Nintendo DS',monospace;isolation:isolate}
#ds-dialogue[hidden]{display:none!important}
.ds-speaker{position:absolute;top:0;left:2.8%;transform:translateY(-60%);min-width:16%;max-width:45%;font-size:clamp(18px,3.2cqw,30px);line-height:1;color:#f8ebc6;text-align:center;z-index:1}
.ds-speaker span{display:block;padding:6px 20px;background:linear-gradient(#87542d,#654021);border:2px solid #382414;border-radius:7px 7px 13px 4px;box-shadow:inset 0 0 0 1px #bb8d57,inset 0 3px 0 #d4ae7040,0 2px #30201455;color:#fff0cd;text-shadow:0 1px #3e291c}
.ds-speaker i{display:none}
.ds-message{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:10px}
.ds-message>p:not(.sr-only){margin:0;min-height:2.5em;white-space:pre-wrap;font-size:clamp(19px,3.2cqw,32px);line-height:1.14;text-shadow:0 1px #fff7dd}
#ds-dialogue .ds-advance{align-self:flex-end;display:flex;gap:10px;align-items:center;background:#eee1b8;color:#3b3929;border:2px solid #615a3e;border-radius:5px;box-shadow:0 2px #64533940;padding:3px 10px;font:clamp(17px,2.5cqw,25px)/1 'Nintendo DS',monospace;min-height:28px}
#ds-dialogue .ds-advance:hover{background:#fff4ce}#ds-dialogue .ds-advance span{color:#62734e}
#ds-dialogue[data-speaker="AMSI"] .ds-speaker span{background:linear-gradient(#79502e,#54351f)}
.tbt-ds .game-tools{top:2%;right:2%;left:auto;bottom:auto;display:grid;grid-template-columns:repeat(2,58px);gap:8px;align-items:start;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;z-index:18}
.tbt-ds .game-tools .tool-status{display:none}
.tbt-ds .game-tools .tool{width:58px;min-width:0;height:66px;padding:4px 2px;border:2px solid #30291f;border-radius:8px;background:linear-gradient(#fbf2d2,#d9c895);box-shadow:inset 0 0 0 1px #fff9de,2px 3px 0 #30291f66;color:#343c2d;font:19px/1 'Nintendo DS',monospace}
.tbt-ds .game-tools .tool:hover,.tbt-ds .game-tools .tool[aria-expanded=true],.tbt-ds .game-tools .tool[aria-pressed=true]{background:linear-gradient(#fffade,#b9cfaa);box-shadow:inset 0 0 0 1px #fff9de,2px 3px 0 #30291f66;transform:translateY(-1px)}
.tbt-ds .game-tools .tool svg{width:37px;height:37px}
.tbt-ds .game-tools #phone,.tbt-ds .game-tools #inventory-toggle{position:relative}.tbt-ds .game-tools #phone>span,.tbt-ds .game-tools #inventory-toggle>span{font-size:17px}.tbt-ds .game-tools #item-count{position:absolute;right:-4px;top:-4px;font:12px/1 Arial,sans-serif;border:1px solid #30291f;padding:2px 4px}
.tbt-ds .game-tools .small-tool{width:35px;height:35px;justify-self:end;padding:3px;border-radius:6px;background:linear-gradient(#e9edcf,#b5c6a0)}
.tbt-ds .game-tools .small-tool:last-child{justify-self:start}
.tbt-ds #show-points{position:static;width:35px;height:35px;min-width:0;padding:3px;border:2px solid #30291f;border-radius:6px;background:linear-gradient(#e9edcf,#b5c6a0);box-shadow:inset 0 0 0 1px #fff9de,2px 3px 0 #30291f66;font-size:0}
.tbt-ds .game-tools .small-tool svg{width:25px;height:25px}.tbt-ds .small-tool>span:not(.hint-icon){display:none}.tbt-ds .small-tool .hint-icon{height:25px;font:bold 25px/25px Georgia}
.tbt-ds .inventory{top:25%;bottom:auto;left:auto;right:2%;width:70%;max-height:66%;font-family:'Nintendo DS',monospace}.tbt-ds .inventory h2{font:28px 'Nintendo DS',monospace}.tbt-ds .inventory p,.tbt-ds #items button{font:22px/1.1 'Nintendo DS',monospace}
@media(max-width:600px){.tbt-ds .game-tools{grid-template-columns:repeat(2,42px);gap:5px}.tbt-ds .game-tools .tool{width:42px;height:49px;font-size:15px;border-radius:6px}.tbt-ds .game-tools .tool svg{width:26px;height:26px}.tbt-ds .game-tools .small-tool{width:28px;height:28px}.tbt-ds .game-tools .small-tool svg{width:20px;height:20px}.tbt-ds .small-tool .hint-icon{font-size:20px;line-height:20px;height:20px}.tbt-ds .inventory{top:28%;width:88%;max-height:66%}.tbt-ds .inventory h2{font-size:23px}.tbt-ds .inventory p,.tbt-ds #items button{font-size:18px}}
@media(max-width:600px){.tbt-ds .game-tools #phone>span,.tbt-ds .game-tools #inventory-toggle>span{font-size:14px}.tbt-ds #show-points{width:28px;height:28px}}
@media(max-width:600px){#ds-dialogue{min-height:27%;border-width:2px;padding:5% 3% 2.5%;border-radius:9px}.ds-speaker{min-width:22%;font-size:clamp(17px,4cqw,23px)}.ds-speaker span{padding:4px 12px}.ds-message>p:not(.sr-only){font-size:clamp(17px,3.7cqw,25px)}#ds-dialogue .ds-advance{font-size:18px;min-height:25px;padding:2px 8px}}
/* Interlocutor's name occupies the opposite end of the dialogue frame. */
#ds-dialogue:not([data-speaker="AKIEL"]) .ds-speaker{left:auto;right:2.8%}
#ds-dialogue:not([data-speaker="AKIEL"]) .ds-speaker span{border-radius:7px 7px 4px 13px}
