/* Art Space 2015 TOP sample designs v1.1 */
:root {
  --ink: #4c4b7c;
  --muted: #7a7c93;
  --cyan: #3cc2dd;
  --line: #7ed6e7;
  --pale: #eefaff;
  --coral: #ef7581;
  --panel-bg: rgba(255,255,255,.98);
  --shadow: 0 1px 0 rgba(39, 144, 164, .03);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #fff; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Yu Gothic", "YuGothic", "Hiragino Sans", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.sample-page { min-height: 100vh; display: flex; flex-direction: column; }
.sample-shell { width: min(1100px, calc(100% - 36px)); margin: 0 auto; }
.sample-hero { width: 100%; margin: 0 auto; }
.sample-hero img { width: 100%; height: auto; }

.sample-topnav {
  width: 100%;
  min-height: 50px;
  border-bottom: 1px solid rgba(126, 214, 231, .16);
  background: linear-gradient(90deg, #f5fcff 0%, #eefaff 45%, #f8fdff 100%);
}
.sample-topnav-inner {
  width: min(980px, calc(100% - 24px));
  min-height: 50px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}
.sample-topnav button,
.sample-side-links button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: default;
}
.sample-topnav button {
  position: relative;
  min-height: 36px;
  padding: 5px 14px;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .04em;
}
.sample-topnav button::before,
.sample-topnav button:last-child::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--cyan);
}
.sample-topnav button::before { left: 0; }
.sample-topnav button:last-child::after { right: 0; }

.sample-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 22px auto 18px;
  color: #3e4c83;
  font-family: "Kiwi Maru", "Yu Gothic", sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .12em;
}
.sample-title::before,
.sample-title::after {
  content: "";
  width: 110px;
  height: 2px;
  background: var(--cyan);
  opacity: .85;
}

.gallery-menu { display: grid; }
.gallery-button {
  position: relative;
  appearance: none;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(126, 214, 231, .55);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.gallery-button:focus-visible { outline: 3px solid rgba(60, 194, 221, .42); outline-offset: 2px; }
.gallery-button:hover .gallery-button-image { transform: scale(1.025); }
.gallery-button-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease;
}
.gallery-button-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 8px 4px;
  background: rgba(54, 65, 105, .78);
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .025em;
  text-shadow: 0 1px 2px rgba(0,0,0,.26);
}
.gallery-button[data-group="2"] .gallery-button-label { background: rgba(174, 65, 101, .82); }
.gallery-button[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(60, 194, 221, .18); }

.info-panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel-bg);
}
.panel-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 46px;
  margin: 0;
  padding: 0 18px;
  color: var(--ink);
  font-family: "Kiwi Maru", "Yu Gothic", sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .06em;
}
.panel-heading::before {
  content: "";
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: var(--cyan);
}
.panel-heading[hidden] { display: none; }

.topics-list { padding: 0 18px 10px; }
.topic-item {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr);
  gap: 18px;
  align-items: center;
  min-height: 134px;
  padding: 10px 0;
  border-top: 1px solid rgba(126, 214, 231, .55);
}
.topic-item:first-child { border-top: 0; }
.topic-thumb {
  width: 150px;
  height: 112px;
  display: grid;
  place-items: center;
  background: #f6fbfd;
}
.topic-thumb img { max-width: 100%; max-height: 112px; object-fit: contain; }
.topic-date { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.topic-title { margin: 0 0 7px; color: #425187; font-size: 16px; font-weight: 500; line-height: 1.45; }
.topic-summary { margin: 0; color: #7b7c92; font-size: 12px; line-height: 1.7; }
.loading-note { margin: 24px 18px; color: var(--muted); font-size: 12px; }

.sample-side-links {
  border: 1px solid var(--line);
  padding: 10px 18px;
  background: #fff;
}
.sample-side-links button {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 7px 4px 7px 24px;
  text-align: left;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: .04em;
}
.sample-side-links button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: var(--cyan);
}

.dynamic-panel.is-gallery .topics-view { display: none; }
.dynamic-panel:not(.is-gallery) .gallery-view { display: none; }
.gallery-view { min-height: 520px; padding: 20px 22px 24px; }
.gallery-demo-label {
  min-height: 28px;
  margin: 0 0 8px;
  color: #64678b;
  font-size: 12px;
  text-align: center;
  letter-spacing: .08em;
}
.gallery-stage {
  display: grid;
  grid-template-columns: 46px minmax(0, 520px) 46px;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.gallery-stage-figure { margin: 0; text-align: center; }
.gallery-main-wrap {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0 auto;
  background: #fff;
}
.gallery-main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.gallery-count { margin-top: 6px; color: #9a9d9e; font-size: 10px; letter-spacing: .08em; }
.gallery-arrow {
  appearance: none;
  width: 42px;
  height: 60px;
  border: 0;
  background: transparent;
  color: #a3a7a8;
  font: 36px/1 Arial, sans-serif;
  cursor: pointer;
}
.gallery-arrow:hover { color: var(--coral); }
.gallery-thumbs {
  width: min(620px, 100%);
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(10, 48px);
  justify-content: center;
  gap: 5px;
}
.gallery-thumb {
  appearance: none;
  width: 48px;
  height: 48px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}
.gallery-thumb img { width: 42px; height: 42px; object-fit: cover; }
.gallery-thumb[aria-current="true"] { border-color: var(--cyan); background: #f4fbfd; }
.gallery-status { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--muted); font-size: 12px; }
.gallery-status[hidden] { display: none; }

.sample-footer {
  margin-top: auto;
  min-height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #eafaff, #effcff 55%, #eafaff);
  color: #7b8092;
  font-size: 11px;
  letter-spacing: .02em;
}

/* A: hero + gallery grid + left text menu + topics */
.design-a .sample-shell { width: min(1040px, calc(100% - 34px)); }
.design-a .sample-hero { margin-top: 0; }
.design-a .gallery-menu {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
.design-a .gallery-button { aspect-ratio: 2.65 / 1; }
.design-a .gallery-button:nth-child(5) { grid-column: 1 / 2; transform: translateX(50%); }
.design-a .gallery-button:nth-child(6) { grid-column: 2 / 3; transform: translateX(50%); }
.design-a .gallery-button:nth-child(7) { grid-column: 3 / 4; transform: translateX(50%); }
.design-a .lower-layout {
  display: grid;
  grid-template-columns: 230px minmax(0,1fr);
  gap: 18px;
  align-items: stretch;
  margin: 24px 0 22px;
}
.design-a .sample-side-links { min-height: 382px; }

/* B: top nav + hero + gallery grid + full-width switching panel */
.design-b .sample-shell { width: min(1000px, calc(100% - 34px)); }
.design-b .sample-hero { margin-top: 0; }
.design-b .gallery-menu {
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.design-b .gallery-button { aspect-ratio: 2.5 / 1; }
.design-b .gallery-button:nth-child(5) { grid-column: 1 / 2; transform: translateX(50%); }
.design-b .gallery-button:nth-child(6) { grid-column: 2 / 3; transform: translateX(50%); }
.design-b .gallery-button:nth-child(7) { grid-column: 3 / 4; transform: translateX(50%); }
.design-b .dynamic-panel { margin: 20px 0 128px; }
.design-b .gallery-view { min-height: 560px; }

/* C: top nav + hero + left gallery column + topics */
.design-c .sample-shell { width: min(1040px, calc(100% - 34px)); }
.design-c .sample-hero { margin-top: 0; }
.design-c .lower-layout {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 18px;
  align-items: start;
  margin: 16px 0 40px;
}
.design-c .gallery-column { border: 1px solid var(--line); padding: 0 16px 14px; }
.design-c .gallery-column .panel-heading { padding-left: 0; padding-right: 0; font-size: 16px; letter-spacing: .025em; white-space: nowrap; }
.design-c .gallery-menu { grid-template-columns: 1fr; gap: 7px; }
.design-c .gallery-button { width: 245px; height: auto; aspect-ratio: 2.6 / 1; justify-self: center; }
.design-c .gallery-button-label { min-height: 25px; font-size: 11px; }
.design-c .dynamic-panel { min-height: 100%; }
.design-c .topic-item { grid-template-columns: 160px minmax(0,1fr); }
.design-c .topic-thumb { width: 160px; }
.design-c .gallery-view { min-height: 540px; padding-left: 12px; padding-right: 12px; }
.design-c .gallery-stage { grid-template-columns: 38px minmax(0, 430px) 38px; gap: 4px; }
.design-c .gallery-main-wrap { width: min(430px,100%); }
.design-c .gallery-thumbs { grid-template-columns: repeat(8, 44px); }
.design-c .gallery-thumb { width: 44px; height: 44px; }
.design-c .gallery-thumb img { width: 38px; height: 38px; }

@media (max-width: 760px) {
  .sample-shell, .design-a .sample-shell, .design-b .sample-shell, .design-c .sample-shell { width: min(100% - 20px, 1000px); }
  .sample-topnav-inner { grid-template-columns: repeat(5, auto); overflow-x: auto; justify-content: center; }
  .sample-topnav button { white-space: nowrap; font-size: 12px; padding-inline: 12px; }
  .sample-title { gap: 10px; font-size: clamp(17px, 5vw, 22px); }
  .sample-title::before, .sample-title::after { width: 42px; }
  .design-a .gallery-menu, .design-b .gallery-menu { grid-template-columns: repeat(2, 1fr); }
  .design-a .gallery-button:nth-child(n), .design-b .gallery-button:nth-child(n) { grid-column: auto; margin-left: 0; width: auto; transform: none; }
  .design-a .lower-layout, .design-c .lower-layout { grid-template-columns: 1fr; }
  .design-a .sample-side-links { min-height: 0; }
  .sample-side-links { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 12px; }
  .design-c .gallery-column { padding-bottom: 12px; }
  .design-c .gallery-menu { grid-template-columns: repeat(2,1fr); }
  .design-c .gallery-button { width: auto; height: auto; aspect-ratio: 2.6 / 1; justify-self: stretch; }
  .topic-item, .design-c .topic-item { grid-template-columns: 92px minmax(0,1fr); gap: 12px; min-height: 110px; }
  .topic-thumb, .design-c .topic-thumb { width: 92px; height: 88px; }
  .topic-thumb img { max-height: 88px; }
  .topic-title { font-size: 14px; }
  .topic-summary { display: none; }
  .gallery-view { padding: 14px 8px 18px; min-height: 420px; }
  .gallery-stage, .design-c .gallery-stage { grid-template-columns: 30px minmax(0,1fr) 30px; gap: 2px; }
  .gallery-arrow { width: 30px; font-size: 30px; }
  .gallery-thumbs, .design-c .gallery-thumbs { grid-template-columns: repeat(auto-fit, 44px); max-width: 420px; }
  .gallery-thumb, .design-c .gallery-thumb { width: 44px; height: 44px; }
  .gallery-thumb img, .design-c .gallery-thumb img { width: 38px; height: 38px; }
  .design-b .dynamic-panel { margin-bottom: 40px; }
}
