/* -------------------------------------------------------------------------
   Defeated Realms - Evennia Webclient Theme
   Save as: web/static/webclient/css/custom.css
   Alternative: web/static/webclient/css/defeated-webclient.css and import it
   from custom.css with: @import url('./defeated-webclient.css');

   Expected image files:
   - web/static/website/images/stone-bg.webp
   - web/static/website/images/map-bg.webp
   - web/static/website/images/Defeated-Realms-Logo-Square.png
------------------------------------------------------------------------- */

:root {
  --dr-black: #050403;
  --dr-bg: #0d0b08;
  --dr-bg-soft: #17110c;
  --dr-stone: #211810;
  --dr-stone-light: #302216;
  --dr-panel: rgba(18, 13, 8, 0.92);

  --dr-text: #efe3c8;
  --dr-muted: #b7a98c;
  --dr-dim: #7f735f;

  --dr-red: #751e21;
  --dr-red-bright: #a83236;
  --dr-gold: #c0934f;
  --dr-gold-bright: #e0bd72;
  --dr-purple: #51406e;
  --dr-green: #263323;

  --dr-border: rgba(192, 147, 79, 0.42);
  --dr-border-strong: rgba(224, 189, 114, 0.72);
  --dr-shadow: rgba(0, 0, 0, 0.82);

  --dr-font-body: Georgia, "Times New Roman", serif;
  --dr-font-mono: "Cascadia Mono", "IBM Plex Mono", "DejaVu Sans Mono", Consolas, Inconsolata, "Lucida Console", monospace;
}

/* -------------------------------------------------------------------------
   Page shell
------------------------------------------------------------------------- */

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  position: relative;
  background:
    radial-gradient(circle at 18% 8%, rgba(117, 30, 33, 0.26), transparent 28rem),
    radial-gradient(circle at 90% 14%, rgba(192, 147, 79, 0.13), transparent 26rem),
    linear-gradient(180deg, rgba(5, 4, 3, 0.94), rgba(13, 11, 8, 0.98)),
    url("../../website/images/stone-bg.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--dr-text);
  font-family: var(--dr-font-mono);
  font-size: 0.96rem;
  line-height: 1.48;
}

/* Dark vignette and subtle map/grid atmosphere. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 4, 3, 0.86), rgba(5, 4, 3, 0.36), rgba(5, 4, 3, 0.86)),
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.46) 62%, rgba(0, 0, 0, 0.94) 100%),
    repeating-linear-gradient(90deg, rgba(224, 189, 114, 0.035) 0, rgba(224, 189, 114, 0.035) 1px, transparent 1px, transparent 96px),
    repeating-linear-gradient(0deg, rgba(224, 189, 114, 0.025) 0, rgba(224, 189, 114, 0.025) 1px, transparent 1px, transparent 96px);
}

/* Watermark sigil, deliberately faint so it does not interfere with text. */
body::after {
  content: "";
  position: fixed;
  right: clamp(1rem, 4vw, 4rem);
  top: clamp(4rem, 10vh, 7rem);
  width: min(34vw, 24rem);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  background: url("../../website/images/Defeated-Realms-Logo-Square.png") center / contain no-repeat;
  opacity: 0.055;
  filter: sepia(1) saturate(0.8) drop-shadow(0 0 2rem rgba(192, 147, 79, 0.16));
}

.wrapper,
#clientwrapper {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(5, 4, 3, 0.24), rgba(5, 4, 3, 0.78));
}

a:link,
a:visited {
  color: var(--dr-gold-bright);
  text-decoration: none;
}

a:hover,
a:active {
  color: var(--dr-text);
  text-decoration: underline;
  font-weight: inherit;
}

.hidden {
  display: none !important;
}

/* -------------------------------------------------------------------------
   Main output area
------------------------------------------------------------------------- */

#messagewindow {
  position: relative;
  height: 100%;
  padding: 1rem 1.2rem 7.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: break-word;
  scrollbar-width: thin;
  scrollbar-color: var(--dr-gold) rgba(5, 4, 3, 0.78);
  background:
    linear-gradient(180deg, rgba(13, 11, 8, 0.18), rgba(5, 4, 3, 0.48));
}

#messagewindow::-webkit-scrollbar,
.dialogcontent::-webkit-scrollbar,
.split::-webkit-scrollbar {
  width: 0.72rem;
  height: 0.72rem;
}

#messagewindow::-webkit-scrollbar-track,
.dialogcontent::-webkit-scrollbar-track,
.split::-webkit-scrollbar-track {
  background: rgba(5, 4, 3, 0.82);
}

#messagewindow::-webkit-scrollbar-thumb,
.dialogcontent::-webkit-scrollbar-thumb,
.split::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--dr-gold-bright), var(--dr-gold));
  border: 2px solid rgba(5, 4, 3, 0.86);
}

#messagewindow::-webkit-scrollbar-thumb:hover,
.dialogcontent::-webkit-scrollbar-thumb:hover,
.split::-webkit-scrollbar-thumb:hover {
  background: var(--dr-gold-bright);
}

.content,
.split-sub {
  position: relative;
  background:
    linear-gradient(180deg, rgba(18, 13, 8, 0.78), rgba(5, 4, 3, 0.88)) !important;
  border: 1px solid var(--dr-border) !important;
  box-shadow:
    inset 0 0 2.4rem rgba(0, 0, 0, 0.72),
    0 1rem 2.5rem rgba(0, 0, 0, 0.36) !important;
  color: var(--dr-text);
}

.content::before,
.split-sub::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid rgba(192, 147, 79, 0.12);
  pointer-events: none;
}

.content {
  padding: 1rem 1.15rem;
}

.split {
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.tabspace {
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
}

/* -------------------------------------------------------------------------
   Evennia message classes
------------------------------------------------------------------------- */

.out {
  color: var(--dr-text);
  background: transparent !important;
  white-space: pre-wrap;
}

/* Echoed input: quieter, like scratched notes in the margin. */
.inp {
  color: #8f8069;
  text-shadow: none;
}

/* System messages: tarnished gold. */
.sys {
  color: var(--dr-gold-bright);
  text-shadow: 0 0 0.6rem rgba(224, 189, 114, 0.22);
}

/* Errors: blood red, readable without being neon. */
.err {
  color: #ff6b6f;
  text-shadow: 0 0 0.65rem rgba(168, 50, 54, 0.32);
}

.prompt {
  max-height: 3.4rem;
  color: var(--dr-gold-bright);
  text-shadow: 0 0 0.55rem rgba(224, 189, 114, 0.22);
}

strong {
  color: #fff3d7;
  font-weight: 700;
}

.underline {
  text-decoration: underline;
  text-decoration-color: var(--dr-gold);
  text-underline-offset: 0.18em;
}

.inverse {
  color: var(--dr-black);
  background: var(--dr-gold-bright);
  outline: 1px dotted var(--dr-text);
}

.blink {
  animation: blink-animation 1s steps(5, start) infinite;
  -webkit-animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
  to { visibility: hidden; }
}

@-webkit-keyframes blink-animation {
  to { visibility: hidden; }
}

/* MXP / clickable links in output. */
#mxplink,
.mxplink,
.out a,
.sys a {
  color: var(--dr-gold-bright) !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

#mxplink:hover,
.mxplink:hover,
.out a:hover,
.sys a:hover {
  color: var(--dr-text) !important;
}

/* -------------------------------------------------------------------------
   Input bar
------------------------------------------------------------------------- */

#input {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 100%;
  min-height: 3.35rem;
  background:
    linear-gradient(180deg, rgba(48, 34, 22, 0.96), rgba(5, 4, 3, 0.98));
  border-top: 1px solid var(--dr-border-strong);
  box-shadow:
    0 -1.2rem 2.4rem rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(224, 189, 114, 0.18);
}

#input::before {
  content: "";
  position: absolute;
  inset: 0.35rem;
  border: 1px solid rgba(192, 147, 79, 0.12);
  pointer-events: none;
}

#inputcontrol {
  height: 100%;
}

#inputfield,
#inputsizer {
  min-height: 3.35rem;
  height: 100%;
  padding: 0.78rem 0.85rem;
  background: rgba(5, 4, 3, 0.72) !important;
  color: var(--dr-text) !important;
  border: 0 !important;
  border-left: 1px solid rgba(192, 147, 79, 0.22) !important;
  border-right: 1px solid rgba(192, 147, 79, 0.22) !important;
  border-radius: 0 !important;
  box-shadow:
    inset 0 0 1.2rem rgba(0, 0, 0, 0.82),
    inset 0 0 0 1px rgba(224, 189, 114, 0.06);
  font-family: var(--dr-font-mono);
  font-size: 1.02rem;
  line-height: 1.45;
  resize: none;
  caret-color: var(--dr-gold-bright);
  outline: none;
}

#inputfield::placeholder {
  color: var(--dr-dim);
}

#inputfield:focus {
  background: rgba(5, 4, 3, 0.88) !important;
  box-shadow:
    inset 0 0 1.25rem rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(224, 189, 114, 0.38),
    0 0 1.35rem rgba(192, 147, 79, 0.16) !important;
}

#inputsend {
  height: 100%;
  min-width: 3.4rem;
  border-radius: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--dr-border) !important;
  background:
    linear-gradient(180deg, rgba(168, 50, 54, 0.92), rgba(117, 30, 33, 0.96)) !important;
  color: #fff !important;
  text-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.85);
  box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.35);
}

#inputsend:hover,
#inputsend:focus {
  background:
    linear-gradient(180deg, rgba(188, 64, 68, 0.96), rgba(117, 30, 33, 1)) !important;
  color: #fff !important;
  box-shadow:
    inset 0 0 1rem rgba(0, 0, 0, 0.28),
    0 0 1.25rem rgba(168, 50, 54, 0.3);
}

/* -------------------------------------------------------------------------
   Toolbar controls
------------------------------------------------------------------------- */

#toolbar {
  position: fixed;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 8;
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(5, 4, 3, 0.72);
  border: 1px solid var(--dr-border);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

#splitbutton,
#panebutton,
#undobutton,
#optionsbutton,
.button,
button,
.btn {
  color: var(--dr-gold-bright) !important;
  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.94), rgba(5, 4, 3, 0.96)) !important;
  border: 1px solid var(--dr-border) !important;
  border-radius: 0 !important;
  box-shadow:
    inset 0 0 0.75rem rgba(192, 147, 79, 0.04),
    0 0.45rem 1rem rgba(0, 0, 0, 0.46);
  text-shadow: 0 0.2rem 0.45rem rgba(0, 0, 0, 0.8);
}

#splitbutton,
#panebutton,
#undobutton,
#optionsbutton {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
}

#splitbutton:hover,
#panebutton:hover,
#undobutton:hover,
#optionsbutton:hover,
.button:hover,
button:hover,
.btn:hover {
  color: var(--dr-text) !important;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(117, 30, 33, 0.88), rgba(35, 26, 17, 0.96)) !important;
  border-color: var(--dr-border-strong) !important;
  box-shadow:
    0 0.65rem 1.4rem rgba(0, 0, 0, 0.58),
    0 0 1.2rem rgba(192, 147, 79, 0.16);
}

.splitbutton:hover {
  cursor: pointer;
}

/* -------------------------------------------------------------------------
   Dialogs: options, help, popups
------------------------------------------------------------------------- */

.dialog {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  max-width: min(92vw, 860px);
  transform: translate(-50%, -55%);
  color: var(--dr-text);
  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.98), rgba(5, 4, 3, 0.98)) !important;
  border: 1px solid var(--dr-border-strong) !important;
  box-shadow:
    0 2rem 5rem rgba(0, 0, 0, 0.9),
    inset 0 0 2rem rgba(192, 147, 79, 0.05);
}

.dialog::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  z-index: -1;
  border: 1px solid rgba(192, 147, 79, 0.18);
  pointer-events: none;
}

#optionsdialog {
  width: min(52rem, 90vw);
}

#helpdialog {
  width: min(54rem, 92vw);
  height: min(65vh, 42rem);
}

.dialogtitle {
  padding: 0.95rem 1.25rem;
  color: var(--dr-gold-bright) !important;
  background:
    linear-gradient(90deg, rgba(117, 30, 33, 0.82), rgba(35, 26, 17, 0.92)) !important;
  border-bottom: 1px solid var(--dr-border) !important;
  font-family: var(--dr-font-body);
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0.25rem 0.7rem rgba(0, 0, 0, 0.9);
  user-select: none;
  cursor: move;
}

.dialogclose {
  float: right;
  color: var(--dr-muted) !important;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
}

.dialogclose:hover,
.dialogclose:focus {
  color: var(--dr-text) !important;
  text-decoration: none;
  cursor: pointer;
}

.dialogcontentparent {
  height: calc(100% - 44px - 40px);
}

.dialogcontent,
#helpdialog .dialogcontent {
  height: 100%;
  padding: 1.25rem;
  overflow: auto;
  color: var(--dr-text) !important;
  background:
    linear-gradient(180deg, rgba(13, 11, 8, 0.94), rgba(5, 4, 3, 0.98)),
    url("../../website/images/parchment-bg.webp") !important;
  background-size: cover !important;
  background-blend-mode: multiply;
}

.dialogcontent h1,
.dialogcontent h2,
.dialogcontent h3,
.dialogcontent h4,
.dialogcontent h5,
.dialogcontent h6 {
  color: var(--dr-gold-bright);
  font-family: var(--dr-font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dialogcontent p,
.dialogcontent li,
.dialogcontent label,
.dialogcontent td,
.dialogcontent th {
  color: var(--dr-muted);
}

/* -------------------------------------------------------------------------
   Cards, panes, tables and HTML sent by the game
------------------------------------------------------------------------- */

.card,
.panel,
.window,
.evennia-dialog,
.evennia-output,
.html-message {
  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.94), rgba(8, 6, 4, 0.96)) !important;
  border: 1px solid var(--dr-border) !important;
  border-radius: 0 !important;
  color: var(--dr-text) !important;
  box-shadow:
    0 1rem 2rem rgba(0, 0, 0, 0.58),
    inset 0 0 2rem rgba(192, 147, 79, 0.04);
}

.card-header,
.card-title,
.panel-title,
.window-title {
  color: var(--dr-gold-bright) !important;
  background:
    linear-gradient(90deg, rgba(117, 30, 33, 0.72), rgba(35, 26, 17, 0.2)) !important;
  border-bottom: 1px solid var(--dr-border) !important;
  font-family: var(--dr-font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  color: var(--dr-text);
}

th,
td {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(192, 147, 79, 0.18);
}

th {
  color: var(--dr-gold-bright);
  background: rgba(117, 30, 33, 0.24);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  background: rgba(5, 4, 3, 0.24);
}

tr:hover td {
  background: rgba(192, 147, 79, 0.07);
}

hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--dr-border-strong), transparent);
}

blockquote {
  margin: 0.75rem 0;
  padding: 0.8rem 1rem;
  color: var(--dr-muted);
  background: rgba(5, 4, 3, 0.36);
  border-left: 3px solid var(--dr-gold);
}

pre,
code {
  color: #ffe6b0;
  background: rgba(5, 4, 3, 0.66);
  border: 1px solid rgba(192, 147, 79, 0.2);
  border-radius: 0;
  font-family: var(--dr-font-mono);
}

pre {
  padding: 0.75rem;
  overflow: auto;
}

/* -------------------------------------------------------------------------
   Forms inside dialogs/options
------------------------------------------------------------------------- */

input,
textarea,
select,
.form-control {
  color: var(--dr-text) !important;
  background: rgba(5, 4, 3, 0.78) !important;
  border: 1px solid var(--dr-border) !important;
  border-radius: 0 !important;
  box-shadow: inset 0 0 0.8rem rgba(0, 0, 0, 0.55);
  font-family: var(--dr-font-mono);
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
  border-color: var(--dr-gold-bright) !important;
  box-shadow:
    inset 0 0 0.8rem rgba(0, 0, 0, 0.66),
    0 0 0 0.16rem rgba(192, 147, 79, 0.18) !important;
  outline: none !important;
}

label,
legend {
  color: var(--dr-gold-bright);
  font-family: var(--dr-font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select option {
  color: var(--dr-text);
  background: var(--dr-bg);
}

/* -------------------------------------------------------------------------
   Split gutters / pane resizing
------------------------------------------------------------------------- */

.gutter {
  background-color: rgba(192, 147, 79, 0.24) !important;
  background-repeat: no-repeat;
  background-position: 50%;
  box-shadow: inset 0 0 0.35rem rgba(0, 0, 0, 0.8);
}

.gutter:hover {
  background-color: rgba(224, 189, 114, 0.38) !important;
}

.gutter.gutter-vertical {
  cursor: row-resize;
  border-top: 1px solid rgba(224, 189, 114, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.8);
}

.gutter.gutter-horizontal {
  cursor: col-resize;
  border-left: 1px solid rgba(224, 189, 114, 0.2);
  border-right: 1px solid rgba(0, 0, 0, 0.8);
}

.split.split-horizontal,
.gutter.gutter-horizontal {
  height: 100%;
  float: left;
}

/* -------------------------------------------------------------------------
   Connection notice / alerts
------------------------------------------------------------------------- */

#connecting {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 4.25rem;
  z-index: 10;
  width: auto;
  padding: 0.9rem 1.15rem;
  color: var(--dr-gold-bright);
  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.96), rgba(5, 4, 3, 0.96));
  border: 1px solid var(--dr-border-strong);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.74);
  font-family: var(--dr-font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alert,
.notification,
.toast {
  color: var(--dr-text) !important;
  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.98), rgba(5, 4, 3, 0.98)) !important;
  border: 1px solid var(--dr-border) !important;
  border-radius: 0 !important;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.62);
}

.alert-danger,
.error,
.toast-error {
  border-color: rgba(168, 50, 54, 0.72) !important;
  color: #ffb5b7 !important;
}

.alert-success,
.success,
.toast-success {
  border-color: rgba(111, 137, 72, 0.72) !important;
  color: #dce9b8 !important;
}

/* -------------------------------------------------------------------------
   Optional semantic classes for future in-game HTML output
   You can use these when sending html= messages from Evennia.
------------------------------------------------------------------------- */

.dr-box,
.dr-lore,
.dr-warning,
.dr-location,
.dr-combat,
.dr-magic {
  display: block;
  margin: 0.65rem 0;
  padding: 0.8rem 1rem;
  background: rgba(5, 4, 3, 0.46);
  border: 1px solid var(--dr-border);
  box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.45);
}

.dr-lore {
  border-left: 3px solid var(--dr-gold);
  color: var(--dr-muted);
}

.dr-warning,
.dr-combat {
  border-left: 3px solid var(--dr-red-bright);
}

.dr-location {
  border-left: 3px solid var(--dr-green);
}

.dr-magic {
  border-left: 3px solid var(--dr-purple);
}

.dr-title-line {
  display: block;
  color: var(--dr-gold-bright);
  font-family: var(--dr-font-body);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   Mobile and small screens
------------------------------------------------------------------------- */

@media screen and (max-width: 760px) {
  body {
    font-size: 0.86rem;
    line-height: 1.42;
  }

  body::after {
    width: 52vw;
    right: -8vw;
    top: 5rem;
    opacity: 0.04;
  }

  #messagewindow {
    padding: 0.75rem 0.75rem 6.5rem;
  }

  #toolbar {
    top: 0.45rem;
    right: 0.45rem;
    gap: 0.25rem;
    padding: 0.25rem;
  }

  #splitbutton,
  #panebutton,
  #undobutton,
  #optionsbutton {
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
  }

  #inputfield,
  #inputsizer {
    min-height: 3.1rem;
    padding: 0.65rem;
    font-size: 0.9rem;
  }

  #inputsend {
    min-width: 3rem;
  }

  #optionsdialog,
  #helpdialog,
  .dialog {
    width: 94vw !important;
    max-width: 94vw;
  }

  #helpdialog {
    height: 72vh;
  }

  .dialogcontent {
    padding: 1rem;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  #messagewindow {
    padding-bottom: 6.1rem;
  }

  .content {
    padding: 0.7rem;
  }
}

/* -------------------------------------------------------------------------
   Reduced motion
------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* -------------------------------------------------------------------------
   Defeated Realms Webclient - top/bottom bar correction
   Append this at the END of web/static/webclient/css/custom.css

   Purpose:
   - Let Evennia/Split.js control the input pane instead of forcing it fixed.
   - Remove the extra bottom strip / duplicated border effect.
   - Restyle the top tab bar so it reads as part of the medieval UI.
------------------------------------------------------------------------- */

/* The main message area no longer needs fake space for a fixed input bar. */
#messagewindow {
  padding: 1rem 1.2rem 1rem !important;
  height: 100% !important;
}

/* Evennia's input area is already managed by the webclient layout.
   Do not pin it to the viewport, or it creates the heavy extra bottom band. */
#input {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background:
    linear-gradient(180deg, rgba(18, 13, 8, 0.96), rgba(5, 4, 3, 0.98)) !important;
  border: 1px solid rgba(192, 147, 79, 0.42) !important;
  box-shadow:
    inset 0 0 2rem rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(224, 189, 114, 0.12) !important;
}

#input::before {
  inset: 0.45rem !important;
  border-color: rgba(192, 147, 79, 0.13) !important;
}

#inputcontrol {
  position: relative !important;
  height: 100% !important;
  min-height: 3rem !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 2.4rem !important;
  align-items: stretch !important;
}

#inputfield,
#inputsizer {
  min-height: 3rem !important;
  height: 100% !important;
  padding: 0.75rem 0.85rem !important;
  background: rgba(5, 4, 3, 0.58) !important;
  border: 0 !important;
  border-right: 1px solid rgba(192, 147, 79, 0.28) !important;
  box-shadow: inset 0 0 1.15rem rgba(0, 0, 0, 0.82) !important;
}

#inputsend {
  width: 2.4rem !important;
  min-width: 2.4rem !important;
  height: 100% !important;
  border: 0 !important;
  border-left: 1px solid rgba(192, 147, 79, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(39, 28, 18, 0.96), rgba(13, 9, 6, 0.98)) !important;
  color: var(--dr-gold-bright) !important;
  box-shadow: inset 0 0 1.2rem rgba(192, 147, 79, 0.08) !important;
}

#inputsend:hover,
#inputsend:focus {
  background:
    linear-gradient(180deg, rgba(117, 30, 33, 0.92), rgba(39, 28, 18, 0.98)) !important;
  color: #fff !important;
}

/* Hide/soften default pane labels such as the small "input" tab label,
   unless your local webclient depends on them being visible. */
#input > label,
#input .label,
#input .pane-label,
#input .split-label,
#input .window-title {
  color: var(--dr-gold-bright) !important;
  background: rgba(5, 4, 3, 0.95) !important;
  border: 1px solid rgba(192, 147, 79, 0.32) !important;
  border-bottom: 0 !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* Top pane/tab bar: catches jQuery UI tabs and Evennia tab-like headers. */
.ui-tabs,
.ui-widget,
.ui-widget-content,
.tabs,
.tab-container,
.pane-tabs,
.window-tabs {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--dr-text) !important;
  font-family: var(--dr-font-mono) !important;
}

.ui-tabs .ui-tabs-nav,
ul.ui-tabs-nav,
.tabs ul,
.tab-list,
.pane-tabs,
.window-tabs {
  min-height: 2rem !important;
  margin: 0 !important;
  padding: 0.25rem 0.35rem 0 !important;
  background:
    linear-gradient(180deg, rgba(31, 22, 14, 0.96), rgba(5, 4, 3, 0.96)) !important;
  border: 1px solid rgba(192, 147, 79, 0.42) !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow:
    inset 0 0 1.4rem rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(224, 189, 114, 0.13) !important;
}

.ui-tabs .ui-tabs-nav li,
ul.ui-tabs-nav li,
.tabs li,
.tab,
.pane-tab,
.window-tab {
  top: auto !important;
  margin: 0 0.25rem 0 0 !important;
  padding: 0 !important;
  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.92), rgba(12, 9, 6, 0.96)) !important;
  border: 1px solid rgba(192, 147, 79, 0.32) !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: inset 0 0 0.9rem rgba(0, 0, 0, 0.52) !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active,
ul.ui-tabs-nav li.ui-tabs-active,
.tabs li.active,
.tab.active,
.pane-tab.active,
.window-tab.active {
  background:
    linear-gradient(180deg, rgba(117, 30, 33, 0.78), rgba(35, 26, 17, 0.96)) !important;
  border-color: rgba(224, 189, 114, 0.72) !important;
}

.ui-tabs .ui-tabs-nav .ui-tabs-anchor,
ul.ui-tabs-nav a,
.tabs a,
.tab a,
.pane-tab a,
.window-tab a {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 1.6rem !important;
  padding: 0.2rem 0.75rem !important;
  color: var(--dr-muted) !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-size: 0.72rem !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
ul.ui-tabs-nav li.ui-tabs-active a,
.tabs li.active a,
.tab.active a,
.pane-tab.active a,
.window-tab.active a {
  color: var(--dr-gold-bright) !important;
}

.ui-tabs .ui-tabs-panel {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

/* Generic close/maximise/minimise buttons in the top-right corner. */
.ui-button,
.ui-dialog-titlebar-close,
.window-close,
.window-minimize,
.window-maximize,
.pane-close,
.pane-minimize,
.pane-maximize {
  width: 1.35rem !important;
  height: 1.35rem !important;
  min-width: 1.35rem !important;
  padding: 0 !important;
  color: var(--dr-gold-bright) !important;
  background: rgba(5, 4, 3, 0.75) !important;
  border: 1px solid rgba(192, 147, 79, 0.38) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ui-button:hover,
.ui-dialog-titlebar-close:hover,
.window-close:hover,
.window-minimize:hover,
.window-maximize:hover,
.pane-close:hover,
.pane-minimize:hover,
.pane-maximize:hover {
  color: #fff !important;
  background: rgba(117, 30, 33, 0.85) !important;
  border-color: rgba(224, 189, 114, 0.72) !important;
}

/* Split gutters should look intentional, not like accidental thick bars. */
.gutter.gutter-vertical {
  height: 7px !important;
  background:
    linear-gradient(180deg, rgba(224, 189, 114, 0.18), rgba(5, 4, 3, 0.92), rgba(224, 189, 114, 0.12)) !important;
  border-top: 1px solid rgba(192, 147, 79, 0.34) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.9) !important;
}

.gutter.gutter-horizontal {
  width: 7px !important;
  background:
    linear-gradient(90deg, rgba(224, 189, 114, 0.18), rgba(5, 4, 3, 0.92), rgba(224, 189, 114, 0.12)) !important;
  border-left: 1px solid rgba(192, 147, 79, 0.34) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.9) !important;
}

/* Make content panes align cleanly with the new bars. */
.content,
.split-sub {
  border-color: rgba(192, 147, 79, 0.42) !important;
  box-shadow:
    inset 0 0 2.2rem rgba(0, 0, 0, 0.78),
    0 0.75rem 1.8rem rgba(0, 0, 0, 0.35) !important;
}

/* ------------------------------------------------------
   Remove / tame Evennia connecting status bar
------------------------------------------------------ */

/* Hide the empty floating connecting bar */
#connecting:empty {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* If Evennia puts text inside it during reconnecting,
   show it as a small themed status notice instead of a full bar */
#connecting:not(:empty) {
  position: fixed !important;
  top: 0.75rem !important;
  right: 0.75rem !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 9999 !important;

  width: auto !important;
  max-width: 22rem !important;
  height: auto !important;
  min-height: 0 !important;

  padding: 0.55rem 0.85rem !important;
  margin: 0 !important;

  background:
    linear-gradient(180deg, rgba(35, 26, 17, 0.96), rgba(7, 5, 3, 0.96)) !important;
  border: 1px solid rgba(224, 189, 114, 0.72) !important;
  box-shadow:
    0 0.75rem 2rem rgba(0, 0, 0, 0.8),
    inset 0 0 1.2rem rgba(192, 147, 79, 0.08) !important;

  color: #e0bd72 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
}