:root { font-family: Arial, Helvetica, sans-serif; color: #17212b; background: #f7f8fa; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: #064da8; }
button, input, textarea, select { font: inherit; }
button, .button { display: inline-block; border: 1px solid #15559d; border-radius: 5px; background: #155da8; color: white; padding: .55rem .9rem; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #0d467f; }
button:disabled { background: #8995a0; border-color: #8995a0; cursor: not-allowed; }
button.secondary, .button.secondary { color: #15559d; background: white; }
button.secondary:hover, .button.secondary:hover { background: #edf3fa; }
button.secondary:disabled, button.secondary:disabled:hover { color: #6b7279; border-color: #a5adb5; background: #f0f2f5; cursor: not-allowed; }
[tabindex="-1"]:focus { outline: 3px solid #15559d; outline-offset: 4px; }
input, textarea, select { display: block; width: 100%; max-width: 40rem; padding: .55rem; margin: .3rem 0 1rem; border: 1px solid #74808c; border-radius: 4px; background: white; }
input[type=file] { padding: .7rem; }
label { display: block; font-weight: 700; }
textarea { min-height: 7rem; resize: vertical; }
header, footer { background: white; border-bottom: 1px solid #d8dde3; }
footer { border-top: 1px solid #d8dde3; border-bottom: 0; margin-top: 2rem; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 1rem; }
header .wrap, footer .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
nav { display: flex; gap: .8rem; flex-wrap: wrap; }
main { max-width: 1000px; margin: 0 auto; padding: 1rem; min-height: 70vh; }
h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.3rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.card, .panel, .band, .chat-message { background: white; border: 1px solid #ccd4dc; border-radius: 7px; padding: 1rem; }
.card h2, .card h3 { margin-top: 0; }
.card a { font-weight: 700; }
.band { background: #eaf3ff; margin: 1.5rem 0; }
.ad { display: none; margin: 1.5rem 0; min-height: 80px; place-items: center; background: #e2e4e7; color: #5d6670; border: 1px solid #c3c6ca; font-size: 1.1rem; font-weight: bold; letter-spacing: .1em; }
/* The server injects this script only with a valid OPENTOOL_ADSENSE_ID. */
html:has(head script[src^="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-"]) .ad { display: grid; }
.small { font-size: .9rem; color: #4d5965; }
.result { margin-top: 1rem; }
#status, .result { overflow-wrap: anywhere; }
.result[hidden], [hidden] { display: none !important; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.tabs button[aria-selected="false"] { background: white; color: #15559d; }
.qr-preview { display: flex; justify-content: center; align-items: center; min-height: 300px; background: white; border: 1px solid #ccd4dc; margin: 1rem 0; overflow: auto; }
.qr-preview svg { max-width: min(100%, 280px); height: auto; }
.password-toggle { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; font-weight: normal; }
.password-toggle input { width: auto; margin: 0; }
@media (max-width: 650px) {
  .qr-preview { min-height: 0; width: min(100%, 220px); height: 220px; margin: 1rem 0 .5rem; padding: .5rem; }
  .qr-preview svg { max-width: 100%; max-height: 100%; }
}
.tool-call { display: inline-block; background: #e8ecf3; border: 1px solid #b8c5d6; border-radius: 100px; padding: .3rem .7rem; font-family: monospace; }
pre { overflow-x: auto; background: #f0f2f5; padding: 1rem; border-radius: 5px; white-space: pre-wrap; }
.chat { display: grid; gap: .8rem; margin: 1rem 0; }
.chat-message.user { margin-left: 12%; background: #eaf3ff; }
.chat-message.agent { margin-right: 12%; }
.score-number { font-size: 3rem; font-weight: bold; }
.story-body { background: #dde3eb; }
.story-screen { width: min(1280px, 100%); max-width: 1280px; min-height: 800px; margin: 0 auto; background: #fff; padding: 3rem 4rem; display: flex; flex-direction: column; }
.story-screen h1 { font-size: 3rem; margin: .5rem 0 1.5rem; }
.story-screen .story-content { max-width: 850px; font-size: 1.5rem; flex: 1; }
.story-screen .chat-message { font-size: 1.5rem; margin: 1rem 0; }
.story-screen .ad { min-height: 45px; margin: 1rem 0; font-size: .8rem; }
.story-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
@media (max-width: 650px) { .story-screen { padding: 1rem; min-height: 100vh; } .story-screen h1 { font-size: 2rem; } .story-screen .story-content { font-size: 1.2rem; } }
