
/* ===== 基本設定 ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }

:root {
  --gallery-white: #ffffff;
  --gallery-blue: #1745b5;
  --gallery-blue-light: #d5d6d8;
  --gallery-line: #858585;
  --gallery-glass: #d1d2d4;
}

body {
font-family:
"DotGothic16",
"MS Gothic",
monospace;

color: var(--gallery-white);
background: transparent;

font-size: 13px;
line-height: 1.9;
word-break: break-word;
}

/* ==================================================
ページ全体
================================================== */

.illust-page {
width: 100%;
max-width: 900px;
min-width: 0;

margin: 0 auto;
padding: 2px 12px 12px;
}

.glass-panel {
  min-width: 0;
  padding: 14px;
  margin-bottom: 12px;

  color: #202020;
  background: #d1d2d4;

  border: 2px solid;
  border-color:
    #f7f7f7
    #777777
    #777777
    #f7f7f7;

  border-radius: 0;

  box-shadow:
    inset 1px 1px 0 #ffffff,
    3px 3px 0 #858585;
}

/* ==================================================
検索・表示切り替え
================================================== */

.tools-top {
display: flex;
align-items: center;
justify-content: space-between;

gap: 10px;
margin-bottom: 14px;
}

/* ===== 検索欄 ===== */

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;

  width: 100%;
  max-width: 360px;
  min-width: 0;

  padding: 6px 9px;

  color: #202020;
  background: #f0f0f0;

  border: 2px solid;
  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;

  border-radius: 0;
  box-shadow: inset 1px 1px 0 #b5b5b5;
}

.search-box > span {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;

  border: none;
  outline: none;
  background: transparent;

  color: #202020;
  font-family: inherit;
  font-size: 11px;
}

.search-box input::placeholder {
  color: #777777;
  opacity: 1;
}

.search-box:focus-within {
  outline: 2px solid #1745b5;
  outline-offset: 2px;
}

/* ===== ICON / LIST ===== */

.view-switch {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
}

.view-button {
  min-height: 32px;
  padding: 4px 9px;

  color: #202020;
  background: #d1d2d4;

  border: 2px solid;
  border-color:
    #ffffff
    #777777
    #777777
    #ffffff;

  border-radius: 0;

  box-shadow:
    inset 1px 1px 0 #eeeeee,
    1px 1px 0 #858585;

  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.view-button:hover {
  background: #e4e4e4;
}

.view-button.active {
  color: #ffffff;
  background: #1745b5;

  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;

  box-shadow:
    inset 1px 1px 0 #0e3185;
}

.view-button:active {
  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;

  box-shadow: inset 1px 1px 2px #777777;
}


/* ==================================================
タグ
================================================== */

.tag-button {
  padding: 4px 9px;

  color: #202020;
  background: #d1d2d4;

  border: 2px solid;
  border-color:
    #ffffff
    #777777
    #777777
    #ffffff;

  border-radius: 0;

  font-family: inherit;
  font-size: 10px;
  line-height: 1.7;

  cursor: pointer;
}

.tag-button:hover {
  background: #e8e8e8;
}

.tag-button.active {
  color: #ffffff;
  background: #1745b5;

  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;
}

/* ==================================================
アイコン表示
================================================== */

.gallery-grid {
display: grid;

grid-template-columns:
repeat(3, minmax(0, 1fr));

gap: 12px;
}

.art-card {
  min-width: 0;
  overflow: hidden;

  color: #202020;
  background: #d1d2d4;

  border: 2px solid;
  border-color:
    #f7f7f7
    #777777
    #777777
    #f7f7f7;

  border-radius: 0;

  box-shadow:
    inset 1px 1px 0 #ffffff,
    2px 2px 0 #888888;
}


.art-open {
display: block;

width: 100%;

padding: 0;

border: none;

color: inherit;
background: transparent;

font: inherit;
text-align: left;

cursor: pointer;
}

/* ===== 正方形サムネイル ===== */

.art-thumbnail {
  display: block;

  width: 100%;
  aspect-ratio: 1 / 1;

  object-fit: cover;

  background: #bfc0c2;

  border: 2px solid;
  border-color:
    #858585
    #ffffff
    #ffffff
    #858585;
}
/* ===== タイトルのみ ===== */

.art-card-info {
padding: 7px 8px;
}

.art-title {
font-size: 11px;
line-height: 1.7;

overflow-wrap: anywhere;
}

/* ==================================================
   アイコン表示ではタイトルのみ
================================================== */

#gallery-grid:not(.list-view) .art-description,
#gallery-grid:not(.list-view) .art-tags {
  display: none;
}


/* ==================================================
   LIST表示
================================================== */

#gallery-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== リストカード ===== */

#gallery-grid.list-view .art-card {
  width: 100%;
  min-width: 0;
}

/* ===== 画像・情報・タグ ===== */

#gallery-grid.list-view .art-open {
  display: flex;
  align-items: center;

  width: 100%;
  min-width: 0;

  padding: 6px;

  text-align: left;
}

/* ===== イラスト ===== */

#gallery-grid.list-view .art-thumbnail {
  width: 70px;
  height: 70px;

  min-width: 70px;
  max-width: 70px;

  object-fit: cover;
  aspect-ratio: 1 / 1;
}

/* ===== 中央の情報 ===== */

#gallery-grid.list-view .art-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;

  flex: 1;
  min-width: 0;

  margin-left: 10px;
  gap: 4px;
}

/* ===== タイトル ===== */

#gallery-grid.list-view .art-title {
  margin: 0;

  font-size: 1.2em;
  font-weight: bold;

  text-align: left;
}

/* ===== 説明文 ===== */

#gallery-grid.list-view .art-description {
  display: block;

  min-width: 0;

  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 0.9em;
  line-height: 1.4;

  opacity: 0.85;
}

/* ===== タグ ===== */

#gallery-grid.list-view .art-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;

  flex-shrink: 0;

  width: 90px;

  gap: 3px;
  margin-left: 8px;
}

/* ===== 小さなタグ ===== */

#gallery-grid.list-view .art-list-tag {
  display: inline-block;
  padding: 1px 4px;

  color: #202020;
  background: #e5e5e5;

  border: 1px solid #858585;
  border-radius: 0;

  font-size: 0.7em;
  line-height: 1.4;
  white-space: nowrap;
}

/* ==================================================
作品がない場合
================================================== */

.empty-message {
  padding: 40px 10px;

  color: #202020;
  text-align: center;

  background: #d1d2d4;

  border: 2px dashed #858585;
  border-radius: 0;
}

.empty-message p + p {
  margin-top: 6px;
  font-size: 11px;
}

/* ==================================================
モーダル
================================================== */


.art-modal {
  width: min(760px, calc(100% - 20px));
  max-width: 760px;

  max-height: 96vh;
  max-height: 96dvh;

  margin: auto;
  padding: 10px;

  overflow: auto;

  color: #202020;
  background: #d1d2d4;

  border: 3px solid;
  border-color:
    #f7f7f7
    #777777
    #777777
    #f7f7f7;

  border-radius: 0;

  box-shadow:
    inset 1px 1px 0 #ffffff,
    4px 4px 0 #777777,
    0 12px 35px rgba(0, 0, 0, 0.35);
}

.art-modal[open] {
  display: block;
}

.art-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

/* ==================================================
モーダル画像
================================================== */

.modal-image-area {
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;

  min-height: 100px;
  padding: 12px;

  background: #bfc0c2;

  border: 2px solid;
  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;
}

/* ===== モーダル画像 ===== */

.modal-image-area img {
display: block;

width: 80%;
max-width: 80%;

max-height: 68vh;
max-height: 68dvh;

height: auto;

object-fit: contain;
}

/* ===== CLOSE ===== */

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;

  width: 30px;
  height: 30px;
  padding: 0;

  color: #202020;
  background: #d1d2d4;

  border: 2px solid;
  border-color:
    #ffffff
    #777777
    #777777
    #ffffff;

  border-radius: 0;

  font-family: inherit;
  font-size: 14px;
  line-height: 1;

  cursor: pointer;
}

.modal-close:hover {
  color: #ffffff;
  background: #1745b5;
}

/* ==================================================
モーダル作品情報
================================================== */

.modal-info {
  padding: 12px 8px 14px;
}

.modal-info h2 {
  margin: 0 0 10px;

  color: #202020;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.7;
}

.modal-description {
  margin: 0 0 14px;

  color: #303030;
  font-size: 12px;
  line-height: 2;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.modal-tag-heading {
  margin-bottom: 6px;

  color: #303030;
  font-size: 10px;
  letter-spacing: 1px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-tag {
  padding: 4px 9px;

  color: #202020;
  background: #e5e5e5;

  border: 1px solid #777777;
  border-radius: 0;

  font-family: inherit;
  font-size: 10px;
  line-height: 1.7;
}

/* ==================================================
前後移動
================================================== */

.modal-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  padding: 10px 4px 4px;

  color: #202020;
  border-top: 1px solid #858585;
}

.modal-navigation span {
  font-size: 10px;
}

.nav-button {
  padding: 6px 9px;

  color: #202020;
  background: #d1d2d4;

  border: 2px solid;
  border-color:
    #ffffff
    #777777
    #777777
    #ffffff;

  border-radius: 0;

  font: inherit;
  font-size: 10px;

  cursor: pointer;
}

.nav-button:hover:not(:disabled) {
  color: #ffffff;
  background: #1745b5;
}

.nav-button:active:not(:disabled) {
  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;
}

/* ==================================================
フォーカス
================================================== */

button:focus-visible,
.art-open:focus-visible {
outline: 2px solid #ffffff;
outline-offset: 3px;
}

/* ==================================================
小さい画面
================================================== */

@media (max-width: 420px) {

.illust-page {
padding: 7px;
}

.glass-panel {
padding: 10px;
}

/* ===== 検索欄とボタン ===== */

.tools-top {
gap: 6px;
}

.search-box {
max-width: none;
flex: 1;
}

.view-switch {
gap: 3px;
}

.view-button {
padding: 5px 6px;

font-size: 9px;

}

/* ===== 2列表示 ===== */

.gallery-grid {
grid-template-columns:
repeat(2, minmax(0, 1fr));

gap: 8px;

}

.art-card-info {
padding: 6px;
}

/* ===== リスト ===== */

.list-view .art-card {
grid-template-columns:
76px minmax(0, 1fr);
}

/* ===== モーダル ===== */

.art-modal {
width: calc(100% - 14px);
}

.modal-image-area {
padding: 8px;
}

.modal-image-area img {
width: 80%;
max-width: 80%;

max-height: 62vh;
max-height: 62dvh;

}

.modal-info {
padding: 10px;
}

}

/* 画像の長押し・選択・ドラッグを抑制 */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ==================================================
動きを減らす設定
================================================== */

@media (prefers-reduced-motion: reduce) {

*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}

}


/* ==================================================
大きい画面で表示するボタン
================================================== */

.large-view-area {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #a0a0a0;
}

.large-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  min-height: 34px;
  padding: 5px 12px;

  color: #202020;
  background: #d1d2d4;
  border: 2px solid;
  border-color:
    #ffffff
    #777777
    #777777
    #ffffff;

  box-shadow:
    inset 1px 1px 0 #eeeeee,
    1px 1px 0 #858585;

  font-family: inherit;
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.large-view-button:hover {
  color: #ffffff;
  background: #1745b5;
}

.large-view-button:active {
  border-color:
    #777777
    #ffffff
    #ffffff
    #777777;

  box-shadow: inset 1px 1px 2px #777777;
}

/* ==================================================
フッター
================================================== */

.illust-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;

  width: 100%;
  margin-top: 18px;
  padding: 12px 8px;

  color: #202020;
  background: rgba(209, 210, 212, 0.82);

  border-top: 2px solid #858585;

  font-family: inherit;
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
}

.illust-footer a {
  color: #202020;
  text-decoration: none;

  padding: 2px 7px;

  border: 1px solid #858585;
  background: #e5e5e5;
}

.illust-footer a:hover {
  color: #ffffff;
  background: #1745b5;
}

.illust-footer span {
  color: #404040;
}

/* ===== 小さい画面 ===== */

@media (max-width: 420px) {
  .large-view-button {
    width: 100%;
    padding: 7px 8px;
  }

  .illust-footer {
    margin-top: 12px;
    padding: 10px 5px;
  }
}











