/* ===== KODATTORIA SITE CSS ===== */

body {
  background-color: #ffffff;
  color: #000000;
  font-family: serif;
  font-size: medium;
  margin: 0;
  padding: 0;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('kodattoria_logo.png');
  background-repeat: repeat;
  background-size: 320px auto;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
a { color: #0000ff; }
a:visited { color: #800080; }
a:hover { color: #cc0000; }

/* LANG BAR */
#lang-bar {
  text-align: right;
  padding: 4px 8px;
  font-size: x-small;
  background: #f0f0f0;
  border-bottom: 1px solid #cccccc;
  position: relative;
  z-index: 1;
}
#lang-bar button {
  font-size: x-small;
  font-family: inherit;
  background: #ffffff;
  border: 1px solid #999999;
  padding: 1px 6px;
  margin-left: 2px;
  cursor: pointer;
}
#lang-bar button.active {
  background: #333333;
  color: #ffffff;
  border-color: #333333;
}

/* WRAPPER */
#wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}

/* MAIN TABLE */
#main-table {
  width: 100%;
  border-collapse: collapse;
}

/* LEFT COLUMN */
#left-cell {
  width: 220px;
  vertical-align: top;
  padding-right: 24px;
}
#photo-box img {
  width: 200px;
  display: block;
  border: 1px solid #cccccc;
}

/* SITE NAV */
#site-nav {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  border: 1px solid #cccccc;
  background: #fafafa;
}
#site-nav li {
  border-bottom: 1px solid #e0e0e0;
}
#site-nav li:last-child { border-bottom: none; }
#site-nav li a {
  display: block;
  padding: 5px 10px;
  font-size: small;
  text-decoration: none;
  color: #0000ff;
}
#site-nav li a:hover { background: #fffbe6; color: #cc0000; }
#site-nav li.active a {
  background: #333333;
  color: #ffffff;
  font-weight: bold;
}
#site-nav li.active a:visited { color: #ffffff; }

/* RIGHT COLUMN */
#info-cell {
  vertical-align: top;
  padding-top: 4px;
}

/* HEADER */
#site-title {
  font-size: x-large;
  font-weight: bold;
  letter-spacing: 0.08em;
  border-bottom: 2px solid #000000;
  padding-bottom: 4px;
  margin-bottom: 2px;
}
#site-tagline {
  font-size: small;
  color: #666666;
  margin-bottom: 16px;
}

/* SECTION TITLE */
.section-title {
  font-size: small;
  font-weight: bold;
  background: #eeeeee;
  border-left: 4px solid #333333;
  padding: 2px 6px;
  margin-top: 16px;
  margin-bottom: 6px;
}

/* BODY TEXT */
.body-text {
  margin: 0 0 4px 8px;
  font-size: small;
  color: #555555;
  display: none;
}
body.lang-ja .body-text[data-lang="ja"],
body.lang-en .body-text[data-lang="en"],
body.lang-it .body-text[data-lang="it"] { display: block; }

/* NEXT EVENT */
.next-event-box {
  border: 1px solid #cccccc;
  background: #fffef0;
  padding: 8px 10px;
  font-size: small;
  margin-bottom: 4px;
}
.next-event-box .date {
  font-size: x-large;
  font-weight: bold;
  color: #cc0000;
}
.next-event-box .vol {
  font-size: x-small;
  color: #555555;
  margin-top: 2px;
}

/* MEMBERS */
.member-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0 8px;
}
.member-list li {
  padding: 3px 0;
  font-size: small;
  border-bottom: 1px dotted #dddddd;
}
.member-name { font-weight: bold; }
.member-bio { color: #777777; font-size: x-small; }

/* MAGAZINE LIST */
.mag-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0 8px;
}
.mag-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #dddddd;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.mag-cover-box {
  width: 70px;
  min-width: 70px;
  height: 99px;
  background: #f0f0f0;
  border: 1px solid #cccccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #aaaaaa;
  text-align: center;
  flex-shrink: 0;
}
.mag-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mag-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.vol-label {
  color: #999999;
  font-size: x-small;
  margin-right: 4px;
}

/* GOODS */
.goods-item {
  display: inline-block;
  border: 1px solid #cccccc;
  padding: 8px;
  margin: 4px 0 4px 8px;
  vertical-align: top;
  text-align: center;
  width: 120px;
}
.goods-photo {
  width: 100px;
  height: 100px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: x-small;
  color: #aaaaaa;
  margin: 0 auto 6px;
}
.goods-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.goods-name { font-weight: bold; font-size: small; }
.goods-price { color: #cc0000; font-size: x-small; margin-top: 2px; }

/* PURCHASE NOTE */
.purchase-note {
  font-size: x-small;
  color: #cc0000;
  margin: 6px 0 0 8px;
}

/* INSTAGRAM */
.insta-box {
  margin: 4px 0 4px 8px;
  font-size: small;
}
.insta-box img.qr {
  width: 80px;
  height: 80px;
  vertical-align: middle;
  border: 1px solid #cccccc;
  margin-right: 8px;
}
.insta-handle {
  font-weight: bold;
  font-size: medium;
}

/* FOOTER */
#footer {
  text-align: center;
  font-size: x-small;
  color: #999999;
  border-top: 1px solid #cccccc;
  padding: 10px 0;
  margin-top: 20px;
}

/* LANGUAGE VISIBILITY */
[data-lang] { display: none; }
body.lang-ja [data-lang="ja"] { display: inline; }
body.lang-en [data-lang="en"] { display: inline; }
body.lang-it [data-lang="it"] { display: inline; }
li[data-lang], div[data-lang], p[data-lang] { display: none; }
body.lang-ja li[data-lang="ja"],
body.lang-ja div[data-lang="ja"],
body.lang-ja p[data-lang="ja"] { display: block; }
body.lang-en li[data-lang="en"],
body.lang-en div[data-lang="en"],
body.lang-en p[data-lang="en"] { display: block; }
body.lang-it li[data-lang="it"],
body.lang-it div[data-lang="it"],
body.lang-it p[data-lang="it"] { display: block; }

/* RESPONSIVE */
@media (max-width: 560px) {
  #main-table, #main-table tbody, #main-table tr, #main-table td {
    display: block;
    width: 100%;
  }
  #left-cell {
    width: 100%;
    padding-right: 0;
    margin-bottom: 16px;
  }
  #photo-box > div { width: 100% !important; }
  #site-nav { margin-top: 8px; }
}
