/* Naruto The Last Empire v0.4.1 — actual CSS layout hotfix, loaded AFTER v0.4. */
/* The logo uses the same brush lettering for THE LAST and EMPIRE. */
.ninja-v041.guest-layout .access-story .naruto-splash-title{display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:0!important}
.ninja-v041.guest-layout .last-brush{font-family:'Kaushan Script',cursive!important;display:block;white-space:nowrap;letter-spacing:0!important;font-size:clamp(44px,5vw,91px)!important;line-height:1.06}
.ninja-v041.guest-layout .empire-brush{font:inherit;color:inherit;letter-spacing:inherit}
.ninja-v041 .ninja-topbar .topbar-mark span{font-family:'Kaushan Script',cursive!important;font-style:normal;font-size:.66em!important;letter-spacing:.015em;color:#f4d4aa}
/* Chat is a viewport-fitting flex stack: header, feed and a single compact composer. */
.ninja-v041.game-layout:has(.empire-chat-v041) .workspace{height:100dvh;min-height:0!important;overflow:hidden;display:flex;flex-direction:column}
.ninja-v041.game-layout:has(.empire-chat-v041) .ninja-topbar{flex:0 0 69px;height:69px!important;min-height:69px}
.ninja-v041.game-layout:has(.empire-chat-v041) main{height:auto!important;min-height:0!important;flex:1 1 auto;max-height:none!important;max-width:none!important;padding:5px 9px 8px!important;margin:0!important;overflow:hidden;display:flex;flex-direction:column}
.ninja-v041.game-layout:has(.empire-chat-v041) .workspace>footer{display:none!important}
.ninja-v041.game-layout:has(.empire-chat-v041) .notice-bar{flex:0 0 auto;padding:5px 11px}
.ninja-v041 .empire-chat-v041{flex:1 1 auto!important;height:100%!important;min-height:0!important;max-height:none!important;width:100%;max-width:none;display:flex;flex-direction:column;overflow:hidden;margin:0!important}
.ninja-v041 .empire-chat-v041 .chat-location-banner{flex:0 0 auto!important;min-height:52px;max-height:80px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 12px!important;margin:0 0 5px!important;border:1px solid #99683e}
.ninja-v041 .empire-chat-v041 .chat-location-banner h1{font-size:clamp(21px,1.5vw,27px)!important;line-height:1.05;margin:3px 0!important}
.ninja-v041 .empire-chat-v041 .chat-location-banner small{font-size:10px;color:#d7a26b;letter-spacing:.08em}
.ninja-v041 .empire-chat-v041 .chat-head-actions{display:flex;align-items:center;gap:5px;flex-wrap:nowrap;flex-shrink:0}
.ninja-v041 .empire-chat-v041 .chat-head-actions .button{font-size:10px!important;padding:7px 10px!important;white-space:nowrap;min-width:0}
.ninja-v041 .empire-chat-v041 .chat-play-layout{position:relative;flex:1 1 auto!important;height:0!important;min-height:0!important;overflow:hidden!important;display:flex!important;gap:0!important}
.ninja-v041 .empire-chat-v041 .chat-main{flex:1 1 auto;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;min-width:0!important}
.ninja-v041 .empire-chat-v041 .chat-scene-banner{flex:0 0 28px;height:28px;min-height:28px;padding:4px 9px!important;font-size:10px!important}
.ninja-v041 .empire-chat-v041 .chat-feed{flex:1 1 0%!important;height:0!important;min-height:0!important;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;padding:12px clamp(10px,1.3vw,22px)!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9e6f48 #e0c7a0}
.ninja-v041 .empire-chat-v041 .chat-message{padding:8px 0 9px!important;gap:10px!important;line-height:1.53!important;margin:0!important;border-bottom:1px solid #c8b089!important;align-items:flex-start}
.ninja-v041 .empire-chat-v041 .chat-message>.avatar{flex:0 0 37px!important;width:37px!important;height:37px!important;font-size:17px}
.ninja-v041 .empire-chat-v041 .chat-message>div{min-width:0;flex:1}
.ninja-v041 .empire-chat-v041 .chat-message header{margin:0 0 5px!important;padding:0 0 4px!important;border-bottom:1px solid #dbc59c}
.ninja-v041 .empire-chat-v041 .chat-message header a{font-size:12px!important;font-weight:800!important;color:#533223}
.ninja-v041 .empire-chat-v041 .chat-message header small{font-size:9px!important;color:#705b44}
.ninja-v041 .empire-chat-v041 .chat-message .prose{font-family:Georgia,'Noto Serif JP',serif!important;font-size:clamp(12.5px,.82vw,14px)!important;line-height:1.58!important;letter-spacing:0!important;margin:0!important;color:#352b22!important;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}
.ninja-v041 .empire-chat-v041 .chat-message .prose p{margin:0 0 7px!important;color:inherit!important}
.ninja-v041 .empire-chat-v041 .chat-feed .empty{padding:15px!important;margin:auto;color:#655039}
.ninja-v041 .empire-chat-v041 .chat-composer{flex:0 0 auto!important;min-height:0!important;max-height:180px!important;overflow-y:auto!important;margin:0!important;padding:5px 9px 4px!important;border-top:2px solid #a16d3d!important;display:flex;flex-direction:column;gap:3px}
.ninja-v041 .empire-chat-v041 .chat-input-row{display:grid!important;grid-template-columns:clamp(91px,10%,145px) clamp(104px,13%,165px) minmax(180px,1fr) 56px 85px!important;gap:5px!important;align-items:end!important;min-height:50px!important}
.ninja-v041 .empire-chat-v041 .chat-input-row>label{margin:0!important;padding:0!important;min-width:0!important;display:block!important;font-size:9px!important;line-height:1.1!important;color:#d4ac80!important}
.ninja-v041 .empire-chat-v041 .chat-input-row>label:has(textarea){grid-column:auto!important}
.ninja-v041 .empire-chat-v041 .chat-input-row textarea,.ninja-v041 .empire-chat-v041 .chat-input-row select,.ninja-v041 .empire-chat-v041 .chat-input-row .chat-current-location,.ninja-v041 .empire-chat-v041 .chat-input-row button{height:48px!important;min-height:48px!important;max-height:48px!important;box-sizing:border-box;margin:0!important;border-radius:1px!important}
.ninja-v041 .empire-chat-v041 .chat-input-row textarea{display:block!important;resize:none!important;font:12px/1.4 Manrope,sans-serif!important;padding:7px 9px!important;overflow-y:auto}
.ninja-v041 .empire-chat-v041 .chat-input-row select{font:12px Manrope,sans-serif!important;padding:5px!important}
.ninja-v041 .empire-chat-v041 .chat-current-location{font:600 11px/1.35 Manrope,sans-serif;color:#ecd0aa;border:1px solid #9e6c41;background:#232827;padding:5px 8px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
.ninja-v041 .empire-chat-v041 .chat-note-button{border:1px solid #90613d;background:#273130;color:#d9be9b;font-size:10px;font-weight:800;padding:4px;cursor:pointer}
.ninja-v041 .empire-chat-v041 .chat-note-button:hover{background:#ad6839;color:#fff}
.ninja-v041 .empire-chat-v041 .chat-submit{padding:5px 12px!important;font-size:11px!important;background:#934027!important}
.ninja-v041 .empire-chat-v041 .chat-composer>.form-error{margin:0!important;font-size:10px;line-height:1.2;min-height:0!important}
.ninja-v041 .empire-chat-v041 .chat-composer>label:has(select[name='npc']){display:none!important}
.ninja-v041 .empire-chat-v041 .chat-composer:has(select[name='kind'] option:checked[value='npc'])>label:has(select[name='npc']){display:block!important;max-height:55px}
.ninja-v041 .empire-chat-v041 .chat-tools{display:grid!important;grid-template-columns:minmax(200px,1fr) auto minmax(105px,1fr);align-items:center;gap:7px!important;padding:1px 0!important;line-height:1.1!important}
.ninja-v041 .empire-chat-v041 .chat-help{font:9px/1.2 Manrope,sans-serif;color:#9a8977;letter-spacing:0}
.ninja-v041 .empire-chat-v041 .chat-tools-buttons{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:nowrap}
.ninja-v041 .empire-chat-v041 .chat-tools-buttons button{font-size:9px!important;padding:5px 8px!important;white-space:nowrap;border-radius:2px;min-height:26px}
.ninja-v041 .empire-chat-v041 #chat-selected{font:9px Manrope,sans-serif;color:#bda27f;justify-self:end}
.ninja-v041 .empire-chat-v041 .chat-picker-panel{flex:0 1 auto;max-height:95px;overflow:auto;margin:0;padding:5px}
.ninja-v041 .empire-chat-v041 .chat-scene-side{max-height:65%}
/* A non-modal, locally autosaved right-edge scratchpad. Compact launcher on minimize. */
.shinobi-notebook{position:fixed;z-index:205;right:clamp(10px,1.7vw,32px);top:17vh;width:min(540px,43vw);height:min(61dvh,570px);min-height:300px;box-sizing:border-box;background:#131d20f5;color:#efd0a3;border:1px solid #bd7c4c;box-shadow:0 12px 45px #000b;display:flex;flex-direction:column;overflow:hidden;border-radius:3px}
.shinobi-notebook .notebook-header{flex:0 0 39px;display:flex;justify-content:space-between;align-items:center;padding:5px 11px;border-bottom:1px solid #a77042;background:#1e2829;color:#ecc28c;font:800 12px Manrope,sans-serif;letter-spacing:.05em}
.shinobi-notebook .notebook-heading-tools{display:flex;gap:7px}
.shinobi-notebook .notebook-heading-tools button{width:28px;height:27px;border:1px solid #7c573b;background:#111c1f;color:#ffca92;cursor:pointer}
.shinobi-notebook .notebook-heading-tools button:hover{border-color:#e2b071}
.shinobi-notebook .notebook-content{display:flex;flex-direction:column;min-height:0;flex:1;padding:8px;gap:5px}
.shinobi-notebook .notebook-content label{color:#bb9a76;font:600 10px Manrope,sans-serif}
.shinobi-notebook textarea{flex:1;min-height:0;resize:none;width:100%;border:1px solid #b67c49;background:#091722;color:#f1dfc3;padding:11px;outline-offset:0;font:13px/1.56 Georgia,serif;box-sizing:border-box}
.shinobi-notebook .notebook-footer{display:flex;align-items:center;gap:9px;padding:2px 0 0!important;margin:0!important;border:0!important;font:10px Manrope,sans-serif;color:#d6b188;flex-wrap:wrap}
.shinobi-notebook #shinobi-note-status{margin-right:auto;color:#8fb7a1}
.shinobi-notebook .notebook-footer button{background:#493123;border:1px solid #b18350;color:#f7d6a4;font:800 10px Manrope,sans-serif;cursor:pointer;padding:7px 9px;white-space:nowrap}
.shinobi-notebook .notebook-launcher{display:none}
.shinobi-notebook.minimized{top:auto;bottom:14%;right:8px;min-width:0;width:56px!important;height:56px!important;min-height:0!important;border-radius:7px;box-shadow:0 4px 24px #0007}
.shinobi-notebook.minimized .notebook-header,.shinobi-notebook.minimized .notebook-content{display:none}
.shinobi-notebook.minimized .notebook-launcher{display:block;width:100%;height:100%;cursor:pointer;border:0;color:#ffc78d;background:linear-gradient(145deg,#6d3d24,#111f21);font-size:27px}
/* Consistent administrator contrast, including overview cards, forms and tables. */
.ninja-v041 .admin-shell{align-items:start;color:#e4cba5}
.ninja-v041 .admin-workspace{background:transparent!important;color:#f0d4ad!important;min-width:0}
.ninja-v041 .admin-workspace>.page-heading,.ninja-v041 .admin-workspace>.page-heading h1{color:#f4c98f!important}
.ninja-v041 .admin-workspace>.page-heading p{color:#bba98e!important}
.ninja-v041 .admin-workspace .panel,.ninja-v041 .admin-workspace .table-wrap,.ninja-v041 .admin-workspace .maps-management-intro,.ninja-v041 .admin-workspace .map-asset-card{background:#e9d8ba!important;color:#3d3025!important;border:1px solid #a27d52!important;box-shadow:none!important}
.ninja-v041 .admin-workspace .panel{padding:15px!important}
.ninja-v041 .admin-workspace .panel h1,.ninja-v041 .admin-workspace .panel h2,.ninja-v041 .admin-workspace .panel h3,.ninja-v041 .admin-workspace .map-asset-card h2{color:#573523!important;text-shadow:none!important}
.ninja-v041 .admin-workspace .panel p,.ninja-v041 .admin-workspace .panel small,.ninja-v041 .admin-workspace .maps-management-intro p,.ninja-v041 .admin-workspace .map-asset-card p{color:#6b5640!important;opacity:1!important}
.ninja-v041 .admin-workspace .panel .badge{color:#553921!important;background:#dcc5a4}
.ninja-v041 .admin-workspace table,.ninja-v041 .admin-workspace td,.ninja-v041 .admin-workspace th{color:#463022!important}
.ninja-v041 .admin-workspace table a{color:#763f22;text-decoration:underline}
.ninja-v041 .admin-workspace thead th{background:#d1b58b;color:#40271d!important}
.ninja-v041 .admin-workspace tbody tr:nth-child(even){background:#dfcaab}
.ninja-v041 .admin-workspace label{color:#4f3425!important;font-weight:700}
.ninja-v041 .admin-workspace select,.ninja-v041 .admin-workspace input:not([type=checkbox]):not([type=file]),.ninja-v041 .admin-workspace textarea{background:#fff7e5!important;color:#39291d!important;border:1px solid #af916a!important}
.ninja-v041 .admin-workspace .button:not(.primary){border:1px solid #8b6541!important;color:#492b1e!important;background:#ead8b7!important}
.ninja-v041 .admin-workspace .button.primary{background:#8c4128!important;color:#fff2dc!important}
.ninja-v041 .admin-workspace .level-editor{background:#28221f}
.ninja-v041 .admin-workspace .level-editor label{color:#e8c397!important}
.ninja-v041 .admin-workspace .level-editor input{color:#39281c!important}
.ninja-v041 .admin-workspace .on-rank-grid>div,.ninja-v041 .admin-workspace .icon-admin-item{background:#dec5a0;color:#4c3320}
.ninja-v041 .admin-workspace .progress-admin h2{color:#573523!important}
.ninja-v041 .admin-control{background:#161c1d;border:1px solid #976940;color:#eac79d}
.ninja-v041 .admin-control a{color:#edc99c}
.ninja-v041 .admin-control a.active{background:#82472d;color:#fff2dc}
@media(max-width:1100px){
 .ninja-v041 .empire-chat-v041 .chat-tools{grid-template-columns:1fr auto;gap:5px}
 .ninja-v041 .empire-chat-v041 .chat-help{display:none}
 .ninja-v041 .empire-chat-v041 #chat-selected{display:none}
 .ninja-v041 .empire-chat-v041 .chat-input-row{grid-template-columns:90px 104px minmax(160px,1fr) 49px 75px!important}
}
@media(max-width:780px){
 .ninja-v041.guest-layout .access-story .naruto-splash-title{align-items:center}
 .ninja-v041.guest-layout .last-brush{font-size:clamp(35px,9vw,63px)!important}
 .ninja-v041 .empire-chat-v041 .chat-location-banner{flex-wrap:wrap;max-height:102px;gap:3px}
 .ninja-v041 .empire-chat-v041 .chat-location-banner h1{font-size:19px!important}
 .ninja-v041 .empire-chat-v041 .chat-head-actions .button{font-size:9px!important;padding:4px 7px!important}
 .ninja-v041 .empire-chat-v041 .chat-input-row{grid-template-columns:82px minmax(120px,1fr) 42px 62px!important;gap:3px!important}
 .ninja-v041 .empire-chat-v041 .chat-current-location{display:none!important}
 .ninja-v041 .empire-chat-v041 .chat-input-row textarea{font-size:11px!important}
 .ninja-v041 .empire-chat-v041 .chat-tools-buttons{gap:3px;flex-wrap:wrap}
 .ninja-v041 .empire-chat-v041 .chat-tools-buttons button{font-size:8px!important;padding:4px 5px!important}
 .ninja-v041 .empire-chat-v041 .chat-message .prose{font-size:12.5px!important;line-height:1.55!important}
 .shinobi-notebook{width:min(90vw,540px);height:55dvh;right:7px;top:20vh}
 .ninja-v041 .admin-shell{grid-template-columns:1fr}
 .ninja-v041 .admin-control{position:static;max-height:200px;overflow:auto}
}
