body{margin:0;padding:0;height:100%;font-family:Lato;font-size:14px;line-height:1.42857143;background-image: url(/images/skin_v2/bg.jpg);}

#wrapper{min-height:100%;position:relative;}
#layout{
    background-image:url(/images/avalon2/content_bg_left_2.jpg), url(/images/avalon2/content_bg_right_2.jpg),url(/images/avalon2/content_main.jpg);
    background-position:left,right,center;
    background-repeat:repeat-y, repeat-y,repeat;
    padding: 0 60px 150px 60px;
}
#header{
    padding-left: 0;
}


#navigation {
    min-width: 238px;
    background-image: url("/images/avalon2/menu-top-2.png"), url("/images/avalon2/menu-bottom-2.png"), url("menu-body-2.png") ;
    background-position: top,bottom,center;
    background-repeat: no-repeat,no-repeat, repeat-y;
    padding-top: 30px;
    padding-left: 40px;
    padding-bottom: 20px;
    max-height: fit-content;
}

#navigation img {
    margin-top: -6px;
}
.navbar {
    padding-left: 0;
}

.menu-left-item{
    margin-bottom: 10px;
}
#navigation > div > a:hover{
    text-decoration: none;
}


@media only screen and (min-width: 768px){
    .mobile-only{display:none;}

}



@media only screen and (max-width: 840px){
    .mobile-only{display:block;}
    .hide-on-mobile{display:none !important;}
    .img-responsive{max-height:100px;}
    .tcell{display:table-cell !important;}
    .center-on-mobile{text-align: center;}

    #layout{
        background-image:url(/images/avalon2/content_main.jpg);
        background-repeat:repeat;
        padding: 0 0 50px 0;
    }

    /* Phones: drop the stacked Bootstrap gutters (about 30px a side) and keep one 10px edge. */
    #background, #layout, #layout > .container{
        padding-left: 0;
        padding-right: 0;
        max-width: none;
    }
    #layout > .container > .row{
        margin-left: 0;
        margin-right: 0;
    }
    #main-content, #header{
        padding-left: 10px;
        padding-right: 10px;
    }
    /* Bootstrap rows pull out 15px; match the 10px edge so nothing spills sideways. */
    #main-content .row:not(.no-gutters){
        margin-left: -10px;
        margin-right: -10px;
    }

    #announcements img{
        display: none;
    }

    h1{
        font-size: 1.5em;
    }

    img{
        max-width: 80vw;
    }

}

a, a:visited {
    color: #663602;
    text-decoration: none;
}

a:hover {
    color: #000000;
    text-decoration: underline;
}

#layout b {
    color: #663300;
}
#navigation a:hover{
    text-decoration: none;
}

.tblAlignCenter{
    text-align:center;
}

/* Table headers: the same dark bronze as the Explore district bars and the Help Centre headings
   (it was the old light wood picture, images/top_bg.jpg). Bootstrap's .table paints every cell white
   with !important, hence the !important on the header cells. */
.tblHead{
    color: #fff4dc;
    font-weight:bold;
    text-align:center;
    font-size:120%;
    border: solid 1px #483018;
    background: linear-gradient(#5e3c1d, #3f2812);
}
.tblHead > td,
.tblHead > th,
.table .tblHead > td,
.table .tblHead > th,
.table > thead > tr > th,
.table > tbody > tr:first-child > th,
.table > tr:first-child > th {
    color: #fff4dc !important;
    background: linear-gradient(#5e3c1d, #3f2812) !important;
    border-color: #483018 !important;
    font-weight: bold;
}

table .tblHead a  {
    color: #fff4dc;
    text-decoration: underline;
}

table .tblHead a:hover  {
    color: #ffffff;
}

td{
    vertical-align:top;
    border-style: none;
    padding: 5px;

}

.tblHead2{
    color: #663300;
    font-weight:bold;
    text-align:center;
}

h1, h2, h3, h4, h5, h6 {
    color: #663300;
}


table {
    color: #1b1e21;
}

.tblHead {
    text-align: center;
    font-weight: bold;
    font-size: 110%;
}

.ruler{
    width:30%;
    color:#663300;
}
#title {
    text-align:center;
    font-size:150%;
    font-weight:bold;
    color: #663300;
}

.smallText{
    font-size:95%;
}

.tHead {
    border: 0px solid #000000;
}

.online {
    color:#009900;
    font-weight:bold;
}

.offline {
    color:#990000;
    font-weight:bold;
}

.button{
    background-color:#663300;
    color: #f3f3f3;
    font-size: 1em;
    font-family: 'Cinzel Decorative', cursive;
    padding: 10px;
}

/* Bronze button for class="btn button", used across the game. Overrides .button above. */
.btn.button {
  appearance: none;
  min-height: 44px;
  padding: 10px 24px;

  border: 3px solid #98703b;
  border-radius: 9px;

  background:
    radial-gradient(
      ellipse at top,
      rgba(166, 119, 63, 0.15),
      transparent 75%
    ),
    linear-gradient(#382719, #241a12);

  color: #f5e6c6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.2;
  letter-spacing: 0.4px;
  text-align: center;
  text-shadow: 0 1px 1px #120c08;

  box-shadow:
    0 0 0 1px #483018,
    inset 0 0 0 1px #d3ae6b,
    inset 0 3px 3px rgba(255, 223, 157, 0.25),
    inset 0 -3px 4px rgba(0, 0, 0, 0.65),
    0 3px 4px rgba(35, 22, 10, 0.35);

  cursor: pointer;
  transition:
    border-color 120ms ease,
    color 120ms ease;
}

.btn.button:hover:not(:disabled) {
  border-color: #bd9556;
  color: #fff5dd;
}

.btn.button:focus,
/* :not(:disabled) lifts this to 0-4-0 so it beats Bootstrap 4.0's
   .btn:not(:disabled):not(.disabled):active { background-image: none } */
.btn.button:active:not(:disabled) {
  background:
    radial-gradient(
      ellipse at top,
      rgba(166, 119, 63, 0.15),
      transparent 75%
    ),
    linear-gradient(#382719, #241a12);

  color: #f5e6c6;
  border-color: #98703b;
  text-shadow: 0 1px 1px #120c08;
}

.btn.button:focus:not(:focus-visible) {
  outline: none;
}

.btn.button:focus-visible {
  outline: 2px solid #805018;
  outline-offset: 3px;
}

.btn.button:active:not(:disabled) {
  transform: translateY(1px);

  box-shadow:
    0 0 0 1px #483018,
    inset 0 0 0 1px #ad8248,
    inset 0 3px 7px rgba(0, 0, 0, 0.65);
}

.btn.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .btn.button {
    transition: none;
  }
}

/* Compact size, so buttons sit in line with table text. Overrides the
   size values in the .btn.button rule above; the bronze styling stays. */
.btn.button {
  box-sizing: border-box;
  min-height: 32px;
  padding: 6px 14px;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.2px;
  border-width: 2px;
  border-radius: 7px;
}

table{
    text-align:left;
    font-size:95%;
}

.quote {
    width:95%;
    margin-right:auto;
    margin-left:auto;
    margin-top:1%;
    border:1px solid black;
    font-size:100%;

}

.quote #text {
    padding: 3px;
}

.quote {
    width:95%;
    margin-right:auto;
    margin-left:auto;
    margin-top:1%;
    border:1px solid black;
    font-size:100%;

}

.quote #text {
    padding: 3px;
}

.quoting{
    padding: 2px;
    background-color:#6b6b6b;
    color:#ffffff;
    font-weight:bold;
    font-style:italic;
}

.noble{
    color:#ff9900;
}

.admin{
    color:#ff0000;
}

.mod{
    color:#009999;
}

.adrmove{
    background-color: #fff;
    border: 1px solid #cccccc;
    margin:5px;
    padding:5px;
    color:#ff0000;
    font-weight:bold;
}

h1,h2,h3,h4 {	font-family: 'Cinzel Decorative', cursive;

}

.title{
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.75rem;
    text-align: center;
}


.mobile-status-bar{
    height: 10px;width: 80%; border: 1px solid green; padding: 1px;
    margin: 0 auto;
}

.player-status{
    padding: 5px 0 5px 0;
}

.menu-top-item{
    padding: 10px;
    border: 1px solid #cccccc;
    background-color: white;
    min-width: 100px;
    font-size: 11px;
}

#announcements a {
    white-space: nowrap;
    width:100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

#announcements img{
    max-width: 200px;
}

.user-profile-box {
    padding-top: 15px;
    padding-bottom: 15px;
}

.avatar{
    position: relative;
    height: 182px;
    width: 172px;
    margin: 0 auto;
}


.avatar-overlay{
    width: 100%;
    height: 100%;
    position: absolute;
    top: -16px;
    left: 0;
    background-image: url("/images/avalon2/avatarbg.png");
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.show-if-no-sidebar{display:none;}

.on-page-guide{
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
    position: relative;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}


.equipment {
    -webkit-filter: drop-shadow(5px 5px 5px #222);
    filter: drop-shadow(5px 5px 5px #222);
}

.equipment-detail {
    width: 175px;
    line-height: 34px;
}
/* The item details row is .no-gutters, which takes the side padding off every cell. */
.no-gutters > .equipment-detail {
    padding-left: 12px;
    padding-right: 12px;
}

.profile-action {
    width: 100px;
}

.atrium .card-img-top, .atrium-shop-item img{
    margin: 0 auto;
    width: 80%;
    max-width: 150px;
    max-height: 150px;
}

.atrium-menu img{
    max-width: 75px;
    max-height: 75px;
}

.atrium-race-map {
    width: 300px;
}

.atrium-race-map img{
    margin: 2px auto;
    width: 80%;
    max-width: 250px;
}

.atrium .card-text {	font-family: 'Cinzel Decorative', cursive;
    font-weight: bold;
}


#arrowchat_base {
    border-left: 0;
}

/* The chat bar is fixed to the bottom of the screen on desktop (35px tall), so leave room below
   the page for it; otherwise it covers the last buttons and text. */
@media (min-width: 768px) {
    body { padding-bottom: 48px; }
    #road-badge { bottom: 52px !important; }
}

.arrowchat_giphy_search {
    border: 0;
    outline: 0;
    width: 100%;
    margin: -7px -9px;
}

.arrowchat_bar_button {
    border-right: 1px solid transparent;
    border-left: 1px solid #663300;
}

#arrowchat_buddy_list_tab {
    border-right: 1px solid #663300 !important;
}

/* Forums, laid out like the Rise of Clans forums in Avalon's colours. */
.forums {
    --forum-ink: #663300;
    --forum-line: #d8c4a0;
    --forum-row: rgba(255, 255, 255, 0.82);
    --forum-row-alt: rgba(246, 239, 226, 0.9);
    --forum-muted: #6f5a43;
    text-align: left;
}

.forum-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 4px 0 12px;
}
.forum-crumbs {
    font-size: 15px;
    font-weight: bold;
}
.forum-bar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.forum-bar-link {
    font-size: 13px;
}
.forum-search {
    display: flex;
    gap: 6px;
    margin: 0;
}
.forum-search .form-control {
    width: 180px;
    min-height: 32px;
    background-color: #fffdf8;
    border-color: var(--forum-line);
}

/* Forum index: one row per forum. */
.forum-list {
    border-top: 1px solid var(--forum-line);
}
.forum-row {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    background: var(--forum-row);
    border-bottom: 1px solid var(--forum-line);
}
.forum-row:nth-child(even) {
    background: var(--forum-row-alt);
}
.forum-row-main {
    flex: 1;
    min-width: 0;
}
.forum-name {
    margin: 0 0 2px;
    font-size: 1.15rem;
    font-weight: bold;
}
.forum-desc {
    color: #1b1e21;
}
.forum-row-stats {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--forum-muted);
    font-size: 13px;
    white-space: nowrap;
}
.forum-row-stats b {
    color: var(--forum-ink);
}
.forum-meta {
    display: block;
    color: var(--forum-muted);
    margin-top: 2px;
}
.forum-new,
.forum-staff {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    vertical-align: middle;
}
.forum-new {
    background: #3f7a2b;
    color: #fff;
}
.forum-staff {
    background: #663300;
    color: #f5e6c6;
}
.forum-mark-read {
    font-size: 12px;
    font-weight: normal;
    margin-left: 4px;
}
a.new {
    font-weight: bold;
}

/* Thread list. */
.forum-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 100%;
}
.forum-table thead th {
    padding: 8px 12px;
    text-align: left;
}
.forum-table td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--forum-line);
    background: var(--forum-row);
}
.forum-table tbody tr:nth-child(even) td {
    background: var(--forum-row-alt);
}
.forum-table .forum-last {
    width: 30%;
    font-size: 13px;
}
.forum-title {
    font-size: 1.05rem;
}

/* Thread view: posts with the author on the left and the time on the right. */
.forum-thread-title {
    margin: 0 0 10px;
}
#topic-posts {
    border-bottom: 1px solid var(--forum-line);
    margin-bottom: 0;
}
.forums .post {
    padding: 10px 14px 6px;
    background: var(--forum-row);
    border-top: 1px solid var(--forum-line);
    overflow-wrap: anywhere;
}
.forums .post:nth-child(even) {
    background: var(--forum-row-alt);
}
.post-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2px 12px;
    margin-bottom: 8px;
}
.post-author {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* The poster's avatar beside their name (the forums had none). */
.post-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--forum-line);
    background: #2a1c10;
    display: block;
}
.post-avatar-link {
    flex: 0 0 auto;
}
.post-child .post-avatar {
    width: 36px;
    height: 36px;
}
.post-author small {
    display: block;
    font-weight: normal;
    color: var(--forum-muted);
}
.post-time {
    color: var(--forum-muted);
    font-size: 13px;
}
.post-body img {
    max-width: 100%;
    height: auto;
}
.post-edited {
    margin-top: 8px;
    font-size: 12px;
    font-style: italic;
    color: var(--forum-muted);
}
.post-sig {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--forum-line);
    max-width: 100%;
    font-size: 12px;
    color: var(--forum-muted);
}

/* Edit, Quote and moderator links show when you point at a post, like Rise of Clans.
   Touch screens cannot hover, so there they always show. */
.forum-options {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
    text-align: right;
}
.forum-meta .forum-options,
.forum-name .forum-options {
    display: inline;
    margin: 0 0 0 6px;
    font-size: 12px;
    font-family: Lato, sans-serif;
    font-weight: normal;
    text-transform: none;
}
.forum-options a {
    margin-left: 12px;
}
.forum-meta .forum-options a,
.forum-name .forum-options a {
    margin: 0 0 0 8px;
}
@media (hover: hover) {
    .forum-options {
        visibility: hidden;
    }
    .post:hover .forum-options,
    .post:focus-within .forum-options,
    .forum-item:hover .forum-options,
    .forum-item:focus-within .forum-options,
    .forum-row:hover .forum-options,
    .forum-row:focus-within .forum-options {
        visibility: visible;
    }
}

/* "Reply to Thread" bar: sits under the thread title and sticks to the top of the
   screen while reading, as on Rise of Clans. It opens the reply window. */
.forum-reply-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 8px;
}
.forum-reply-tab {
    display: block;
    padding: 9px 12px;
    border: 2px solid #98703b;
    border-top-width: 1px;
    border-radius: 0 0 9px 9px;
    background: linear-gradient(rgba(56, 39, 25, 0.97), rgba(36, 26, 18, 0.97));
    box-shadow: inset 0 0 0 1px #d3ae6b, 0 3px 8px rgba(35, 22, 10, 0.4);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    text-align: center;
}
.forum-reply-tab,
.forum-reply-tab:visited,
.forum-reply-tab:hover,
.forum-reply-tab:focus {
    color: #f5e6c6;
    text-decoration: none;
}
.forum-reply-tab:hover {
    border-color: #bd9556;
}

/* The reply window. */
.forum-modal .modal-content {
    background: #fbf6ea;
    border: 2px solid #98703b;
    border-radius: 9px;
}
.forum-modal .modal-header,
.forum-modal .modal-footer {
    border-color: #d8c4a0;
}
.forum-modal .modal-title {
    color: #663300;
}
.forum-modal .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
}
.forum-modal .modal-footer > * {
    margin: 0;
}

.forum-pages {
    margin: 10px 0;
    text-align: center;
}
.forum-pages .pagin,
.forum-pages .pagins {
    display: inline-block;
    min-width: 26px;
    padding: 2px 6px;
}
.forum-pages span.pagin {
    border-radius: 4px;
    background: #663300;
    color: #f5e6c6;
}

.forum-panel {
    margin: 14px 0;
    padding: 14px;
    background: var(--forum-row);
    border: 1px solid var(--forum-line);
    border-radius: 6px;
}
.forum-panel .form-control {
    background-color: #fffdf8;
    border-color: var(--forum-line);
}
.forum-panel label {
    font-weight: bold;
    color: var(--forum-ink);
}
.forum-reply h4 {
    margin-top: 0;
    font-size: 1.1rem;
}
.forum-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.forum-locked {
    margin: 14px 0;
    text-align: center;
}

@media only screen and (max-width: 840px) {
    .forums {
        padding: 0 8px;
    }
    .forum-search .form-control {
        width: 100%;
        flex: 1;
    }
    .forum-bar-actions,
    .forum-search {
        width: 100%;
    }
    .forum-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .forum-row-stats {
        flex-direction: row;
        gap: 14px;
    }
    .forum-table .forum-last {
        width: 38%;
    }
    .forum-table td {
        padding: 8px;
    }
    .forums .post {
        padding: 10px 10px 6px;
    }
}

/* Forum editor (Summernote, as on Rise of Clans). The BBCode toolbar, smileys and help
   are the fallback, hidden once the editor has loaded. */
.editor-on .forum-bbcode-only {
    display: none !important;
}
.forums .note-editor.note-frame {
    border-color: var(--forum-line);
    background: #fffdf8;
}
.forums .note-toolbar {
    background: #f6efe2;
    border-bottom: 1px solid var(--forum-line);
}
.forums .note-editable {
    background: #fffdf8;
    color: #1b1e21;
}
.forums .note-statusbar {
    background: #f6efe2;
}
.forum-smiley-icon {
    font-size: 16px;
    line-height: 1;
}
.forum-smiley-menu.dropdown-menu {
    width: 260px;
    padding: 6px;
}
.forum-smiley {
    width: 36px;
    height: 32px;
    padding: 2px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}
.forum-smiley:hover,
.forum-smiley:focus {
    background: #f6efe2;
}

/* Replies to a post, indented under it. */
.post-replies {
    margin-left: 30px;
    border-left: 3px solid var(--forum-line);
}
.forums .post.post-child {
    background: rgba(255, 255, 255, 0.6);
}
.post-reply-box:not(:empty) {
    margin: 8px 0 4px;
}
.post-reply-box .forum-actions {
    margin-bottom: 0;
}

.post-table {
    margin: 6px 0;
    border-collapse: collapse;
}
.post-table td {
    padding: 4px 8px;
    border: 1px solid var(--forum-line);
    vertical-align: top;
}
.post-video {
    position: relative;
    max-width: 560px;
    margin: 6px 0;
    aspect-ratio: 16 / 9;
}
.post-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media only screen and (max-width: 840px) {
    .post-replies {
        margin-left: 12px;
    }
}

/* Old [quote] boxes in the forums, in the same look as the posts. */
.forums .quote {
    width: auto;
    margin: 6px 0 10px;
    border: 0;
    border-left: 3px solid #98703b;
    border-radius: 0 6px 6px 0;
    background: rgba(246, 239, 226, 0.95);
}
.forums .quoting {
    padding: 4px 10px 0;
    background: transparent;
    color: var(--forum-muted);
    font-size: 12px;
}
.forums .quoted-text {
    padding: 2px 10px 8px;
}

/* Guild vault: Manage Gold / Manage Crystals tabs. */
.vault-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.vault-tab[aria-selected="false"] {
    opacity: 0.6;
}
.vault-tab[aria-selected="true"] {
    border-color: #d3ae6b;
}

/* Road encounters on the travelling screen (includes/functions/f_travel.php). */
.road {
    max-width: 640px;
    margin: 24px auto 0;
    text-align: left;
}
.road-encounter,
.road-result {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #d8c4a0;
    border-radius: 6px;
}
.road-result {
    border-left: 3px solid #98703b;
    text-align: center;
}
.road-art {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 12px;
    border-radius: 4px;
}
.road-encounter h4,
.road-story {
    text-align: center;
}
.road-encounter h4 {
    margin: 0 0 8px;
}
.road-choices {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
}
.road-wait {
    font-style: italic;
    text-align: center;
}
.road-count {
    font-size: 12px;
    color: #6f5a43;
    text-align: center;
}

/* Mailbox as conversations (m2.php). Uses the forum layout pieces (forum-bar, forum-panel). */
.mail {
    --forum-ink: #663300;
    --forum-line: #d8c4a0;
    --forum-row: rgba(255, 255, 255, 0.82);
    --forum-row-alt: rgba(246, 239, 226, 0.9);
    --forum-muted: #6f5a43;
    text-align: left;
}
.mail-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}
.mail-nav .btn.button:not(.mail-tab-on) {
    opacity: 0.6;
}
.mail-nav .mail-tab-on {
    border-color: #d3ae6b;
}
.mail-notice,
.mail-error {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 6px;
}
.mail-notice {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--forum-line);
}
.mail-error {
    background: #fbe9e7;
    border: 1px solid #d9a39a;
    color: #7a2318;
}
.mail-empty,
.mail-hint {
    padding: 14px;
    color: var(--forum-muted);
    text-align: center;
}
.mail-hint {
    font-size: 12px;
}
.mail-list {
    border-top: 1px solid var(--forum-line);
}
.mail-row {
    display: block;
    padding: 10px 14px;
    background: var(--forum-row);
    border-bottom: 1px solid var(--forum-line);
}
.mail-row:nth-child(even) {
    background: var(--forum-row-alt);
}
/* The whole row opens the conversation. */
a.mail-row,
a.mail-row:visited {
    color: #1b1e21;
    text-decoration: none;
}
a.mail-row:hover,
a.mail-row:focus-visible {
    background: #fffdf8;
    text-decoration: none;
}
a.mail-row:focus-visible {
    outline: 2px solid #805018;
    outline-offset: -2px;
}
.mail-unread {
    border-left: 3px solid #3f7a2b;
}
.mail-row-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
}
.mail-row-name {
    font-weight: bold;
}
.mail-row-time {
    color: var(--forum-muted);
    font-size: 12px;
}
.mail-row-preview {
    display: block;
    margin-top: 3px;
    color: #1b1e21;
}
.mail-unread .mail-row-preview {
    font-weight: bold;
}
.mail-you {
    color: var(--forum-muted);
    font-weight: normal;
}
.mail-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.mail-msg {
    max-width: 80%;
    padding: 9px 13px 6px;
    border: 1px solid var(--forum-line);
    border-radius: 10px;
    overflow-wrap: anywhere;
}
.mail-theirs {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 2px;
}
.mail-mine {
    align-self: flex-end;
    background: #f1e2c4;
    border-bottom-right-radius: 2px;
}
.mail-meta {
    font-size: 12px;
    color: var(--forum-muted);
}
.mail-body img {
    max-width: 100%;
    height: auto;
}
.mail-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 2px 12px;
    margin-top: 4px;
}
.mail-time {
    font-size: 12px;
    color: var(--forum-muted);
}
.mail-actions {
    margin-left: auto;
}
.mail-inline {
    display: inline;
    margin: 0;
}
.mail-link {
    margin-left: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #663602;
    font-size: 12px;
    cursor: pointer;
}
.mail-link:hover {
    text-decoration: underline;
}
.mail-starred {
    color: #b8860b;
}
/* Delete conversation sits in the heading row as a small link, beside Report abuse. */
.mail-bar-delete {
    margin-left: 0;
    font-size: 13px;
    color: #a12a1b;
}
.mail .forum-actions {
    justify-content: center;
}
@media (hover: hover) {
    .mail-actions {
        visibility: hidden;
    }
    .mail-msg:hover .mail-actions,
    .mail-msg:focus-within .mail-actions,
    .mail-msg .mail-starred {
        visibility: visible;
    }
}
@media only screen and (max-width: 840px) {
    .mail {
        padding: 0 8px;
    }
    .mail-msg {
        max-width: 92%;
    }
}

/* Job page: today's shift (jobs overhaul, includes/functions/f_jobs.php). */
.job-shift {
    text-align: center;
}
.job-shift h4 {
    margin-top: 0;
}
.job-notice {
    font-weight: bold;
    color: #3f7a2b;
}
.job-blocked {
    font-style: italic;
    color: #6f5a43;
}
.job-days {
    margin: 10px 0 0;
    font-size: 13px;
    color: #6f5a43;
}

/* Job page: careers and promotions (jobs overhaul phase 2-3). */
.jobs .job-intro {
    text-align: center;
}
.job-place {
    align-items: center;
}
.job-place-action {
    flex: 0 0 auto;
}
.job-locked .forum-name {
    color: #6f5a43;
}
.job-salary {
    font-size: 13px;
    color: #6f5a43;
}
.job-next h4 {
    margin-top: 0;
}
.job-step {
    padding: 8px 0;
    border-top: 1px solid #d8c4a0;
}
.job-step:first-of-type {
    border-top: 0;
}
.job-checks {
    margin: 6px 0 10px;
    padding: 0;
    list-style: none;
}
.job-checks li {
    margin: 2px 0;
}
.job-ok {
    color: #3f7a2b;
    font-weight: bold;
}
.job-no {
    color: #a12a1b;
    font-weight: bold;
}
.job-switch {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d8c4a0;
    font-size: 13px;
}
.job-path .job-current td {
    font-weight: bold;
    background: #f1e2c4;
}
.job-quit {
    margin: 14px 0;
    text-align: center;
}

/* Job page: weekly assignment and shift flavour (jobs overhaul phase 5). */
.job-task h4 {
    margin-top: 0;
}
.job-todo {
    color: #6f5a43;
}
.jobs .job-notice {
    text-align: center;
}
.job-flavour {
    margin-bottom: 6px;
    font-style: italic;
    font-weight: normal;
    color: #1b1e21;
}

/* Library of Avalon (lore.php). */
.lore-intro {
    text-align: center;
    font-style: italic;
    color: #6f5a43;
}
.lore-tabs {
    justify-content: center;
}
.lore-search {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 16px;
}
.lore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.lore-card,
.lore-card:visited {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--forum-line);
    border-radius: 8px;
    color: #1b1e21;
    text-decoration: none;
    transition: border-color 120ms ease, transform 120ms ease;
}
.lore-card:hover,
.lore-card:focus-visible {
    border-color: #98703b;
    text-decoration: none;
    transform: translateY(-2px);
}
.lore-card-img {
    display: block;
    height: 130px;
    background: #e9dcc0 center / cover no-repeat;
}
.lore-card-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #98703b;
}
.lore-card-body {
    display: block;
    padding: 10px 12px 12px;
}
.lore-card-cat {
    display: block;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #98703b;
}
.lore-card-title {
    display: block;
    margin: 2px 0 4px;
    font-family: 'Cinzel Decorative', Georgia, serif;
    font-size: 16px;
    font-weight: bold;
    color: #663300;
}
.lore-card-text {
    display: block;
    font-size: 13px;
    color: #4a3b2a;
}
.lore-card-locked {
    opacity: 0.75;
}
.lore-card-locked .lore-card-text {
    font-style: italic;
}
.lore-entry {
    padding: 20px 24px;
}
.lore-title {
    margin: 0 0 14px;
    text-align: center;
}
.lore-banner {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    margin-bottom: 16px;
    border-radius: 6px;
}
.lore-portrait {
    float: right;
    width: 200px;
    max-width: 40%;
    margin: 0 0 12px 18px;
    border-radius: 6px;
}
.lore-body {
    line-height: 1.65;
}
.lore-body h3,
.lore-body h4,
.lore-body h5 {
    margin: 18px 0 8px;
}
.lore-body blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 3px solid #98703b;
    background: rgba(246, 239, 226, 0.95);
    font-style: italic;
}
.lore-body code {
    padding: 1px 5px;
    border-radius: 3px;
    background: #f1e2c4;
    color: #663300;
}
.lore-clear {
    clear: both;
}
.lore-locked-page {
    text-align: center;
    padding: 30px 20px;
}
.lore-lock {
    font-size: 44px;
}
.lore-admin {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
}
@media only screen and (max-width: 840px) {
    .lore-entry {
        padding: 14px;
    }
    .lore-portrait {
        float: none;
        display: block;
        width: 160px;
        max-width: 60%;
        margin: 0 auto 12px;
    }
}
.lore-table-wrap {
    overflow-x: auto;
    margin: 10px 0 14px;
}
.lore-table {
    border-collapse: collapse;
    min-width: 60%;
    font-size: 14px;
}
.lore-table th,
.lore-table td {
    padding: 5px 12px;
    border-bottom: 1px solid var(--forum-line);
    text-align: left;
}
.lore-table th {
    color: #663300;
    border-bottom-width: 2px;
}
.lore-table tbody tr:nth-child(even) td {
    background: rgba(246, 239, 226, 0.9);
}
.lore-lock {
    color: #98703b;
}

/* Phone menu (the button at the top right): full-width rows that are easy to tap */
.mobile-menu{margin:6px 0 10px 16px;border:1px solid #c9a86a;border-radius:12px;background:rgba(255,250,238,.92);overflow:hidden;box-shadow:0 4px 12px rgba(35,22,10,.15)}
.mobile-menu .mm-who{padding:12px 16px;font-size:15px;color:#5a4630;border-bottom:1px solid #e3cfa4;background:rgba(201,168,106,.15)}
.mobile-menu .mm-who b{color:#4a2a0c}
.mobile-menu .mm-who span{display:block;font-size:13px;color:#7a6650;margin-top:2px}
.mobile-menu a{display:flex;align-items:center;justify-content:space-between;min-height:50px;padding:0 16px;font-size:17px;color:#4a2a0c;text-decoration:none;border-bottom:1px solid #eadbbd}
.mobile-menu a::after{content:'\203A';font-size:22px;color:#b08a52}
.mobile-menu a:active{background:rgba(201,168,106,.25)}
.mobile-menu br{display:none}
.mobile-menu a.mm-logout{justify-content:center;margin:12px 16px;min-height:46px;border:1px solid #6b4a1e;border-radius:10px;background:linear-gradient(#5a3a16,#3a240c);color:#fbf1dc;font-family:'Cinzel',serif;font-weight:bold}
.mobile-menu a.mm-logout::after{content:none}

/* Link menus (tap_menu() in includes/lib.php): cards of full-width rows that are easy to tap */
.tap-menu{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin:10px 0 18px;text-align:left}
.tap-menu.narrow{grid-template-columns:1fr;max-width:420px;margin-left:auto;margin-right:auto}
.tap-menu section{background:rgba(255,250,238,.9);border:1px solid #c9a86a;border-radius:10px;overflow:hidden}
.tap-menu h4{margin:0;padding:8px 12px;font-size:14px;letter-spacing:.06em;text-transform:uppercase;color:#fbf1dc;background:linear-gradient(#5a3a16,#3a240c)}
.tap-menu a{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:0 12px;color:#4a2a0c;text-decoration:none;border-top:1px solid #eadbbd;font-size:15px}
.tap-menu a:first-of-type{border-top:0}
.tap-menu a::after{content:'\203A';color:#b08a52;font-size:20px}
.tap-menu a:hover,.tap-menu a:active{background:rgba(201,168,106,.22)}
.tap-menu a.danger{color:#a02020}
.tap-menu-top{display:block;margin:10px auto 0;max-width:320px}
@media (max-width:700px){.tap-menu{grid-template-columns:1fr}.tap-menu a{min-height:48px;font-size:16px}}

/* Icon tile menus (icon_menu() in includes/lib.php), e.g. the guild home */
.icon-menu{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px;max-width:560px;margin:10px auto 18px}
.icon-menu a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:96px;padding:10px 4px;background:rgba(255,250,238,.9);border:1px solid #c9a86a;border-radius:10px;color:#4a2a0c;text-decoration:none;font-size:15px;text-align:center}
.icon-menu a img{width:44px;height:44px}
.icon-menu a:hover,.icon-menu a:active{background:rgba(201,168,106,.25)}
.icon-menu a.danger{color:#a02020}
/* Text boxes never make the page wider than a phone */
#main-content textarea{max-width:100%;box-sizing:border-box}

/* Install bar (images/avalon2/pwa.js) */
.pwa-bar{position:fixed;left:12px;right:12px;bottom:12px;z-index:1050;display:flex;align-items:center;gap:10px;max-width:560px;margin:0 auto;padding:10px 12px;border-radius:14px;background:linear-gradient(#3f2812,#2a1a0c);border:2px solid #98703b;color:#fbf1dc;box-shadow:0 6px 18px rgba(0,0,0,.35)}
.pwa-bar[hidden]{display:none}
.pwa-bar img{width:42px;height:42px;border-radius:10px;flex:0 0 auto}
.pwa-text{flex:1;font-size:15px;line-height:1.3}
.pwa-text span{display:block;font-size:13px;color:#ead9b8}
.pwa-bar button{border-radius:9px;padding:8px 12px;font-size:14px;border:1px solid #98703b;background:#f0d08c;color:#2a1a0c;font-weight:bold}
.pwa-bar .pwa-close{background:transparent;color:#ead9b8;font-weight:normal}
body.pwa-bar-on{padding-bottom:84px}

/* Ornate button: the carved bronze frame from the Training page's Max button, with real text inside.
   For the one main action on a page (Train, Fight, Accept Quest, Collect); other buttons stay .btn.button.
   Use class="btn button btn-ornate" on buttons and inputs, or class="btn-ornate" on a link. */
.btn-ornate,
.btn.button.btn-ornate {
  display: inline-block;
  box-sizing: border-box;
  min-height: 54px;
  padding: 1px 12px;
  border: 16px solid transparent;
  border-image: url('btn-frame.png') 52 fill / 16px stretch;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #f3e4c4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 0 #120c08, 0 0 3px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  vertical-align: middle;
  margin-top: 4px;
  margin-bottom: 4px;
  max-width: 100%;
  white-space: normal; /* Bootstrap's .btn keeps text on one line; a long label would run out of its card */
  transition: filter 120ms ease;
}
.btn-ornate:hover,
.btn.button.btn-ornate:hover:not(:disabled) {
  color: #fff5dd;
  text-decoration: none;
  filter: brightness(1.15);
}
.btn.button.btn-ornate:focus,
.btn.button.btn-ornate:active:not(:disabled) {
  background: none;
  border-color: transparent;
  color: #f3e4c4;
  box-shadow: none;
}
.btn-ornate:active,
.btn.button.btn-ornate:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(0.92);
}
.btn-ornate:focus-visible,
.btn.button.btn-ornate:focus-visible {
  outline: 2px solid #805018;
  outline-offset: 2px;
}
.btn-ornate:disabled,
.btn-ornate.disabled,
.btn.button.btn-ornate:disabled {
  opacity: 0.5;
  filter: grayscale(0.6);
  cursor: not-allowed;
}
/* The energy a Carnival game costs, on its own smaller line under the button's label. */
.btn-ornate .btn-cost { display: block; font-size: 0.78em; font-weight: normal; opacity: 0.85; margin-top: 2px; }
@media (max-width: 575px) {
  .btn-ornate, .btn.button.btn-ornate { font-size: 17px; }
}

/* Forum front page: the latest posts across all forums, and a clearer link to each forum's newest post. */
.forum-recent {
    background: var(--forum-row);
    border: 1px solid var(--forum-line);
    border-radius: 10px;
    margin: 0 0 14px;
    overflow: hidden;
}
.forum-recent summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 9px 14px;
    font-family: 'Cinzel Decorative', serif;
    font-size: 17px;
    color: #fff4dc;
    background: linear-gradient(#5e3c1d, #3f2812);
    cursor: pointer;
    list-style: none;
}
.forum-recent summary::-webkit-details-marker {
    display: none;
}
.forum-recent summary::after {
    content: '\2212';
    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1;
}
.forum-recent:not([open]) summary::after {
    content: '+';
}
.forum-recent ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.forum-recent li {
    padding: 9px 14px;
    border-top: 1px solid var(--forum-line);
}
.forum-recent li:first-child {
    border-top: 0;
}
.forum-recent-title {
    display: block;
    font-weight: bold;
    font-size: 15px;
    color: #7a3b00;
}
.forum-recent-title:hover,
.forum-meta a.forum-latest:hover {
    color: #4a2a0c;
}
.forum-meta a.forum-latest {
    color: #7a3b00;
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Inventory: items as slim cards (inventory_data.php): picture, name and effect, the main action and a
   ... button that shows the other actions. Tapping the picture loads the item's details into the card
   (pages/avalon2.html), and the card then spans the whole row until they are closed. */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px;
    padding: 12px 0;
}
.inv-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 4px 10px;
    padding: 8px 10px;
    background: rgba(255, 250, 238, 0.95);
    border: 1px solid #c9a86a;
    border-radius: 12px;
    text-align: left;
}
.inv-img {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.inv-img img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.inv-qty {
    position: absolute;
    right: -8px;
    bottom: -6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #3f2812;
    color: #fff4dc;
    font-size: 11.5px;
    font-weight: bold;
    line-height: 1.3;
}
.inv-name {
    font-weight: bold;
    font-size: 14.5px;
    line-height: 1.25;
    color: #4a2a0c;
}
.inv-effect {
    font-size: 12.5px;
    line-height: 1.3;
    color: #17707e;
}
.inv-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    max-width: 190px; /* Open + Open all, with the ... button wrapping under them */
}
.inv-dots {
    width: 34px;
    height: 32px;
    border: 1px solid #d8c4a0;
    border-radius: 8px;
    background: #fffdf7;
    color: #663300;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}
.inv-open .inv-dots {
    background: #3f2812;
    color: #fff4dc;
}
.inv-more {
    display: none;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.inv-open .inv-more {
    display: flex;
}
.inv-more a {
    padding: 4px 10px;
    border: 1px solid #d8c4a0;
    border-radius: 999px;
    background: #fffdf7;
    color: #663300;
    font-size: 13px;
    text-decoration: none;
}
.inv-more a:hover {
    border-color: #98703b;
    color: #4a2a0c;
}
.inv-card .item-row-item-info {
    grid-column: 1 / -1;
}
.inv-card:has(.item-row-item-info:not([style*="none"]) [id^="item-info-detail-"]:not([style*="none"])) {
    grid-column: 1 / -1;
}
.inv-empty {
    padding: 30px;
    text-align: center;
    color: #6f5a43;
}
/* A button among the inventory's action tags (Sell all), styled like the tags. */
.inv-more form{margin:0}
.inv-more .inv-tag-btn{padding:4px 10px;border:1px solid #d8c4a0;border-radius:999px;background:#fffdf7;color:#663300;font-size:13px;cursor:pointer}
.inv-more .inv-tag-btn:hover{border-color:#98703b;color:#4a2a0c}

/* Carnival token balance (carnival_tokens_card() in includes/functions/f_carnival.php) */
.ct-card { display: flex; align-items: center; justify-content: center; gap: 12px; width: fit-content; max-width: 100%; margin: 12px auto 16px; padding: 10px 22px 10px 14px; background: #fffaf0; border: 1px solid #d9c49c; border-radius: 12px; box-shadow: 0 1px 4px rgba(60, 40, 10, 0.12); text-align: left; }
.ct-card img { width: 48px; height: 48px; flex: none; }
.ct-card b { display: block; font-size: 1.6em; line-height: 1.1; color: #7a4a12; font-variant-numeric: tabular-nums; }
.ct-card span { display: block; font-size: 0.9em; color: #6b5a48; }
a.ct-card { color: inherit; text-decoration: none; transition: transform 120ms ease, box-shadow 120ms ease; }
a.ct-card:hover, a.ct-card:focus-visible { text-decoration: none; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(60, 40, 10, 0.2); }
.ct-card .ct-go { color: #a07a45; font-size: 1.1em; margin-left: 4px; }
