body         { background-color            : rgb(238, 238, 204);
               font-family                 : Arial, Helvetica;
               font-size                   : 10pt;
               margin                      : 8px;
               color                       : rgb(0, 0, 0); }
body.banner  { background-color            : rgb(255, 255, 255);
               margin                      : 0px;
               background-image            : url("/img/topbar.gif");
               background-position         : bottom left;
               background-repeat           : repeat-x;
               background-attachment       : fixed; }
body.menu    { background-color            : rgb(238, 238, 204);
               margin                      : 0px;
               margin-top                  : 40px;
			   padding-top                 : 20px;
               background-image            : url("/img/menutop.gif");
               background-position         : top left;
               background-repeat           : no-repeat;
               background-attachment       : fixed; }
body.leftborder { background-color            : rgb(238, 238, 204);
               background-image            : url("/img/brd_left.gif");
               background-position         : top right;
               background-repeat           : repeat-y;
               background-attachment       : fixed; }
body.rightborder { background-color            : rgb(238, 238, 204);
               background-image            : url("/img/brd_right.gif");
               background-position         : top left;
               background-repeat           : repeat-y;
               background-attachment       : fixed; }
body.bottomline { margin                   : 0px;
               padding                     : 0px;
               background-color            : rgb(238, 238, 204);
               background-image            : url("/img/brd_bottom.gif");
               background-position         : top left;
               background-repeat           : repeat-x;
               background-attachment       : fixed; }
body.sideback { background-color            : rgb(102, 153, 51); }
h1.main      { font-size                   : 15pt;
               color                       : rgb(0, 0, 153); }
h2.main      { font-size                   : 13pt;
               color                       : rgb(0, 0, 153); }
span.caption { font-size                   : 15pt;
               color                       : rgb(0, 0, 153); }
a:link       { text-decoration             : underline;
               color                       : rgb(0, 0, 204); }
a:active     { text-decoration             : underline;
               color                       : rgb(0, 0, 204); }
a:visited    { text-decoration             : underline;
               color                       : rgb(0, 0, 204); }
table,td,th  { font-family                 : Arial, Helvetica;
               font-size                   : 10pt;
               font-weight                 : normal;
               vertical-align              : top;
               color                       : rgb(0, 0, 0); }
table.main   { background-color            : rgb(244, 244, 221);
               border-collapse             : collapse;
               border-color                : rgb(153, 102, 51);
               border-width                : 2px;
               border-style                : solid; }
table.banner { background-image            : url("/img/toplogo.gif");
               background-position         : top left;
               background-repeat           : no-repeat;
               background-attachment       : fixed; }
th.main      { background-color            : rgb(255, 255, 255);
               border-color                : rgb(204, 153, 102);
               border-width                : 1px;
               border-style                : solid;
               font-family                 : Arial, Helvetica;
               font-size                   : 12pt;
               font-weight                 : bold;
               color                       : rgb(0, 0, 0); }
th.main_m    { background-color            : rgb(255, 255, 255);
               border-color                : rgb(204, 153, 102);
               border-width                : 1px;
               border-style                : solid;
               background-image            : url("/img/middleearth_br3b.gif");
               background-position         : top left;
               background-repeat           : no-repeat;
               background-attachment       : scroll;
               font-family                 : Arial, Helvetica;
               font-size                   : 12pt;
               font-weight                 : bold;
               color                       : rgb(0, 0, 0); }
td.caption   { background-color            : rgb(249, 249, 238);
               border-color                : rgb(204, 153, 102);
               border-width                : 1px;
               border-style                : solid;
               font-family                 : Arial, Helvetica;
               font-size                   : 7pt;
               font-weight                 : bold;
               color                       : rgb(0, 0, 0); }
td.tree      { background-color            : rgb(249, 249, 238);
               border-color                : rgb(204, 153, 102);
               border-width                : 1px;
               border-style                : solid;
               font-family                 : Arial, Helvetica;
               font-size                   : 8pt;
               font-weight                 : normal;
               color                       : rgb(0, 0, 0); }
td.main      { background-color            : rgb(244, 244, 221);
               border-color                : rgb(204, 153, 102);
               border-width                : 1px;
               border-style                : solid;
               font-family                 : Arial, Helvetica;
               font-size                   : 10pt;
               font-weight                 : normal;
               color                       : rgb(0, 0, 0); }
td.mainhome  { border-width                : 0px;
               background-image            : url("/img/thormap1.gif");
               background-position         : top left;
               background-repeat           : no-repeat;
               background-attachment       : scroll;
               font-family                 : Arial, Helvetica;
               font-size                   : 10pt;
               font-weight                 : normal;
               color                       : rgb(0, 0, 0); }
td.banner    { text-align                  : right;
               vertical-align              : middle;
               background-image            : url("/img/topright.gif");
               background-position         : top right;
               background-repeat           : no-repeat;
               background-attachment       : scroll;
               padding                     : 0px;
               padding-right               : 20px; }
td.img       { background-color            : rgb(244, 244, 221);
               border-color                : rgb(204, 153, 102);
               border-width                : 1px;
               border-style                : solid;
               font-family                 : Arial, Helvetica;
               font-size                   : 10pt;
               font-weight                 : normal;
               text-align                  : center;
               vertical-align              : top;
               color                       : rgb(0, 0, 0); }
input,
select,
textarea     { font-family                 : "Courier New", Courier, "Times New Roman", Times, Arial, Helvetica; }
.n_text      { border-width                : 0px;
               background-image            : url("/img/b_flow.gif");
               background-position         : bottom left;
               background-repeat           : repeat-x;
               background-attachment       : scroll;
               font-family                 : Arial, Helvetica;
               font-size                   : 9pt;
               font-weight                 : normal;
               padding-bottom              : 12px;
               color                       : rgb(0, 0, 0); }
.n_short     { border-width                : 0px;
               font-family                 : Arial, Helvetica;
               font-size                   : 8pt;
               font-weight                 : bold;
               color                       : rgb(0, 0, 0); }
.n_caption   { border-width                : 0px;
               background-image            : url("/img/n_flow.gif");
               background-position         : top left;
               background-repeat           : repeat-x;
               background-attachment       : scroll;
               font-family                 : Arial, Helvetica;
               font-size                   : 10pt;
               font-weight                 : bold;
               color                       : rgb(0, 0, 0); }
.n_date      { font-family                 : Arial, Helvetica;
               font-size                   : 8pt;
               font-weight                 : normal;
               float                       : right; }
.n_hr        { background-color            : rgb(221, 221, 187);
               height                      : 4px;
               border-color                : rgb(221, 221, 187);
               border-width                : 0px;
               border-style                : solid;
               font-family                 : Arial, Helvetica;
               font-size                   : 4pt;
               font-weight                 : normal;
               color                       : rgb(0, 0, 0); }

/* ── index2.php shell layout ────────────────────────────────────────────────
   Reproduces the original nested frameset structure:
     outer:   * | 1000px | *       (back columns + centre)
     centre:  70px | * | 18px      (topbanner + main area + bottomline)
     main:    18px | * | 18px      (leftborder + mainclient + rightborder)
   The decorative cell classes mirror the body classes already defined above. */

html:has(#layout-outer),
body:has(#layout-outer) {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#layout-outer {
  display: grid;
  grid-template-columns: 1fr 1000px 1fr;
  width: 100%;
  height: 100%;
}

#layout-centre {
  display: grid;
  grid-template-rows: 70px 1fr 18px;
  height: 100%;
  overflow: hidden;
}

#layout-main {
  display: grid;
  grid-template-columns: 18px 1fr 18px;
  overflow: hidden;
}

#layout-outer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  margin: 0;
  padding: 0;
}

.cell-back        { background-color      : rgb(102, 153, 51); }

.cell-leftborder  { background-color      : rgb(238, 238, 204);
                    background-image      : url("/img/brd_left.gif");
                    background-position   : top right;
                    background-repeat     : repeat-y;
                    background-attachment : scroll; }

.cell-rightborder { background-color      : rgb(238, 238, 204);
                    background-image      : url("/img/brd_right.gif");
                    background-position   : top left;
                    background-repeat     : repeat-y;
                    background-attachment : scroll; }

.cell-bottomline  { margin               : 0px;
                    padding              : 0px;
                    background-color     : rgb(238, 238, 204);
                    background-image     : url("/img/brd_bottom.gif");
                    background-position  : top left;
                    background-repeat    : repeat-x;
                    background-attachment: scroll;
                    display              : flex;
                    align-items          : flex-start;
                    justify-content      : space-between; }

.cell-bottomline img { display: block; flex-shrink: 0; }

/* ── Gallery modal (rendered in index2.php, triggered from listing.php) ─── */

#gallery-modal {
    display          : none;
    position         : fixed;
    inset            : 0;
    z-index          : 9999;
    background       : rgba(0, 0, 0, 0.88);
    align-items      : center;
    justify-content  : center;
    flex-direction   : column;
}

#gallery-modal.open {
    display          : flex;
}

#gallery-img {
    max-width        : 92vw;
    max-height       : 82vh;
    object-fit       : contain;
    display          : block;
    box-shadow       : 0 0 40px rgba(0,0,0,0.8);
    cursor           : zoom-in;
}

#gallery-caption {
    margin-top       : 10px;
    color            : #dde8c0;
    font-family      : Arial, sans-serif;
    font-size        : 13px;
    text-align       : center;
    max-width        : 80vw;
}

#gallery-title  { font-weight: bold; }
#gallery-author { color: #aac070; }

#gallery-hint {
    position         : fixed;
    top              : 14px;
    left            : 22px;
    color            : #999;
    font-size        : 12px;
    font-weight      : normal;
    /* cursor           : pointer; */
    line-height      : 1;
    user-select      : none;
    z-index          : 10001;
}

#gallery-close {
    position         : fixed;
    top              : 14px;
    right            : 22px;
    color            : #ccc;
    font-size        : 36px;
    font-weight      : bold;
    cursor           : pointer;
    line-height      : 1;
    user-select      : none;
    z-index          : 10000;
}
#gallery-close:hover { color: #fff; }

#gallery-prev,
#gallery-next {
    position         : fixed;
    top              : 50%;
    transform        : translateY(-50%);
    color            : #ccc;
    font-size        : 40px;
    cursor           : pointer;
    padding          : 10px 16px;
    user-select      : none;
    z-index          : 10000;
    background       : rgba(0,0,0,0.3);
    border-radius    : 4px;
}
#gallery-prev { left:  10px; }
#gallery-next { right: 10px; }
#gallery-prev:hover,
#gallery-next:hover { color: #fff; background: rgba(102,153,51,0.6); }

/* ── Map category buttons (replaces r_NNN_4.png images) ─────────────────── */

@font-face {
    font-family : 'GillSansExtCB';
    src         : url('/css/GLSNECB.TTF') format('truetype');
    font-weight : normal;
    font-style  : normal;
}

.map-btn {
    display          : inline-flex;
    align-items      : center;
    justify-content  : center;
    width            : 80px;
    height           : 20px;
    background-color : #3366cc;
    color            : #ffffff;
    font-family      : 'GillSansExtCB', 'Gill Sans MT Ext Condensed Bold', 'Arial Narrow', sans-serif;
    font-size        : 19px;
    line-height      : 1;
    text-decoration  : none;
    border-radius    : 4px;
    white-space      : nowrap;
    overflow         : hidden;
    box-sizing       : border-box;
    border           : none;
    cursor           : pointer;
    letter-spacing   : 0.75px;
    margin-bottom    : 2px;
}
.map-btn:link,
.map-btn:visited,
.map-btn:active  { color: #ffffff; text-decoration: none; }
.map-btn:hover   { background-color: #4477dd; }

.age-btn {
    display          : inline-flex;
    align-items      : center;
    justify-content  : center;
    width            : 50px;
    height           : 20px;
    background-color : #638AD0;
    color            : #ffffff;
    font-family      : 'GillSansExtCB', 'Gill Sans MT Ext Condensed Bold', 'Arial Narrow', sans-serif;
    font-size        : 19px;
    line-height      : 1;
    text-decoration  : none;
    border-radius    : 4px;
    white-space      : nowrap;
    overflow         : hidden;
    box-sizing       : border-box;
    border           : none;
    cursor           : pointer;
    letter-spacing   : 0.75px;
    margin-bottom    : 2px;
}
.age-btn:link,
.age-btn:visited,
.age-btn:active  { color: #ffffff; text-decoration: none; }
.age-btn:hover   { background-color: #4477dd; }
