html {
  -webkit-text-size-adjust: 100%;
  -text-size-adjust: 100%;
  margin: 0;
  padding: 0;
}

body {
/*  overscroll-behavior: contain; */
  font-family: system-ui, -apple-system, "Times New Roman";
  background-color: #c0c0c0; color: black;
}

.Grid {
  padding: 0;
  margin: 0;
  -ms-box-orient: horizontal;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -moz-flex;
  display: -webkit-flex;
  display: flex;
}

.rTable          { display: table; }
.rTableRow       { display: table-row; }
.rTableHeading   { display: table-header-group; }
.rTableBody      { display: table-row-group; }
.rTableFoot      { display: table-footer-group; }
.rTableHead      { display: table-cell; }
.rTableCell      { display: table-cell; }


.IndexHit {
  background-color: #c0c0c0;
  color: #c0c0c0;
  input.NoButton { color:#c0c0c0; padding:0; border:none; background:none; }
  .TopText { color: #c0c0c0; }
}

.Logo	{
 grid-area: logo;
}

.TopText	{
 grid-area: toptext;
 display:flex;
 justify-content:center;
}

.Menu	{
 grid-area: chooser;
}

.Ad {
 grid-area: ad;
}

.Content {
 grid-area: content;
}

.Footer	{
 grid-area: footer;
 display: flex;
 flex-direction:row;
 align-content:flex-end;
 font-size:smaller;
}

.Caption {
  display: flex;
  flex-direction:row;
  justify-content:center;
}

.Gallery	{
  display:flex;
  vertical-align:top;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap:3px;
}

.Gallery1	{
 display:grid;
 justify-items: start;
 justify-content: left;
}

.Gallery1::after	{
  content: '';
  flex-basis:30%;
}

.Gallery2	{
  display:flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
	gap: 5px;
}

.Gallery3	{
  display:flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  vertical-align:top;
	text-align:center;
}

.Gallery4 {
  display:flex;
  gap:1px;
  flex-direction:row;
  flex-wrap:wrap;
  justify-content:flex-start;
  vertical-align:top;
}

.Rowspan {
  display:flex;
  vertical-align:center;
}

input.Active  { background-color: #2e7d32; color: Black; }
input.Active1 { background-color: #2e7d32; color: White; }
input.Active2 { background-color: #ABEBC6; color: Black; }
input.NoClick { background-color: #c0c0c0; color: White; }
input.Small   { background-color: #2e7d32; color: Black; }
input.Back    { background-color: #66bb6a; color: Black; }
input.Hidden  { background-color: Gold; color: Black; }
input.Delete  { background-color: #c0c0c0; color: Red; }
input.Delete1 { background-color: #ff0000; color: Black; }
input.Login   { background-color: #66ccff; color: Black; }


/* General size and colors for these. Individual media queries can change what is necessary */
input[type='submit'] { margin-bottom:3px; }
input[type='button'] { margin-bottom:3px; }

@media only screen and (max-width:320px) { /* TinyPhone */
#Grid {
  display:grid;
  height:100vh;
  }
}

@media only screen and (max-width:600px) and (orientation:Portrait) { /* SmallPhonePort */
#Grid {
    display: grid;
    height:100vh;
    row-gap: 5px;
    grid-template-columns: 22% 1fr;
    grid-template-rows: calc(100vh * 0.04) calc(100vh * 0.02) calc(100vh * 0.06) auto 5% 5%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo content"
      "chooser content"
      "ad ad"
      "footer footer";
  }
  .TopText { font-size:x-large; font-weight:bold; color:black; }
  .Menu { display:flex; flex-flow:column wrap; place-items:flex-start; text-align:center; overflow:hidden;
    input[type='submit'] { width:95%; height:25px; font-size:x-small; padding:2px; }
    input[type='button'] { width:95%; height:25px; font-size:x-small; padding:2px; }
  }
  .Ad { display:flex; flex-flow:row wrap; text-align:center; }
  .Content { font-size:x-small; vertical-align:top; margin-top:50px;
    input[type='submit'] { width:min-content; height:25px; font-size:xx-small; padding:2px; }
    input[type='button'] { width:min-content; height:25px; font-size:xx-small; padding:2px; }
  }
  .Footer { font-size: x-small; }
  .Caption { font-size:x-small; }
}

@media only screen and (max-width:600px) and (orientation:Landscape) { /* SmallPhoneLand */
#Grid {
    display: grid;
    height:100vh;
    row-gap: 5px;
    grid-template-columns: 22% 1fr;
    grid-template-rows: calc(100vh * 0.04) calc(100vh * 0.02) calc(100vh * 0.06) auto 5% 5%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "content content"
      "ad ad"
      "footer footer";
  }
  .TopText { font-size:x-large; font-weight:bold; color:black; }
  .Menu { display:flex; flex-flow:column wrap; place-items:flex-start; text-align:center; overflow:hidden;
    input[type='submit'] { width:95%; height:25px; font-size:x-small; padding:2px; }
    input[type='button'] { width:95%; height:25px; font-size:x-small; padding:2px; }
  }
  .Ad { display:flex; flex-flow:row wrap; text-align:center; }
  .Content { font-size:x-small; vertical-align:top; margin-top:50px;
    input[type='submit'] { width:min-content; height:25px; font-size:xx-small; padding:2px; }
    input[type='button'] { width:min-content; height:25px; font-size:xx-small; padding:2px; }
  }
  .Footer { font-size: x-small; }
  .Caption { font-size:x-small; }
}

@media only screen and (min-width: 600px) and (orientation:Portrait)  { /* SmallTabPort ONN is one. */
#Grid {
    display: grid;
    height:100vh;
    grid-gap: 2px;
    grid-template-columns: 15% 85%;
    grid-template-rows: calc( 100vh * 0.02) calc(100vh * 0.01) calc(100vh * 0.05) 1fr 1fr 8%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "content content"
      "ad ad"
      "footer footer";
  }
  .TopText { display: flex; text-align:center; font-size:larger; font-weight:bold; color: Black; }
  .Menu { display:flex; flex-flow: row wrap; place-content:center;
  input[type='submit'] { height:25px; font-size:x-small; padding:3px; }
  input[type='button'] { height:25px; font-size:x-small; padding:3px; }
  }
  .Ad { display:flex; flex-flow:column wrap; text-align:center; vertical-align: middle; }
  .Footer { font-size:x-small; }
  .Content { font-size: smaller; margin-top:5px; vertical-align:top;
  input[type='submit'] { height:20px; font-size:xx-small; padding:3px; }
  input[type='button'] { height:20px; font-size:xx-small; padding:3px; }
  }
  .Caption { font-size: x-small; }
}

@media only screen and (min-width: 600px) and (orientation:Landscape)  { /* SmallTabLand */
#Grid {
    display: grid;
    height:100vh;
    grid-gap: 2px;
    grid-template-columns: 15% 85%;
    grid-template-rows: calc( 100vh * 0.04) calc(100vh * 0.04) calc(100vh * 0.15) 1fr 1fr 8%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "content content"
      "ad ad"
      "footer footer";
  }
  .TopText { display: flex; text-align:center; font-size:larger; font-weight:bold; color: Black; }
  .Message { font-size:x-small; font-weight:normal; color:black; }
  .Menu { display:flex; flex-flow: row wrap; place-content:center;
  input[type='submit'] { height:25px; font-size:x-small; padding:3px; }
  input[type='button'] { height:25px; font-size:x-small; padding:3px; }
  }
  .Ad { display:flex; flex-flow:row wrap; text-align:center; vertical-align: middle; }
  .Content { display:flex; flex-flow:column wrap; margin-top:20px; font-size:initial;
  input[type='submit'] { height:25px; font-size:x-small; padding:3px; }
  input[type='button'] { height:25px; font-size:x-small; padding:3px; }
  }
  .Caption { font-size: x-small; }
  .Footer { font-size:x-small; }
}

@media only screen and ( min-width: 768px ) and ( orientation: Portrait ) { /* MediumTabPort */
#Grid {
    display: grid;
    height:100vh;
    grid-gap: 2px;
    grid-template-columns: 15% 85%;
    grid-template-rows: calc(100vh * 0.03) calc(100vh * 0.01) calc(100vh * 0.06) auto 10% 8%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "content content"
      "ad ad"
      "footer footer";
  }
  .TopText { display: flex; text-align:center; font-size:larger; font-weight: bold; color: Black; }
  .Message { font-size:smaller; font-weight:normal; color:black; }
  .Menu { display:flex; flex-flow:row wrap; place-content:baseline center; font-size:xx-small; text-align:center;
    input[type='submit'] { width:min-content; font-size:13px; height:35px; padding:2px; }
    input[type='button'] { width:min-content; font-size:13px; height:35px; padding:2px;}
  }
  .Ad { width:98%; text-align:center; vertical-align:top; }
  .Footer { font-size:smaller; }
  .Content { margin-left:3px; font-size: initial; vertical-align:top;
    input[type='submit'] { width:min-content; height:35px; font-size:smaller; padding:2px 2px; }
    input[type='button'] { width:min-content; height:35px; font-size:smaller; padding:2px 2px; }
  }
  .Caption { font-size: smaller; }
}

@media only screen and ( min-width: 768px ) and ( orientation: Landscape ) { /* MediumTabLand  */
#Grid {
    display: grid;
    height:100vh;
    grid-gap: 2px;
    grid-template-columns: 15% 85%;
    grid-template-rows: calc( 100vh * 0.04) calc(100vh * 0.02) calc(100vh * 0.25) 1fr 1fr 8%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "content content"
      "ad ad"
      "footer footer";
  }
  .TopText { display: flex; text-align:center; font-size:larger; font-weight: bold; color: Black; }
  .Message { font-size:smaller; font-weight:normal; color:black; }
  .Menu { display:flex; flex-flow:row wrap; place-content:center; margin-top:15px; font-size:xx-small; text-align:center;
    input[type='submit'] { width:min-content; height:30px; }
    input[type='button'] { width:min-content; height:30px; }
  }
  .Ad { display:flex; flex-flow:column wrap; text-align:center; vertical-align: middle; }
  .Content { font-size:initial; margin-top:10px;
    input[type='submit'] { width:min-content; height:30px; }
    input[type='button'] { width:min-content; height:30px; }
  }
  .Footer { font-size:x-small; }
  .Caption { font-size: x-small; }
}

@media only screen and ( min-width: 992px )  { /* TabDesk Landscape */
#Grid {
    display: grid;
    height:100vh;
    grid-gap: 2px;
    grid-template-columns: 15% 85%;
    grid-template-rows: calc(100vh * 0.03) calc(100vh * 0.02) calc(100vh * 0.085) auto 8%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "ad content"
      "footer footer";
  }
  .TopText { display:flex; text-align:center; font-size:larger; font-weight: bold; color:Black; }
  .Message { font-size:smaller; font-weight:normal; color:black; }
  .Menu { display:flex; flex-flow:row wrap; place-content:center;
  input[type='submit'] { width:min-content; height:40px; font-size:initial; padding:3px; };
  input[type='button'] { width:min-content; height:40px; font-size:initial; padding:3px; };
  }
  .Ad { display:flex; flex-flow:column wrap; text-align:center; vertical-align: middle; margin-top:40px;}
  .Footer { font-size:smaller; }
  .Content { margin-top:10px;
  input[type='submit'] { width:min-content; height:35px; font-size:smaller; padding:3px; };
  input[type='button'] { width:min-content; height:35px; font-size:smaller; padding:3px; };
  }
  .Caption { font-size: smaller; }
}

@media only screen and ( min-width: 1200px ) { /* LargeTabDesk */
#Grid {
    display: grid;
    min-height:100dvh;
    gap: 2px 2px;
    grid-template-columns: 10% 90%;
    grid-template-rows: 3% 1% 10% 1fr 8%;
    grid-template-areas:
      "logo toptext"
      "logo toptext"
      "logo chooser"
      "ad content"
      "footer footer";
  }
  .TopText { flex-flow:row wrap; };
  .Message { font-size:large; font-weight:normal; color:black; }
  .Menu { display:flex; flex-flow:row wrap; place-content:center;
  input[type='submit'] { width:min-content; height:40px; font-size:initial; }
  input[type='button'] { width:min-content; height:40px; font-size:initial; }
  }
  .Ad { display:flex; flex-flow:column wrap; text-align:center; vertical-align: middle; }
  .Content { margin-top:10px;
    input[type='submit'] { width:min-content; height:35px; font-size:smaller; }
    input[type='button'] { width:min-content; height:35px; font-size:smaller; }
  }
  .Caption { margin-top:1px; font-size: small; }
}
