:root {
  --page-bg:     #6666b3;
  --accent:      #6666b3;
  --panel-bg:    #dddddd;
  --stripe-hi:   #ffffff;
  --stripe-lo:   #d4d4d4;
  --title-text:  #000000;
  --link:        #0000cc;
  --link-hover:  #5e2d91;
  --text:        #000000;
  --online:      #008000;
  --offline:     #cc0000;
  --frame:       #000000;
  --btn-bg:      #e8e8e8;
  --btn-border:  #000000;
  --muted:       #666666;
  --notice-bg:   #eeeeee;

  --gap:     15px;
  --pad:     12px;
  --box-gap: 14px;

  --font-body: "Geneva", "Verdana", "DejaVu Sans", sans-serif;
  --font-ui:   "Charcoal", "Chicago", "Geneva", "Verdana", sans-serif;

  --transition: 150ms ease-in-out;

  --page-texture: url("images/page-bg.jpg");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  text-align: left;
  color: var(--text);
  background: var(--page-bg) var(--page-texture) center / cover fixed no-repeat;
}

img { border: 0; }

.header-banner {
  max-width: 1000px;
  margin: 12px auto 0;
  padding: 0 12px;
}

.header-banner .placeholder.banner {
  height: 180px;
  border: 1px solid var(--frame);
  margin-bottom: 0;
}

.page {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--pad);
}

.sidebar {
  flex: 0 0 180px;
  padding: 3px;
}

.content-area.mid { flex: 0 0 400px; }

.content-area.right { flex: 1 1 auto; }

.box {
  margin-bottom: var(--box-gap);
  background: var(--panel-bg);
  border: 1px solid var(--frame);
  border-radius: 0px;
  overflow: hidden;
}

.sidebar .box { margin-bottom: 12px; }

.sidebar .box:last-child { margin-bottom: 0; }

.box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: bold;
  color: var(--title-text);
  background: repeating-linear-gradient(
    180deg,
    var(--stripe-hi) 0 2px,
    var(--stripe-lo) 2px 4px
  );
  border-bottom: 1px solid var(--frame);
}

.title-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-icon { width: 16px; height: 16px; }

.hdr-arrows {
  font-size: 9px;
  color: #333333;
  letter-spacing: 2px;
  background: var(--btn-bg);
  border: 1px solid #888888;
  border-radius: 2px;
  padding: 2px 4px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: color var(--transition),
              background var(--transition);
}

.hdr-arrows:hover {
  color: #000000;
  background: #ffffff;
}

.box.collapsed .hdr-arrows {
  transform: rotate(90deg);
  display: inline-block;
}

.box-title.sub {
  margin: 16px -14px 0;
  font-size: 14px;
}

.box-body {
  padding: 12px 14px;
  line-height: 1.55;
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 250ms ease-in-out,
              padding 250ms ease-in-out;
}

.box.collapsed .box-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li { margin-bottom: 7px; }

.nav-links a {
  display: block;
  color: var(--link);
  text-decoration: underline;
  font-size: 13px;
  transition: color var(--transition);
}

.nav-links a.bold { font-weight: bold; }

.nav-links a:hover { color: var(--link-hover); }

.nav-links a[aria-current="page"] {
  color: var(--link-hover);
  font-weight: bold;
  text-decoration: none;
}

.nav-links a[aria-current="page"]::before {
  content: "▸ ";
  color: var(--text);
}

.btn {
  font: bold 11px var(--font-ui);
  color: #000000;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 0px;
  padding: 3px 9px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: background var(--transition);
}

.btn:hover { background: #ffffff; }

.btn:active { background: #c8c8c8; }

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

.props th {
  width: 42%;
  padding: 5px 8px 5px 0;
  text-align: left;
  vertical-align: top;
  color: var(--text);
  font-weight: normal;
}

.props td {
  padding: 5px 0;
  vertical-align: top;
  color: var(--text);
}

.flex-row {
  display: flex;
  align-items: flex-start;
}

.flex-row-text { flex: 1; }

.online {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--online);
  transition: color var(--transition);
}

.online.offline { color: var(--offline); }

.online em { font-style: italic; }

.online img { vertical-align: -2px; }

.online-icon { width: 16px; height: 16px; }

.contact-box p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 9px 0;
}

.content-area a { color: var(--link); }

.content-area a:hover { color: var(--link-hover); }

.contact-box a.mail { font-style: italic; }

.guilds-row {
  display: flex;
  gap: 15px;
  justify-content: space-around;
  align-items: flex-start;
  padding: 4px 0;
}

.guild {
  width: 48%;
  text-align: center;
}

.guild .placeholder { margin: 0 auto 12px; }

.guild a { font-weight: bold; }

.about-box {
  text-align: center;
  color: var(--text);
  padding: 18px 16px;
}

.about-box p { margin: 0 0 4px; }

.about-box .placeholder {
  margin: 10px auto 0;
  width: 60%;
}

hr {
  border: 0;
  border-top: 1px solid #888888;
  border-bottom: 1px solid #ffffff;
  height: 0;
  margin: 16px 0 12px;
}

.placeholder {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #777;
  color: var(--muted);
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
}

.placeholder.small { height: 80px; }

.placeholder.inline {
  width: 90px;
  height: 96px;
  margin-right: 14px;
  margin-top: 0;
  flex-shrink: 0;
}

.photo {
  width: 90px;
  height: 96px;
  object-fit: cover;
}

.photo.small {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.fill-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.notice {
  background: var(--notice-bg);
  border: 2px solid var(--frame);
  padding: 10px;
  margin-top: 12px;
  border-radius: 0px;
  font-size: 11px;
  font-weight: bold;
  color: var(--text);
}

.status-text {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text);
}

.updates-box {
  max-height: 150px;
  overflow-y: auto;
  font-size: 11px;
}

html {
  scrollbar-color: #c5c5c5 #f0f0f0;
  scrollbar-width: auto;
}

::-webkit-scrollbar { width: 16px; }

::-webkit-scrollbar-track {
  background: repeating-linear-gradient(
    180deg,
    var(--stripe-hi) 0 2px,
    #e4e4e4 2px 4px
  );
  border-left: 1px solid #999999;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f6f6f6 0%, #c9c9c9 100%);
  border: 1px solid #777777;
  border-radius: 0px;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .page {
    flex-direction: column;
  }

  .sidebar,
  .content-area.mid,
  .content-area.right {
    flex: 1 1 auto;
    width: 100%;
  }

  body {
    background-attachment: scroll;
  }

  .header-banner .placeholder.banner {
    height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.site-footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--pad) 18px;
  text-align: center;
  font-size: 11px;
  color: #e8e8f5;
}

.site-footer .badge {
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  color: #000000;
  border: 1px solid var(--frame);
  padding: 8px 14px;
  font: bold 13px var(--font-ui);
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.entry {
  border-left: 3px solid var(--accent);
}

.entry-meta {
  margin: 0 0 10px;
  font-size: 0.85em;
  color: var(--muted);
}

.read-time {
  font-style: italic;
  color: var(--text);
}

.entry-tags {
  margin: 12px 0 0;
  font-size: 0.85em;
  color: var(--muted);
}

.entry-tags a {
  display: inline-block;
  margin: 0 4px;
  padding: 1px 8px;
  border: 1px solid #999999;
  border-radius: 10px;
  text-decoration: none;
  transition: color var(--transition),
              border-color var(--transition);
}

.entry-tags a:hover {
  color: var(--link-hover);
  border-color: var(--accent);
}

.box-body code {
  font-family: "Monaco", "DejaVu Sans Mono", monospace;
  font-size: 0.9em;
  background: #ffffff;
  border: 1px solid #999999;
  padding: 0 4px;
  color: #000000;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--box-gap);
  margin-bottom: var(--box-gap);
}

.photo-card {
  margin: 0;
  background: var(--panel-bg);
  border: 1px solid var(--frame);
  overflow: hidden;
  transition: border-color var(--transition),
              transform var(--transition);
}

.photo-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 10px 12px;
}

.photo-title {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--link);
}

.photo-desc {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.5;
}

.photo-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.photo-missing {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
