:root {
  --frame-bg: #e6e5e5;
  --gap: 18px;
  --accent: #0055ff;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f8f9fa;
  color: #111
}

.wrap {
  max-width: 1200px;
  margin: 28px auto;
  padding: 20px
}

header {
  text-align: center;
  margin-bottom: 24px
}

header h1 {
  font-size: 26px;
  margin: 0;
  color: var(--accent)
}

header p {
  font-size: 15px;
  color: #444;
  margin: 6px 0 0
}

.controls {
  margin: 20px 0;
  text-align: center
}

.controls label {
  font-size: 14px;
  margin-right: 8px
}

.controls input {
  width: 70px;
  padding: 4px;
  font-size: 14px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px
}

.grid {
  display: grid;
  grid-template-columns: 1fr; /* 기본값: 모바일에서 1열 */
  gap: var(--gap)
}

/* 화면이 768px 이상이면 2열 */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12)
}

.card-header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.card .meta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px
}

.card .meta strong {
  font-size: 16px;
  color: #222
}

.goto-btn {
  position: absolute;
  top: 1px;
  right: 2px;
  background: linear-gradient(135deg, #0055ff, #0099ff);
  color: white;
  border: none;
  border-radius: 15px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 85, 255, 0.3);
  transition: all 0.2s ease;
}

.goto-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 85, 255, 0.4);
}

.goto-btn svg {
  width: 12px;
  height: 12px;
}

.frame {
  width: 100%;
  height: 420px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--frame-bg)
}

.frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease
}

.frame img.hidden {
  opacity: 0
}

/* 섹션 공통 스타일 */
.featured {
  margin-top: 40px;
}

.featured h1 {
  font-size: 26px;
  color: var(--accent);
  text-align: center;
  margin-bottom: 10px;
}

.featured p.notice {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin: 0 0 20px;
}

/* 타일 그리드 스타일 */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
}

.tile-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.tile-grid img.hidden {
  opacity: 0;
}

/* 하단 제작자 */
footer {
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: #444;
  padding-bottom: 60px;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}
