*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0
}

body{
  background:#dfe6f3;
  color:#20254a;
  font-family:"MS PGothic","MS Gothic",Tahoma,Arial,sans-serif;
  font-size:13px
}

button,input,textarea,select{
  font:inherit
}

button{
  cursor:pointer
}


/* =========================================================
   HEADER
   ========================================================= */

.topline{
  height:22px;
  background:#171a35;
  color:#dfe5ff;
  text-align:center;
  font:11px/22px "Courier New",monospace;
  letter-spacing:.8px;
  overflow:hidden
}

#wrap{
  width:1100px;
  max-width:96%;
  margin:14px auto;
  background:#fff;
  border:2px solid #7f8bc0;
  box-shadow:0 0 0 4px #c9d0e7,6px 6px 0 rgba(43,49,91,.16)
}

.site-header{
  min-height:116px;
  display:flex;
  align-items:center;
  gap:17px;
  padding:14px 18px;
  background:linear-gradient(#f4f8ff,#dce8fb);
  border-bottom:3px double #858bc0
}

.crest{
  width:72px;
  height:72px;
  border-radius:50%;
  border:2px solid #6e79ad;
  background:radial-gradient(circle,#fff 0 56%,#e4e8f8 57%);
  color:#293b8e;
  font:700 25px Georgia,serif;
  flex:none
}

.brand{
  min-width:0
}

.eyebrow{
  font:10px "Courier New",monospace;
  color:#62698b;
  letter-spacing:1px
}

.brand h1{
  margin:2px 0;
  color:#293b8e;
  font:700 34px Georgia,serif;
  text-shadow:1px 1px #fff
}

.brand p{
  margin:2px 0;
  color:#666c86;
  font-size:11px
}

.header-right{
  margin-left:auto;
  text-align:right;
  color:#666b82;
  font-size:11px
}

.weather{
  font-size:15px;
  color:#3d4c8d;
  margin-bottom:7px
}

.date{
  font:10px "Courier New",monospace
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.nav{
  display:flex;
  flex-wrap:wrap;
  padding:5px 8px;
  background:#252b55;
  border-bottom:2px solid #10142d
}

.nav button{
  border:1px solid #6e77a9;
  background:linear-gradient(#eef1ff,#cdd4ee);
  color:#20295e;
  padding:5px 10px;
  margin:2px;
  font-size:12px
}

.nav button:hover,
.nav button.active{
  background:linear-gradient(#fff,#e0e5fb);
  color:#172c86
}

.ticker{
  display:flex;
  gap:10px;
  padding:6px 10px;
  background:#fffce5;
  border-bottom:1px solid #c8c49b;
  color:#665d00;
  font-size:11px
}

.ticker span{
  font-weight:bold
}


/* =========================================================
   LAYOUT
   ========================================================= */

.layout{
  display:grid;
  grid-template-columns:185px minmax(0,1fr) 190px;
  align-items:start
}

.sidebar{
  padding:5px;
  border-right:1px solid #c1c6df
}

.sidebar.right{
  border-right:0;
  border-left:1px solid #c1c6df
}

.main{
  min-height:650px;
  padding:5px 8px
}


/* =========================================================
   PANELS / SIDEBARS
   ========================================================= */

.panel{
  margin:5px 0 9px;
  border:1px solid #b3badc;
  background:#fbfcff
}

.panel h2,
.page-title{
  margin:0;
  padding:6px 8px;
  background:linear-gradient(#e9edff,#d3d9f5);
  border-bottom:1px solid #b1b8d8;
  color:#252f78;
  font-size:12px;
  letter-spacing:.4px
}

.panel>p,
.panel>div:not(.counter){
  margin:8px
}

.side-link{
  display:block;
  width:100%;
  padding:5px 7px;
  text-align:left;
  border:0;
  border-bottom:1px dotted #c3c6d6;
  background:#fff;
  color:#2d3b91;
  text-decoration:underline
}

.side-link:hover{
  background:#edf0ff
}

.small{
  font-size:11px;
  line-height:1.45
}

.tiny{
  font-size:10px
}

.muted{
  color:#777
}

.center{
  text-align:center
}

.counter{
  margin:9px;
  background:#111;
  color:#fff500;
  border:3px inset #777;
  text-align:center;
  padding:5px;
  font:26px "Courier New",monospace;
  letter-spacing:3px
}

.schedule-row{
  display:flex;
  justify-content:space-between;
  padding:5px 8px;
  border-bottom:1px dotted #bbbfd3;
  font-size:11px
}

.schedule-row:last-child{
  border-bottom:0
}

.full{
  width:calc(100% - 16px);
  margin:0 8px 9px
}


/* =========================================================
   PAGES
   ========================================================= */

.page{
  border:1px solid #bcc3df;
  background:#fff;
  min-height:620px
}

.page-inner{
  padding:13px 15px
}

.hero{
  padding:16px;
  border:1px solid #aeb7dc;
  background:linear-gradient(120deg,#f7f9ff,#e6ecfb);
  margin-bottom:12px
}

.hero h2{
  margin:0 0 7px;
  color:#293b8e;
  font:700 25px Georgia,serif
}

.hero p{
  line-height:1.7
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}

.card{
  border:1px solid #c1c6df;
  background:#fcfcff;
  padding:10px
}

.card h3{
  margin:0 0 6px;
  color:#2b397f;
  font-size:14px
}

.notice{
  padding:8px;
  border-left:4px solid #6574b7;
  background:#f0f3ff;
  margin:8px 0
}

.link-list{
  padding-left:20px;
  line-height:1.9
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button{
  border:1px solid #777d9c;
  background:linear-gradient(#fff,#e4e6ee);
  padding:6px 10px;
  color:#252b54
}

.button.primary{
  background:linear-gradient(#eef2ff,#cbd4f1);
  border-color:#6975a7;
  color:#1f2e79;
  font-weight:bold
}

.button.danger{
  background:#f7e7e7;
  border-color:#a87b7b;
  color:#7b2525
}

.button:hover{
  filter:brightness(.98)
}


/* =========================================================
   IDENTITY
   ========================================================= */

.identity{
  padding:8px
}

.identity-name{
  font-weight:bold;
  color:#293b8e;
  margin-bottom:5px
}

.identity-handle{
  font-size:11px;
  color:#69719a;
  margin-top:-3px;
  margin-bottom:5px
}

.name-form input{
  width:100%;
  padding:7px;
  border:1px solid #999
}

.name-form button{
  margin-top:6px
}

.logout{
  margin-top:6px;
  font-size:10px;
  text-decoration:underline;
  background:none;
  border:0;
  color:#777
}

.identity-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:7px
}

.identity-buttons .button{
  font-size:10px;
  padding:4px 7px
}


/* =========================================================
   POSTS
   ========================================================= */

.post-form{
  border:1px solid #c2c7dc;
  background:#f7f8ff;
  padding:10px;
  margin-bottom:12px
}

.post-form textarea{
  width:100%;
  resize:vertical;
  min-height:105px;
  border:1px solid #999;
  padding:7px;
  background:#fff
}

.form-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:7px
}

.posts{
  display:flex;
  flex-direction:column;
  gap:8px
}

.post{
  border:1px solid #c5c9dc;
  background:#fff;
  padding:9px
}

.post-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px dotted #aaaec2;
  padding-bottom:5px;
  margin-bottom:6px
}

.post-author{
  font-weight:bold;
  color:#293b8e
}

.post-handle{
  display:inline-block;
  margin-left:5px;
  color:#777d9c;
  font-size:10px;
  font-weight:normal
}

.post-date{
  font-size:10px;
  color:#777
}

.post-body{
  white-space:pre-wrap;
  word-break:break-word;
  line-height:1.5
}

.post-actions{
  text-align:right;
  margin-top:7px
}

.empty{
  padding:20px;
  text-align:center;
  color:#777;
  background:#fafafa;
  border:1px dashed #bbb
}


/* =========================================================
   POST IMAGES
   ========================================================= */

.post-image-wrap{
  margin-top:10px;
  padding-top:8px;
  border-top:1px dotted #b8bbca
}

.post-image{
  display:block;
  max-width:100%;
  max-height:420px;
  width:auto;
  height:auto;
  margin-top:9px;
  border:1px solid #b6bbd1;
  background:#f4f5fa;
  padding:3px
}

.post-image-link{
  display:inline-block;
  margin-top:8px
}

.image-url-input{
  width:100%;
  padding:7px;
  border:1px solid #999;
  background:#fff
}

.image-preview{
  max-width:180px;
  max-height:140px;
  display:block;
  margin-top:7px;
  border:1px solid #aeb5d2;
  background:#f4f5fa
}


/* =========================================================
   TABLES
   ========================================================= */

.table{
  width:100%;
  border-collapse:collapse
}

.table th,
.table td{
  border:1px solid #c3c8df;
  padding:7px;
  text-align:left
}

.table th{
  background:#edf0fc;
  color:#293674
}

.tag{
  display:inline-block;
  padding:2px 5px;
  border:1px solid #b0b6d4;
  background:#f0f2fb;
  font-size:10px;
  margin:2px
}

.event{
  border-left:4px solid #6877b6;
  padding:9px;
  background:#f7f8ff;
  margin:8px 0
}

.event b{
  color:#283a87
}

.contact-box{
  background:#f7f8ff;
  border:1px solid #c1c7e0;
  padding:10px;
  line-height:1.7
}


/* =========================================================
   CLUBROOMS
   ========================================================= */

.club-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}

.club-card{
  border:1px solid #c1c6df;
  background:#fcfcff;
  padding:10px
}

.club-card h3{
  margin:0 0 6px;
  color:#2b397f;
  font-size:14px
}

.club-card p{
  margin:5px 0;
  line-height:1.5
}

.club-room{
  border:1px solid #bcc3df;
  background:#fff
}

.club-room-header{
  padding:12px;
  margin-bottom:12px;
  background:linear-gradient(#eef1ff,#dce2f7);
  border-bottom:1px solid #b5bbd6
}

.club-room-header h2{
  margin:0 0 5px;
  color:#293b8e;
  font:700 22px Georgia,serif
}

.club-room-header p{
  margin:0;
  color:#666c86
}

.club-room-post-form{
  margin:10px;
  border:1px solid #c2c7dc;
  background:#f7f8ff;
  padding:10px
}

.club-room-post-form textarea{
  width:100%;
  resize:vertical;
  min-height:100px;
  border:1px solid #999;
  padding:7px;
  background:#fff
}

.club-room-posts{
  padding:0 10px 10px
}

.club-empty{
  padding:20px;
  text-align:center;
  color:#777;
  background:#fafafa;
  border:1px dashed #bbb
}


/* =========================================================
   PROFILES
   ========================================================= */

.profile{
  border:1px solid #bfc5dd;
  background:#fff
}

.profile-header{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:14px;
  background:linear-gradient(#f4f7ff,#e3e9f8);
  border-bottom:1px solid #b8bed8
}

.profile-card{
  display:flex;
  gap:18px;
  padding:15px;
  margin-bottom:15px;
  border:1px solid #b8bfdc;
  background:linear-gradient(120deg,#f8f9ff,#e8ecf8)
}

.profile-picture-wrap{
  width:120px;
  height:120px;
  flex:none;
  border:2px solid #7f8bb5;
  background:#fff;
  padding:3px
}

.profile-picture{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border:0;
  background:#eef0f7
}

.profile-picture-placeholder{
  width:120px;
  height:120px;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border:2px solid #7f89b5;
  background:#eef1fa;
  color:#6d77a4;
  font:700 40px Georgia,serif
}

.profile-info{
  min-width:0
}

.profile-info h2{
  margin:0 0 3px;
  color:#293b8e;
  font:700 24px Georgia,serif
}

.profile-name{
  margin:0 0 5px;
  color:#293b8e;
  font:700 25px Georgia,serif
}

.profile-handle{
  color:#6b7292;
  font-size:11px;
  margin-bottom:10px
}

.profile-bio{
  white-space:pre-wrap;
  line-height:1.6;
  margin:8px 0 12px;
  color:#45495e
}

.profile-meta{
  margin-top:7px;
  color:#777;
  font-size:10px
}

.profile-editor{
  border:1px solid #c2c7dc;
  background:#f7f8ff;
  padding:10px;
  margin-bottom:12px
}

.profile-editor label{
  display:block;
  margin-top:8px;
  margin-bottom:3px;
  font-weight:bold;
  color:#343b70
}

.profile-editor input,
.profile-editor textarea{
  width:100%;
  border:1px solid #999;
  background:#fff;
  padding:7px
}

.profile-editor textarea{
  resize:vertical;
  min-height:100px
}

.profile-editor .button{
  margin-top:9px
}

.profile-post-history{
  margin-top:12px
}

.profile-post-history h3{
  margin:0 0 8px;
  padding:6px 8px;
  background:linear-gradient(#e9edff,#d3d9f5);
  border:1px solid #b1b8d8;
  color:#252f78;
  font-size:12px
}

.profile-link{
  color:#293b8e;
  text-decoration:underline;
  cursor:pointer
}

.profile-link:hover{
  color:#172c86
}


/* =========================================================
   MINI PROFILE
   ========================================================= */

.user-mini-profile{
  display:flex;
  align-items:center;
  gap:8px
}

.user-mini-picture{
  width:38px;
  height:38px;
  object-fit:cover;
  border:1px solid #8d96bb;
  background:#eef0f7
}

.user-mini-name{
  font-weight:bold;
  color:#293b8e
}


/* =========================================================
   MODERATOR POSTS
   ========================================================= */

.moderator-post{
  border-left:4px solid #6574b7
}

.moderator-badge{
  display:inline-block;
  margin-left:5px;
  padding:2px 5px;
  border:1px solid #8b94bd;
  background:#e9ecfb;
  color:#293b8e;
  font-size:9px;
  font-weight:bold;
  vertical-align:middle
}

.moderator-name{
  font-weight:bold;
  color:#293b8e
}

.moderator-label{
  display:inline-block;
  margin-left:6px;
  padding:2px 4px;
  border:1px solid #8d96bd;
  background:#edf0fc;
  color:#46528b;
  font-size:8px;
  letter-spacing:.5px;
  vertical-align:middle
}

.moderator-only{
  border-left:4px solid #6877b6;
  background:#eef1ff;
  padding:8px;
  margin:8px 0;
  color:#40486f;
  font-size:11px
}


/* =========================================================
   NEWS & NOTICES
   ========================================================= */

.news-list{
  display:flex;
  flex-direction:column;
  gap:8px
}

.news-post{
  border:1px solid #c1c6df;
  border-left:4px solid #6574b7;
  background:#fff;
  padding:10px
}

.news-post-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px dotted #aaaec2;
  padding-bottom:5px;
  margin-bottom:7px
}

.news-post-title{
  color:#293b8e;
  font-weight:bold;
  font-size:14px
}

.news-post-date{
  color:#777;
  font-size:10px
}

.news-post-body{
  white-space:pre-wrap;
  word-break:break-word;
  line-height:1.6
}

.news-compose{
  border:1px solid #c2c7dc;
  background:#f7f8ff;
  padding:10px;
  margin-bottom:12px
}

.news-compose input,
.news-compose textarea{
  width:100%;
  border:1px solid #999;
  background:#fff;
  padding:7px;
  margin-top:5px
}

.news-compose textarea{
  min-height:130px;
  resize:vertical
}

.news-compose label{
  display:block;
  margin-top:7px;
  font-weight:bold;
  color:#343b70
}

.news-compose .button{
  margin-top:9px
}

.news-empty{
  padding:20px;
  text-align:center;
  color:#777;
  background:#fafafa;
  border:1px dashed #bbb
}


/* =========================================================
   FOOTER
   ========================================================= */

footer{
  border-top:2px solid #858ba9;
  padding:15px;
  text-align:center;
  background:#f0f2f8;
  color:#62677c;
  line-height:1.8
}


/* =========================================================
   TOAST
   ========================================================= */

.toast{
  position:fixed;
  right:18px;
  bottom:18px;
  background:#252b55;
  color:#fff;
  padding:10px 14px;
  border:2px solid #818ab8;
  box-shadow:3px 3px 0 #999;
  display:none;
  z-index:1000
}

.toast.show{
  display:block
}


/* =========================================================
   MODALS
   ========================================================= */

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:900
}

.modal.hidden{
  display:none
}

.modal-box{
  width:340px;
  max-width:92%;
  background:#f7f8ff;
  border:3px double #6973a4;
  box-shadow:5px 5px 0 #777;
  padding:15px
}

.modal-box h2{
  margin:0 0 8px;
  color:#293b8e;
  font:700 22px Georgia,serif
}

.modal-box input{
  display:block;
  width:100%;
  padding:7px;
  margin:7px 0;
  border:1px solid #999
}

.modal-actions{
  text-align:right;
  margin-top:9px
}

.status{
  font-size:11px;
  color:#a33;
  min-height:15px
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:850px){

  #wrap{
    max-width:100%;
    margin:0
  }

  .layout{
    grid-template-columns:1fr
  }

  .sidebar,
  .sidebar.right{
    border:0
  }

  .sidebar{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px
  }

  .sidebar .panel{
    margin:4px
  }

  .main{
    order:1
  }

  .sidebar{
    order:2
  }

  .sidebar.right{
    order:3
  }

  .header-right{
    display:none
  }

  .brand h1{
    font-size:27px
  }
}


@media(max-width:700px){

  .club-grid{
    grid-template-columns:1fr
  }

  .profile-header{
    flex-direction:column
  }

  .profile-card{
    flex-direction:column
  }

  .profile-picture-wrap,
  .profile-picture-placeholder{
    width:100px;
    height:100px
  }

  .news-post-header{
    flex-direction:column;
    gap:3px
  }
}


@media(max-width:600px){

  .grid2{
    grid-template-columns:1fr
  }

  .nav button{
    flex:1 1 auto
  }

  .sidebar{
    display:block
  }

  .club-room-header h2{
    font-size:20px
  }

  .profile-name{
    font-size:21px
  }

  .identity-buttons{
    display:block
  }

  .identity-buttons .button{
    margin:2px 2px 2px 0
  }
}
