:root {
  --bg-1: #fbf7ef;
  --bg-2: #f7edf3;
  --bg-3: #ece8fb;
  --card: rgba(255, 253, 248, 0.96);
  --card-strong: #ffffff;
  --line: #dfcbd5;
  --line-soft: rgba(157, 99, 124, 0.16);
  --text: #403641;
  --text-strong: #332b34;
  --muted: #7f7078;
  --accent: #9d637c;
  --accent-2: #6f5f91;
  --gold: #c98636;
  --gold-dark: #8f5d10;
  --lavender: #ede8fb;
  --shadow: 0 12px 30px rgba(85, 62, 74, 0.09);
  --shadow-strong: 0 20px 48px rgba(63, 51, 64, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.88), transparent 28%),
    radial-gradient(circle at 96% 4%, rgba(236, 232, 251, 0.92), transparent 32%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
}

body[data-page="list"] {
  background: linear-gradient(180deg, #fbf6ed 0%, #f6f2ea 100%);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-hero {
  padding: 18px 12px 10px;
}

.hero-inner,
.wrap {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(22px, 4vw, 42px);
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.42), transparent 25%),
    linear-gradient(135deg, rgba(63, 51, 64, 0.98), rgba(111, 95, 145, 0.94));
  box-shadow: var(--shadow-strong);
}

body[data-page="list"] .hero-inner {
  color: #35281d;
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid rgba(86, 61, 34, 0.14);
}

.hero-inner::after {
  content: "";
  position: absolute;
  inset: 0 auto auto -35%;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  animation: shineMove 4.8s ease-in-out infinite;
}

@keyframes shineMove {
  0%, 42% { left: -35%; }
  72%, 100% { left: 115%; }
}

.kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 0;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

body[data-page="list"] .kicker {
  color: #b48a45;
  background: transparent;
  border: 0;
  padding: 0;
}

h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  max-width: 840px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.9;
}

body[data-page="list"] .lead {
  color: #8b7b68;
  font-weight: 700;
}

.top-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.nav-link,
.btn,
.gallery-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--accent);
  background: #f0e4eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link {
  color: #4f4150;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(35, 26, 40, 0.16);
}

.nav-link.active,
.btn.primary,
.gallery-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.nav-link.accent,
.btn.gold,
.gallery-btn.product {
  color: #fff;
  background: linear-gradient(135deg, #d5aa57, #9d7432);
}

.btn.ghost {
  color: #4f4150;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.wrap {
  padding: 6px 0 46px;
}

.panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: var(--card);
  box-shadow: var(--shadow);
}

.hidden,
[hidden] {
  display: none !important;
}

.setup-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.setup-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.field-label,
.form-grid label span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 900;
}

.form-grid input,
.search,
.select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.search,
.select {
  border-radius: 999px;
  padding: 10px 13px;
}

.form-grid input:focus,
.search:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(157, 99, 124, 0.13);
}

.setup-actions,
.shared-next-actions,
.bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.route-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="list"] .route-hub {
  display: none;
}

.route-card {
  min-height: 104px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 252, 0.96));
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.route-card:hover,
.work-card:hover,
.image-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(85, 62, 74, 0.13);
}

.route-card span,
.bottom-kicker {
  display: inline-flex;
  color: #c77a2d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.route-card strong {
  display: block;
  margin-top: 7px;
  font-size: 17px;
  line-height: 1.45;
}

.route-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
}

.route-card.submit {
  background: linear-gradient(135deg, #ce5f8b, #8e5ddd);
  color: #fff;
}

.route-card.submit span,
.route-card.submit small {
  color: rgba(255, 255, 255, 0.86);
}

.route-card.award {
  background: linear-gradient(135deg, #fff8e3, #fff6ff);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(132px, auto);
  gap: 10px;
  align-items: start;
  padding: 10px;
  backdrop-filter: blur(14px);
}

body[data-page="list"] .toolbar {
  background: rgba(255, 250, 242, 0.96);
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 12px 8px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(85, 62, 74, 0.07);
}

.filter-toggle span::before {
  content: "絞";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  border-radius: 999px;
  background: rgba(63, 51, 64, 0.14);
  color: var(--accent);
}

.filter-toggle b {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(157, 99, 124, 0.11);
  color: var(--accent);
  font-size: 12px;
}

.filter-toggle.active,
.filter-toggle.has-filter {
  border-color: rgba(157, 99, 124, 0.32);
  background: linear-gradient(135deg, #fff8fd, #fffaf0);
}

.toolbar-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 4px;
}

.chip-block {
  min-width: 0;
}

.contest-filter {
  display: none;
  grid-column: 1 / -1;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.88), rgba(255, 246, 250, 0.86));
  border: 1px solid rgba(217, 164, 71, 0.20);
}

body[data-page="awards"] .contest-filter {
  display: block;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 126px;
  overflow: auto;
  padding: 1px 2px 2px 0;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(157, 99, 124, 0.16);
}

.filter-actions {
  display: flex;
  align-items: end;
}

.stat-card {
  justify-self: end;
  min-height: 58px;
  min-width: 136px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.72);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 2px;
  color: var(--text-strong);
  font-size: 22px;
}

.active-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.active-filter-summary span,
.active-filter-summary b {
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 10px;
}

.active-filter-summary span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.active-filter-summary b {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.error-box,
.empty-state {
  margin-top: 14px;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  line-height: 1.8;
  box-shadow: var(--shadow);
  text-align: center;
}

.error-box {
  background: #fff0f2;
  border-color: #f1caca;
  color: #b23a51;
  font-weight: 800;
}

.page-section {
  margin-top: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  align-items: start;
}

.work-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(223, 203, 213, 0.92);
  border-radius: 22px;
  background: var(--card-strong);
  color: inherit;
  text-align: left;
  box-shadow: 0 7px 18px rgba(85, 62, 74, 0.07);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.work-card:hover {
  border-color: rgba(157, 99, 124, 0.38);
}

.work-card.award-tier-grand,
.image-tile.award-tier-grand {
  border-color: rgba(217, 164, 71, 0.55);
  box-shadow: 0 18px 42px rgba(154, 101, 20, 0.14);
}

.work-card.award-tier-semi,
.image-tile.award-tier-semi {
  border-color: rgba(160, 160, 175, 0.38);
}

.work-card.award-tier-special,
.image-tile.award-tier-special {
  border-color: rgba(207, 95, 139, 0.30);
}

.work-card.award-tier-rookie,
.image-tile.award-tier-rookie {
  border-color: rgba(76, 175, 149, 0.28);
}

.work-image-wrap {
  position: relative;
  background: #f6f1ec;
}

.work-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #f8f0f6, #eef2ff);
}

.awards-grid .work-image {
  object-fit: contain;
}

.work-image.no-image,
.image-tile-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subthumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(135deg, #fffaf7, #fff);
  border-top: 1px solid rgba(157, 99, 124, 0.12);
}

.subthumb-row img {
  display: block;
  width: clamp(64px, 28%, 98px);
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(157, 99, 124, 0.12);
  background: #f6f1ec;
}

.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 13px;
}

.work-title {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
  word-break: break-word;
}

.gallery-grid .work-title,
.awards-grid .work-title {
  font-size: 17px;
}

.work-meta,
.posted-at {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  font-weight: 700;
}

.posted-at,
.design-line {
  color: var(--accent);
  font-weight: 900;
}

.design-line {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.award-history {
  margin-top: 8px;
  color: #946b24;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 900;
}

.award-history span {
  display: block;
  color: #a46c22;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.work-preview {
  display: -webkit-box;
  margin: 9px 0 0;
  overflow: hidden;
  color: #514750;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: linear-gradient(135deg, #f6eff7, #eff4ff);
  color: #596070;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.card-actions .gallery-btn {
  flex: 1 1 150px;
}

.award-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 7px 16px rgba(40, 28, 18, 0.18);
}

.award-badge::before {
  content: "🏆";
  margin-right: 4px;
}

.award-badge.large {
  font-size: 13px;
  padding: 8px 12px;
}

.award-badge.gold {
  background: linear-gradient(135deg, #fff0a8 0%, #d9a447 42%, #7a4308 100%);
}

.award-badge.silver {
  background: linear-gradient(135deg, #f9fafb 0%, #c9c9d4 48%, #777684 100%);
  color: #2f2d38;
}

.award-badge.bronze {
  background: linear-gradient(135deg, #ffeff8 0%, #f4a4bd 45%, #a5456e 100%);
}

.award-badge.green {
  background: linear-gradient(135deg, #eafff5 0%, #7ad6bd 45%, #16856d 100%);
}

.award-ribbon,
.tile-award {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.image-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(223, 203, 213, 0.7);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(63, 43, 24, 0.07);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.image-tile img,
.image-tile-empty {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.awards-group {
  margin-bottom: 26px;
}

.award-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.award-label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #fff8d8, #f4e3eb);
  border: 1px solid rgba(201, 134, 54, 0.26);
  color: #8a6230;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(85, 62, 74, 0.08);
}

.award-label::before {
  content: "🏆";
  margin-right: 7px;
}

.award-label.award-tier-grand {
  min-height: 48px;
  background: linear-gradient(135deg, #fff6bf 0%, #f4be48 34%, #b06b14 100%);
  color: #4b2f08;
  font-size: 19px;
}

.award-label.award-tier-semi {
  background: linear-gradient(135deg, #ffffff 0%, #e6e4ea 44%, #a9a8b5 100%);
  color: #3f3d4b;
}

.award-label.award-tier-special {
  background: linear-gradient(135deg, #fff2fb 0%, #ffd9a8 48%, #d17a8f 100%);
  color: #6d354d;
}

.award-label.award-tier-rookie {
  background: linear-gradient(135deg, #effff8 0%, #bef4df 45%, #6cc9b3 100%);
  color: #225647;
}

.award-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 800;
}

.award-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-weight: 900;
}

.award-count strong {
  color: var(--text-strong);
  font-size: 28px;
}

.award-total-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 900;
}

.award-total-note strong {
  color: var(--text-strong);
  font-size: 22px;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.awards-grid .award-tier-grand {
  grid-column: span 2;
}

.awards-grid .award-tier-grand .work-image {
  aspect-ratio: 16 / 9;
}

.winner-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4f8, #fffaf0);
  border: 1px solid rgba(157, 99, 124, 0.12);
  color: var(--text-strong);
  font-weight: 900;
  line-height: 1.5;
}

.winner-card span {
  display: block;
  color: #8b536d;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.bottom-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.shared-next-step {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  background:
    radial-gradient(circle at 5% 0%, rgba(255, 255, 255, 0.88), transparent 30%),
    linear-gradient(135deg, rgba(255, 250, 246, 0.98), rgba(255, 246, 252, 0.92));
  border-color: rgba(157, 99, 124, 0.18);
}

body[data-page="gallery"] .shared-next-step {
  display: grid;
}

body[data-page="gallery"] .bottom-cta {
  display: none;
}

.shared-next-step h2 {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-size: 22px;
  line-height: 1.45;
}

.shared-next-step p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

body[data-page="list"] .bottom-cta {
  display: none;
}

.load-more-wrap {
  margin-top: 18px;
  text-align: center;
}

.load-more-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bottom-cta h2 {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-size: 24px;
}

.bottom-cta p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

.detail-dialog {
  width: min(1040px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 0;
  border-radius: 26px;
  padding: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(244, 227, 235, 0.62), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 253, 0.98));
  box-shadow: 0 24px 70px rgba(49, 38, 45, 0.28);
}

.detail-dialog::backdrop {
  background: rgba(24, 21, 33, 0.52);
  backdrop-filter: blur(5px);
}

.close-btn {
  position: sticky;
  top: 0;
  left: 100%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 0 24px 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(68, 43, 86, 0.18);
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.08fr) minmax(280px, 0.92fr);
  gap: 22px;
  padding: 0 22px 24px;
}

.modal-main-image {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7f1f6, #eef3ff);
}

.modal-main-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  color: var(--muted);
  font-weight: 900;
}

.modal-thumb-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.modal-thumb-btn {
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(41, 34, 31, 0.08);
}

.modal-thumb-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(157, 99, 124, 0.12), 0 8px 18px rgba(41, 34, 31, 0.08);
}

.modal-thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.modal-info {
  min-width: 0;
}

.modal-title {
  margin: 16px 0 8px;
  color: var(--text-strong);
  font-size: clamp(25px, 3.2vw, 38px);
  line-height: 1.38;
}

.modal-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  font-weight: 700;
}

.modal-award-box {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8ec, #fff);
  border: 1px solid rgba(201, 134, 54, 0.24);
}

.modal-award-box.award-tier-grand {
  background: linear-gradient(135deg, #fff8c8 0%, #fff1e2 44%, #f3d08a 100%);
}

.modal-award-box.award-tier-semi {
  background: linear-gradient(135deg, #ffffff 0%, #f4f4f8 52%, #e2e1e9 100%);
}

.modal-award-box.award-tier-special {
  background: linear-gradient(135deg, #fff2fb 0%, #fffaf0 56%, #ffe4ed 100%);
}

.modal-award-box.award-tier-rookie {
  background: linear-gradient(135deg, #effff8 0%, #fff 58%, #e4fbf5 100%);
}

.modal-award-contest {
  margin-top: 8px;
  color: #7a5b33;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 800;
}

.product-summary {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 13px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8ec, #f8f1ff);
  border: 1px solid rgba(201, 134, 54, 0.24);
}

.product-image,
.product-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 15px;
  background: #f4efe8;
  color: #8a7c6b;
  font-size: 12px;
  font-weight: 900;
}

.product-image {
  display: block;
  object-fit: cover;
}

.product-kicker {
  color: #8a6334;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.product-title {
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 900;
}

.product-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.product-summary .gallery-btn {
  margin-top: 10px;
}

.modal-description {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.75);
}

.modal-description h3 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: 13px;
}

.modal-description p {
  margin: 0;
  color: #3e3540;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.modal-info-grid div {
  padding: 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-soft);
}

.modal-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.modal-info-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .toolbar-fields {
    grid-template-columns: 1fr 1fr;
  }

  .awards-grid .award-tier-grand {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .site-hero {
    padding: 14px 8px 8px;
  }

  .hero-inner,
  .wrap {
    width: min(100% - 16px, 1280px);
  }

  .hero-inner {
    border-radius: 20px;
    padding: 22px 16px;
  }

  h1 {
    font-size: 30px;
  }

  .nav-link,
  .btn {
    flex: 1 1 130px;
  }

  .route-hub,
  .form-grid,
  .shared-next-step,
  .bottom-cta,
  .modal-layout {
    grid-template-columns: 1fr;
  }

  .toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .toolbar-fields {
    grid-template-columns: 1fr;
  }

  .filter-actions .btn,
  .filter-toggle,
  .stat-card {
    width: 100%;
    justify-self: stretch;
  }

  .search,
  .select,
  .btn,
  .gallery-btn {
    min-height: 44px;
    font-size: 16px;
  }

  .gallery-grid,
  .awards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .award-head {
    display: block;
  }

  .award-count {
    margin-top: 8px;
  }

  .modal-layout {
    padding: 0 14px 18px;
  }

  .modal-thumb-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .modal-info {
    padding-top: 14px;
  }
}

@media (max-width: 520px) {
  .gallery-grid,
  .awards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .work-image {
    object-fit: contain;
  }

  .work-body {
    padding: 9px;
  }

  .gallery-grid .work-title,
  .awards-grid .work-title {
    font-size: 13px;
  }

  .work-meta,
  .posted-at,
  .design-line,
  .award-history,
  .work-preview {
    font-size: 10px;
    line-height: 1.55;
  }

  .tag-badge {
    padding: 4px 7px;
    font-size: 9px;
  }

  .card-actions .gallery-btn {
    flex-basis: 100%;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .modal-info-grid,
  .product-summary {
    grid-template-columns: 1fr;
  }

  .product-image,
  .product-image-placeholder {
    width: 76px;
    height: 76px;
  }

  .modal-thumb-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .subthumb-row {
    gap: 4px;
    padding: 6px;
  }

  .subthumb-row img {
    width: clamp(48px, 46%, 74px);
    height: 44px;
    border-radius: 8px;
  }
}

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