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

:root {
  --color-primary: #C84545;
  --color-base: #1f1714;
  --color-gilding: #D4AF6A;
  --color-ink: #F2E8D5;
  --color-accent-green: #7A9A5A;
  --text-dark: #F2E8D5;
  --text-light: #b8a890;
  --line-blue: #8fb0e8;
  --side-margin: 200px;
}

html, body {
  font-family: 'Roboto Condensed', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  background-color: var(--color-base);
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%239a7a3a' stroke-width='0.8' opacity='0.20'%3E%3Crect x='20' y='20' width='120' height='120' fill='none'/%3E%3Crect x='30' y='30' width='100' height='100' fill='none'/%3E%3Cpath d='M80,20 L140,80 L80,140 L20,80 Z'/%3E%3Cpath d='M80,35 L125,80 L80,125 L35,80 Z'/%3E%3Ccircle cx='80' cy='80' r='12'/%3E%3Ccircle cx='80' cy='80' r='6'/%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3Ccircle cx='140' cy='20' r='4'/%3E%3Ccircle cx='20' cy='140' r='4'/%3E%3Ccircle cx='140' cy='140' r='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
  background-attachment: fixed;
  line-height: 1.6;
}

body {
  padding: 0 var(--side-margin);
}
h1, h2, h3, h4, h5, h6, p, a, span, li, button, input, select, div {
  font-family: 'Roboto Condensed', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

h1, h2, h3, h4 {
  color: var(--color-ink);
  font-weight: 700;
}
.roboto-black { font-weight: 900; letter-spacing: 0.02em; }
.roboto-bold { font-weight: 700; }
.roboto-normal { font-weight: 400; }

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1001;
  padding: 22px var(--side-margin);
  transition: background 0.3s ease;
}

nav.scrolled {
  background: rgba(42, 31, 26, 0.92);
  backdrop-filter: blur(6px);
}
.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 48px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
}

.btn-white {
  background: #fff;
  color: var(--color-ink);
  padding: 6px 14px;
  border-radius: 4px;
}

.hero {
  height: 100vh;
  background: linear-gradient(180deg, rgba(42,31,26,0.35) 0%, rgba(42,31,26,0.55) 100%), url('https://res.cloudinary.com/znouuxhw/image/upload/v1789981372/hero-window.webp') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: calc(-1 * var(--side-margin));
  margin-right: calc(-1 * var(--side-margin));
  padding: 0 var(--side-margin);
  color: #fff;
}

.hero h1 {
  font-size: 39px;
  line-height: 1.3;
  margin-bottom: 16px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 2px 18px rgba(0,0,0,0.4);
}

.hero p {
  max-width: 560px;
  font-size: 20px;
  line-height: 1.8;
  opacity: 0.95;
  margin-bottom: 28px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
}

.btn-dark {
  background: var(--color-ink);
  color: #fff;
  padding: 12px 22px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}

.btn-transparent {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 12px 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}

.timeline-section {
  padding: 120px var(--side-margin) 90px;
  background: linear-gradient(180deg, var(--color-base) 0%, #f3d7ce 100%);
  margin-left: calc(-1 * var(--side-margin));
  margin-right: calc(-1 * var(--side-margin));
}
.timeline-wrap {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  padding: 0 10px;
}

.timeline-axis {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, var(--color-ink) 0%, var(--color-ink) 88%, transparent 88%, transparent 100%);
  top: 60px;
}

.timeline-arrow {
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid var(--color-ink);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.timeline-dots {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.dot-item {
  width: 30%;
  text-align: center;
  position: relative;
}
.dot-item:nth-child(1) { margin-top: 0; }
.dot-item:nth-child(2) { margin-top: 80px; }
.dot-item:nth-child(3) { margin-top: 0; }

.dot-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 3px solid var(--color-base);
  box-shadow: 0 0 0 2px var(--color-ink);
}
.dot-red { background: var(--color-primary); }
.dot-gold { background: var(--color-gilding); }
.dot-green { background: var(--color-accent-green); }
.dot-item p {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.6;
}
.dot-item strong {
  font-weight: 900;
  color: var(--color-ink);
}

.masterworks-section { padding: 70px 0; }
.masterworks-section > h2 { text-align: center; font-size: 47px; margin-bottom: 60px; }

.work-card {
  max-width: 1140px;
  margin: 0 auto 90px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.work-card.reverse {
  grid-template-columns: 1fr 1fr;
  direction: rtl;
}
.work-card.reverse .work-text { direction: ltr; }
.work-text h3 { font-size: 25px; margin-bottom: 6px; }
.work-text .sub-title { font-size: 19px; color: var(--text-light); margin-bottom: 22px; font-weight: 500; }
.work-text .desc-item {
  border-left: 2px solid var(--line-blue);
  padding-left: 14px;
  margin-bottom: 14px;
  font-size: 20px;
  color: var(--text-light);
}
.work-image img { width: 100%; display: block; border-radius: 6px; }

.detail-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 21px;
  font-weight: 700;
  cursor: pointer;
}

.studio-entry-section { padding: 90px 0; text-align: center; }
.studio-entry-section h2 { font-size: 47px; margin-bottom: 24px; }
.studio-entry-section p { max-width: 760px; margin: 0 auto 32px; font-size: 20px; color: var(--text-light); }

.stories-section { padding: 70px 0 90px; }
.stories-section h2 { text-align: center; font-size: 47px; margin-bottom: 40px; }

.stories-entry-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.stories-entry-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.3s ease;
  cursor: pointer;
}
.stories-entry-card:hover { transform: translateY(-4px); }

.stories-entry-card .cover { height: 180px; background-size: cover; background-position: center; background-color: var(--color-gilding); }
.stories-entry-card .entry-text { padding: 22px; }
.stories-entry-card .tag { font-size: 17px; color: var(--color-primary); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.stories-entry-card h4 { font-size: 25px; margin-bottom: 8px; }
.stories-entry-card p { font-size: 19px; color: var(--text-light); }

footer {
  background: var(--color-ink);
  color: #fff;
  padding: 40px var(--side-margin);
  margin-left: calc(-1 * var(--side-margin));
  margin-right: calc(-1 * var(--side-margin));
}
footer h3 { color: #fff; margin-bottom: 8px; }
footer p { color: #d9cfbf; font-size: 19px; }

.page { display: none; }
#home-page { display: block; }
body:has(#archive-page:target, #studio-page:target, #shop-page:target, #stories-page:target, #my-page:target, #detail-dragon:target, #detail-cloud:target, #detail-longevity:target, #detail-xinqi:target, #detail-zhuyu:target) #home-page { display: none; }
#home-page:target,
#archive-page:target,
#studio-page:target,
#shop-page:target,
#stories-page:target,
#my-page:target,
#detail-dragon:target,
#detail-cloud:target,
#detail-longevity:target,
#detail-xinqi:target,
#detail-zhuyu:target {
  display: block;
}

#archive-page { padding-top: 140px; padding-bottom: 100px; }
#archive-page h2 { text-align: center; font-size: 45px; margin-bottom: 50px; }

.detail-page {
  display: none;
  padding: 140px 0 100px;
}
.detail-page.active { display: block; }

.detail-back {
  text-decoration: none;
  color: var(--text-dark);
  margin-bottom: 36px;
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.detail-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 70px;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}
.detail-image img { width: 100%; border-radius: 6px; }
.detail-meta h2 { font-size: 25px; margin-bottom: 12px; }
.detail-meta .provenance { font-size: 19px; color: var(--text-light); margin-bottom: 28px; font-weight: 500; }
.detail-block { margin-bottom: 32px; }
.detail-block h4 { font-size: 24px; margin-bottom: 10px; font-weight: 900; }
.detail-block p { font-size: 20px; color: var(--text-light); }
.palette-row { display: flex; gap: 14px; margin-top: 12px; }
.palette-swatch { width: 40px; height: 40px; border-radius: 4px; border: 1px solid #d9cfbf; }

.create-btn {
  background-color: var(--color-primary);
  color: #fff;
  padding: 14px 26px;
  border: none;
  font-size: 20px;
  cursor: pointer;
  margin-top: 24px;
  border-radius: 4px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#studio-page { padding-top: 140px; padding-bottom: 100px; }
#studio-page h2 { text-align: center; font-size: 45px; margin-bottom: 14px; }
.studio-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
  font-size: 20px;
  color: var(--text-light);
}

.studio-workspace {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.studio-panel {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  padding: 18px;
}
.studio-panel h4 { font-size: 21px; margin-bottom: 14px; font-weight: 900; }

.line-material-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.line-material-card {
  background: #fff;
  border: 1px solid #4a3a30;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.line-material-card:hover {
  box-shadow: 0 8px 20px rgba(42, 31, 26, 0.12);
  transform: translateY(-2px);
}

.line-material-card .thumb {
  height: 78px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--color-base);
  border-bottom: 1px solid #e7d9bd;
}
.line-material-card .card-text { padding: 10px; }
.line-material-card h5 { font-size: 18px; margin-bottom: 2px; font-weight: 900; }
.line-material-card p { font-size: 16px; line-height: 1.45; color: var(--text-light); }

.canvas-wrap {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  padding: 22px;
}
.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.canvas-header h4 { font-size: 22px; font-weight: 900; }
.canvas-tools { display: flex; gap: 8px; }
.tool-btn {
  background: var(--color-ink);
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
}

.canvas-area {
  width: 100%;
  height: 520px;
  background: #fff;
  border: 2px dashed var(--color-gilding);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  background-image:
    linear-gradient(rgba(184, 146, 74, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 146, 74, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

.canvas-area .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gilding);
  font-weight: 700;
  font-size: 20px;
  pointer-events: none;
}
.canvas-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.canvas-footer p { font-size: 18px; color: var(--text-light); }
.studio-actions {
  max-width: 1140px;
  margin: 36px auto 0;
  display: flex;
  justify-content: center;
  gap: 16px;
}

#shop-page { padding-top: 140px; padding-bottom: 100px; }
#shop-page h2 { text-align: center; font-size: 45px; margin-bottom: 40px; }
.shop-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
  font-size: 20px;
  color: var(--text-light);
}

.shop-category-title {
  max-width: 1140px;
  margin: 0 auto 24px;
  font-size: 24px;
  font-weight: 900;
  padding-left: 4px;
  border-left: 5px solid var(--color-primary);
}
.shop-list {
  max-width: 1140px;
  margin: 0 auto 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.shop-item {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.shop-item:hover {
  box-shadow: 0 18px 40px rgba(42, 31, 26, 0.12);
  transform: translateY(-3px);
}

.shop-item .item-image {
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
  min-height: 280px;
}
.shop-item .item-body {
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.shop-item .item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.shop-item h3 { font-size: 25px; margin-bottom: 6px; }
.shop-item .item-en-name { font-size: 19px; color: var(--color-primary); font-weight: 700; margin-bottom: 10px; }
.shop-item .item-price { font-size: 24px; font-weight: 900; color: var(--color-primary); white-space: nowrap; }
.shop-item p { font-size: 19px; color: var(--text-light); margin-bottom: 14px; }
.item-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.item-tags span {
  background: var(--color-base);
  border: 1px solid #4a3a30;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-ink);
}

.item-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #4a3a30;
  margin-bottom: 18px;
}
.item-meta-row .meta-block h5 {
  font-size: 17px;
  color: var(--color-primary);
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.item-meta-row .meta-block p { font-size: 19px; color: var(--text-dark); font-weight: 500; margin-bottom: 0; }

.item-actions { display: flex; gap: 14px; }
.item-actions .btn-dark { flex: 1; }
.item-actions .btn-outline {
  background: transparent;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  padding: 12px 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}

#stories-page { padding-top: 140px; padding-bottom: 100px; }
#stories-page h2 { text-align: center; font-size: 45px; margin-bottom: 40px; }

.stories-tabs {
  max-width: 1140px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: center;
  gap: 14px;
  border-bottom: 1px solid #e7d9bd;
  padding-bottom: 16px;
}

.stories-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.stories-tab-btn.active { background: var(--color-primary); color: #fff; }

.stories-panel { display: none; }
.stories-panel.active { display: block; }

.artisan-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.artisan-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  overflow: hidden;
}
.artisan-card .avatar {
  height: 240px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
}
.artisan-card .card-body { padding: 24px; }
.artisan-card h4 { font-size: 24px; margin-bottom: 6px; }
.artisan-card .role { font-size: 18px; color: var(--color-primary); font-weight: 900; letter-spacing: 0.06em; margin-bottom: 12px; }
.artisan-card p { font-size: 19px; color: var(--text-light); margin-bottom: 10px; }
.artisan-card .meta-row {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 18px;
  color: var(--text-light);
  font-weight: 700;
}

.tutorial-list {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.tutorial-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
}
.tutorial-card .tutorial-cover {
  width: 220px;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
  flex-shrink: 0;
}
.tutorial-card .tutorial-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tutorial-card h4 { font-size: 25px; margin-bottom: 10px; }
.tutorial-card p { font-size: 19px; color: var(--text-light); margin-bottom: 14px; }
.tutorial-card .steps { font-size: 18px; color: var(--text-dark); font-weight: 700; }
.tutorial-card .steps span {
  display: inline-block;
  background: var(--color-ink);
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 6px;
}
.case-showcase { max-width: 1140px; margin: 0 auto; }

.case-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  margin-bottom: 28px;
  overflow: hidden;
}
.case-card .case-cover {
  height: 260px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
}
.case-card .case-body {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.case-card h4 { font-size: 24px; margin-bottom: 10px; }
.case-card p { font-size: 19px; color: var(--text-light); margin-bottom: 14px; }
.case-card .case-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.case-card .case-meta span {
  background: var(--color-base);
  border: 1px solid #4a3a30;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 900;
  color: var(--color-ink);
}

.case-screen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.case-screen-grid .screen {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
  border-radius: 4px;
  border: 1px solid #4a3a30;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
#login-modal:target { display: flex; }

.login-modal {
  background: #2a1f1a;
  border-radius: 12px;
  padding: 44px 40px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-modal .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}
.login-modal .close-btn:hover { background: rgba(0,0,0,0.06); }
.login-modal h2 { font-size: 25px; margin-bottom: 6px; text-align: center; }
.login-modal .login-sub { text-align: center; font-size: 19px; color: var(--text-light); margin-bottom: 28px; }
.login-form-group { margin-bottom: 18px; }
.login-form-group label {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9cfbf;
  border-radius: 6px;
  font-size: 20px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.login-form-group input:focus { border-color: var(--color-primary); }
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 18px;
}
.login-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  cursor: pointer;
}
.login-options a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.login-btn {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-size: 21px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.login-divider {
  text-align: center;
  margin: 22px 0;
  font-size: 17px;
  color: var(--text-light);
  position: relative;
}

.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: #d9cfbf;
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
.login-social { display: flex; gap: 12px; }
.login-social button {
  flex: 1;
  padding: 10px;
  border: 1px solid #d9cfbf;
  background: #fff;
  border-radius: 6px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}

#my-page {
  padding-top: 140px;
  padding-bottom: 100px;
  background: var(--color-base);
}
.my-container { max-width: 1140px; margin: 0 auto; }

.my-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e7d9bd;
}

.my-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-gilding);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 37px;
  font-weight: 900;
  color: #fff;
}
.my-header-info h2 { font-size: 25px; margin-bottom: 4px; }
.my-header-info p { font-size: 19px; color: var(--text-light); }

.my-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid #e7d9bd;
  padding-bottom: 0;
}
.my-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.my-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.my-panel { display: none; }
.my-panel.active { display: block; }
.my-motifs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.my-motif-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  overflow: hidden;
}
.my-motif-card .motif-thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
}
.my-motif-card .motif-body { padding: 18px; }
.my-motif-card h4 { font-size: 22px; margin-bottom: 4px; }
.my-motif-card p { font-size: 18px; color: var(--text-light); margin-bottom: 12px; }
.my-motif-card .motif-actions { display: flex; gap: 8px; }
.my-motif-card .motif-actions button {
  flex: 1;
  padding: 8px;
  border: 1px solid #4a3a30;
  background: #fff;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.my-motif-card .motif-actions .primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.order-list { display: flex; flex-direction: column; gap: 20px; }

.order-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  padding: 24px;
}
.order-card .order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7d9bd;
}
.order-card .order-id { font-size: 19px; font-weight: 900; color: var(--text-dark); }
.order-card .order-status {
  font-size: 17px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--color-accent-green);
  color: #fff;
}
.order-card .order-status.pending { background: var(--color-gilding); }
.order-card .order-items { display: flex; gap: 16px; margin-bottom: 16px; }
.order-card .order-item-thumb {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-gilding);
  flex-shrink: 0;
}
.order-card .order-item-info h5 { font-size: 20px; margin-bottom: 4px; }
.order-card .order-item-info p { font-size: 18px; color: var(--text-light); }
.order-card .order-footer { display: flex; justify-content: space-between; align-items: center; }
.order-card .order-total { font-size: 21px; font-weight: 900; color: var(--color-primary); }
.order-card .order-actions button {
  padding: 8px 16px;
  border: 1px solid var(--color-ink);
  background: transparent;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
}
.order-card .order-actions .primary { background: var(--color-ink); color: #fff; }
.settings-panel { max-width: 600px; }
.settings-group {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.settings-group h4 {
  font-size: 22px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7d9bd;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 19px;
}
.setting-row .label { color: var(--text-dark); font-weight: 500; }
.setting-row .value { color: var(--text-light); }

.setting-row .toggle {
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.setting-row .toggle.on { background: var(--color-primary); }

.setting-row .toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
}

.setting-row .toggle.on::after { left: 22px; }
.logout-btn {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

.sub-detail-page {
  display: none;
  padding: 140px 0 100px;
}
.sub-detail-page.active { display: block; }
.sub-detail-wrap { max-width: 1140px; margin: 0 auto; }

.sub-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.sub-detail-grid .big-image {
  width: 100%;
  border-radius: 8px;
  display: block;
  background-size: cover;
  background-position: center;
  min-height: 480px;
  border: 1px solid #4a3a30;
}
.sub-detail-meta h2 { font-size: 25px; margin-bottom: 8px; }
.sub-detail-meta .sub-en { font-size: 20px; color: var(--color-primary); font-weight: 700; margin-bottom: 16px; }
.sub-detail-meta .sub-price { font-size: 25px; font-weight: 900; color: var(--color-primary); margin-bottom: 20px; }
.sub-detail-meta .sub-desc { font-size: 20px; color: var(--text-light); margin-bottom: 22px; line-height: 1.8; }
.sub-detail-meta .sub-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.sub-detail-meta .sub-tags span {
  background: var(--color-base);
  border: 1px solid #4a3a30;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
}
.sub-detail-meta .sub-spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid #4a3a30;
  border-radius: 6px;
  margin-bottom: 24px;
}
.sub-detail-meta .sub-spec h5 { font-size: 16px; color: var(--color-primary); font-weight: 900; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.sub-detail-meta .sub-spec p { font-size: 19px; color: var(--text-dark); font-weight: 500; }
.sub-detail-meta .sub-actions { display: flex; gap: 14px; }
.sub-detail-meta .sub-actions .btn-dark { flex: 1; }
.sub-detail-meta .sub-actions .btn-outline {
  background: transparent;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  padding: 12px 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}
.sub-detail-section { margin-top: 50px; }
.sub-detail-section h3 { font-size: 24px; margin-bottom: 16px; padding-left: 10px; border-left: 5px solid var(--color-primary); }
.sub-detail-section p { font-size: 20px; color: var(--text-light); line-height: 1.9; margin-bottom: 12px; }
.sub-detail-section .step-list { display: flex; flex-direction: column; gap: 14px; }

.sub-detail-section .step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  padding: 18px;
}

.sub-detail-section .step-item .step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}
.sub-detail-section .step-item .step-text h5 { font-size: 21px; margin-bottom: 4px; }
.sub-detail-section .step-item .step-text p { font-size: 19px; color: var(--text-light); margin: 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.related-card {
  background: #2a1f1a;
  border: 1px solid #4a3a30;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.related-card:hover { transform: translateY(-3px); }
.related-card .rel-img { height: 160px; background-size: cover; background-position: center; }
.related-card .rel-body { padding: 16px; }
.related-card h5 { font-size: 21px; margin-bottom: 4px; }
.related-card p { font-size: 18px; color: var(--text-light); }

#scrollThread {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  height: 440px;
  pointer-events: none;
  z-index: 10;
}

#scrollThread .phoenix-part {
  fill: none;
  stroke: #8C2F2F;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#scrollThread .phoenix-part.gold { stroke: #B8924A; stroke-width: 3; }

#scrollThread .phoenix-part.ink { stroke: #2A1F1A; stroke-width: 2.5; }
#scrollThread .needle {
  fill: none;
  stroke: #8C2F2F;
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.8));
}
#scrollThread .needle-eye {
  fill: none;
  stroke: #B8924A;
  stroke-width: 2;
}

@media (max-width: 900px) {

  #scrollThread { display: none; }
}

.line-material-card { cursor: pointer; }

.canvas-area .sticker {
  position: absolute;
  width: 130px;
  height: 130px;
  cursor: move;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: #8C2F2F;
  background-blend-mode: screen;
  touch-action: none;
  user-select: none;
}

.canvas-area #paintLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 1;
}

.canvas-area .sticker { z-index: 2; }

.line-material-card { cursor: grab; }
.line-material-card:active { cursor: grabbing; }

.canvas-area .sticker.selected {
  outline: 2px dashed var(--color-gilding);
  outline-offset: 4px;
}

.canvas-area .sticker .handle {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--color-ink);
  border: 2px solid #fff;
  border-radius: 50%;
  display: none;
  z-index: 5;
}
.canvas-area .sticker.selected .handle { display: block; }

.canvas-area .sticker .handle.rotate { right: -10px; top: -10px; cursor: grab; }

.canvas-area .sticker .handle.scale { right: -10px; bottom: -10px; cursor: nwse-resize; }
.palette-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e7d9bd;
}

.palette-row .swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s;
}
.palette-row .swatch:hover { transform: scale(1.15); }
.palette-row .swatch.active {
  border-color: var(--color-ink);
  transform: scale(1.15);
}
.palette-row .palette-label {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

@media (max-width: 1400px) {

  :root { --side-margin: 100px; }
}

@media (max-width: 1100px) {

  :root { --side-margin: 40px; }
}

@media (max-width: 900px) {

  nav {
    flex-wrap: wrap;
    padding: 16px var(--side-margin);
  }
  .nav-left, .nav-right {
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    justify-content: flex-start;
  }
  .work-card,
  .work-card.reverse,
  .detail-top,
  .case-card .case-body {
    grid-template-columns: 1fr;
  }

  .studio-workspace { grid-template-columns: 1fr; }
  .artisan-grid,
  .stories-entry-grid,
  .my-motifs-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-list { grid-template-columns: 1fr; }

  .shop-item { grid-template-columns: 1fr; }

  .shop-item .item-image { height: 240px; }

  .item-meta-row { grid-template-columns: 1fr; }

  .hero {
    height: 90vh;
    min-height: 0;
    padding-top: 130px;
    padding-bottom: 40px;
    background-size: cover;
    background-position: center center;
    background-color: #2a1f1a;
  }
  .hero h1 { font-size: 31px; line-height: 1.35; margin-bottom: 10px; }
  .hero p { font-size: 18px; line-height: 1.7; margin-bottom: 20px; }
  .hero-cta-group { gap: 10px; }
  .btn-dark, .btn-transparent { padding: 10px 14px; font-size: 18px; white-space: nowrap; }
  
  nav { padding: 18px var(--side-margin); row-gap: 10px; }
  nav a { font-size: 18px; }
  .nav-left, .nav-right { gap: 22px; row-gap: 8px; }
  
  .timeline-section { padding: 50px 0; }
  .timeline-axis { display: none; }
  .timeline-dots { flex-direction: column; gap: 24px; }
  .dot-item { width: 100%; text-align: left; display: flex; align-items: center; gap: 16px; }
  .dot-item:nth-child(1), .dot-item:nth-child(2), .dot-item:nth-child(3) { margin-top: 0; }
  .dot-circle { width: 40px; height: 40px; margin: 0; flex-shrink: 0; }
  .dot-item p { font-size: 17px; }
  
  .masterworks-section { padding: 40px 0; }
  .masterworks-section > h2, .stories-section h2, .studio-entry-section h2 { font-size: 31px; margin-bottom: 30px; }
  .work-card { gap: 20px; margin-bottom: 40px; }
  .work-text h3 { font-size: 25px; }
  .work-text .sub-title { margin-bottom: 12px; font-size: 17px; }
  .work-text .desc-item { font-size: 18px; padding-left: 10px; }
  .detail-link { font-size: 19px; margin-top: 12px; }
  .studio-entry-section { padding: 50px 0; }
  .studio-entry-section p { font-size: 18px; }
  .stories-section { padding: 40px 0 50px; }
  .stories-entry-card .cover { height: 130px; }
  .stories-entry-card .entry-text { padding: 14px; }
  .stories-entry-card h4 { font-size: 21px; }
  .stories-entry-card p { font-size: 17px; }
  
  #shop-page, #archive-page, #stories-page, #studio-page, #my-page { padding-top: 100px; padding-bottom: 60px; }
  #shop-page h2, #archive-page h2, #stories-page h2, #studio-page h2 { font-size: 25px; margin-bottom: 24px; }
  .shop-category-title { font-size: 23px; }
  .shop-item .item-body { padding: 18px; }
  .shop-item h3 { font-size: 24px; }
  .shop-item .item-price { font-size: 23px; }
  .shop-item p { font-size: 18px; }
  .item-tags span { font-size: 16px; padding: 4px 8px; }
  .item-meta-row { padding: 10px; gap: 8px; }
  .item-meta-row .meta-block h5 { font-size: 15px; }
  .item-meta-row .meta-block p { font-size: 17px; }
  .item-actions { flex-direction: column; gap: 8px; }
  .item-actions .btn-dark, .item-actions .btn-outline { width: 100%; }
  
  .stories-tabs { gap: 6px; padding-bottom: 10px; }
  .stories-tab-btn { padding: 8px 12px; font-size: 18px; }
  .artisan-card .avatar { height: 180px; }
  .artisan-card .card-body { padding: 16px; }
  .artisan-card h4 { font-size: 23px; }
  .tutorial-card { flex-direction: column; }
  .tutorial-card .tutorial-cover { width: 100%; height: 160px; }
  .tutorial-card .tutorial-body { padding: 16px; }
  .case-card .case-cover { height: 180px; }
  .case-card .case-body { padding: 16px; gap: 16px; }
  .case-screen-grid .screen { height: 100px; }
  
  .canvas-area { height: 360px; }
  .line-material-card .thumb { height: 60px; }
  
  .my-header { gap: 16px; }
  .my-avatar { width: 60px; height: 60px; font-size: 25px; }
  .my-header-info h2 { font-size: 24px; }
  .my-tab-btn { padding: 10px 14px; font-size: 18px; }
  .order-card { padding: 16px; }
  .settings-group { padding: 16px; }
  
  .detail-page, .sub-detail-page { padding: 100px 0 60px; }
  .detail-meta h2, .sub-detail-meta h2 { font-size: 25px; }
  .sub-detail-meta .sub-price { font-size: 24px; }
  .sub-detail-section h3 { font-size: 23px; }
  .related-grid { grid-template-columns: 1fr; }
  
  .login-modal { padding: 28px 22px; }
  .login-modal h2 { font-size: 24px; }
}

.menu-toggle { display: none; }
.hamburger { display: none; }
.nav-brand { display: none; }
.nav-drawer { display: flex; justify-content: space-between; align-items: center; flex: 1; }
.drawer-overlay { display: none; }

@media (max-width: 900px) {
  
  nav {
    justify-content: space-between !important;
    align-items: center;
  }
  .nav-brand {
    display: block;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: 0.05em;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: transform 0.3s, opacity 0.3s;
  }
  
  #menu-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #menu-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  #menu-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 80vw;
    background: var(--color-ink);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 28px 28px;
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
  }
  #menu-toggle:checked ~ .nav-drawer { transform: translateX(0); }
  .nav-drawer .nav-left,
  .nav-drawer .nav-right {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-drawer .nav-left { border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 16px; margin-bottom: 16px; }
  .nav-drawer a {
    padding: 12px 4px;
    font-size: 20px;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-drawer a.btn-white {
    background: #fff;
    color: var(--color-ink) !important;
    text-align: center;
    border-bottom: none;
    margin-top: 8px;
  }
  
  .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  #menu-toggle:checked ~ .drawer-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ===== Hover effects ===== */
.btn-dark:hover { background: #3d2e26; transform: translateY(-1px); transition: all 0.2s ease; }
.btn-transparent:hover { background: rgba(255,255,255,0.15); transition: all 0.2s ease; }
.btn-white:hover { background: #f0e6d2; transition: all 0.2s ease; }
.btn-outline:hover { background: var(--color-ink); color: #fff; transition: all 0.2s ease; }
.tool-btn:hover { background: #4a3a30; transition: all 0.2s ease; }
.login-btn:hover { background: #a53838; transition: all 0.2s ease; }
.create-btn:hover { background: #a53838; transition: all 0.2s ease; }
.logout-btn:hover { background: var(--color-primary); color: #fff; transition: all 0.2s ease; }
.detail-link:hover { color: #a53838; transition: color 0.2s ease; }
.nav-link:hover { opacity: 0.75; transition: opacity 0.2s ease; }
.nav-brand:hover { opacity: 0.8; transition: opacity 0.2s ease; }
.stories-tab-btn:hover { background: #eadfc8; transition: all 0.2s ease; }
.my-tab-btn:hover { color: var(--color-primary); transition: color 0.2s ease; }
.stories-entry-card:hover { box-shadow: 0 8px 24px rgba(42,31,26,0.15); transition: all 0.3s ease; }
.shop-item:hover { box-shadow: 0 12px 32px rgba(42,31,26,0.15); }
.line-material-card:hover { box-shadow: 0 6px 16px rgba(42,31,26,0.12); }
.artisan-card:hover { box-shadow: 0 8px 24px rgba(42,31,26,0.12); transition: all 0.3s ease; }
.tutorial-card:hover { box-shadow: 0 8px 24px rgba(42,31,26,0.12); transition: all 0.3s ease; }
.case-card:hover { box-shadow: 0 8px 24px rgba(42,31,26,0.12); transition: all 0.3s ease; }
.my-motif-card:hover { box-shadow: 0 8px 24px rgba(42,31,26,0.12); transition: all 0.3s ease; }
.order-card:hover { box-shadow: 0 6px 18px rgba(42,31,26,0.1); transition: all 0.3s ease; }
.item-actions button:hover, .motif-actions button:hover, .order-actions button:hover { opacity: 0.85; transition: opacity 0.2s ease; }
.setting-row .toggle:hover { cursor: pointer; filter: brightness(1.1); }
.close-btn:hover { background: rgba(0,0,0,0.06); }
input:focus, select:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ===== Stronger hover ===== */
.btn-dark:hover { background: #5a1f1f !important; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(140,47,47,0.4); }
.btn-transparent:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
.btn-white:hover { background: #e8d5b0; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.btn-outline:hover { background: var(--color-ink); color: #fff !important; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.tool-btn:hover { background: #5a1f1f !important; transform: translateY(-1px); }
.login-btn:hover, .create-btn:hover { background: #b83a3a !important; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(140,47,47,0.5); }
.logout-btn:hover { background: var(--color-primary) !important; color: #fff !important; transform: translateY(-2px); }
.detail-link:hover { color: #b83a3a !important; padding-left: 6px; }
.nav-link:hover { opacity: 1 !important; color: var(--color-gilding) !important; }
.nav-brand:hover { color: var(--color-gilding) !important; }
.stories-tab-btn:hover { background: var(--color-primary) !important; color: #fff !important; }
.my-tab-btn:hover { color: var(--color-primary) !important; border-bottom-color: var(--color-primary) !important; }
.stories-entry-card:hover, .shop-item:hover, .artisan-card:hover, .tutorial-card:hover, .case-card:hover, .my-motif-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(42,31,26,0.25) !important;
}
.line-material-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(42,31,26,0.2) !important; }
.order-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(42,31,26,0.18) !important; }
.item-actions button:hover, .motif-actions button:hover, .order-actions button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.setting-row .toggle:hover { filter: brightness(1.3); transform: scale(1.1); }
.close-btn:hover { background: #ddd; transform: rotate(90deg); }
.artisan-card .avatar:hover, .tutorial-card .tutorial-cover:hover, .case-card .case-cover:hover { filter: brightness(1.1); }

/* ===== Stories tabs CSS-only ===== */
.stories-panel { display: none; }
#stories-artisans { display: block; }
#stories-tutorials:target, #stories-cases:target { display: block; }
body:has(#stories-tutorials:target) #stories-artisans,
body:has(#stories-cases:target) #stories-artisans { display: none; }
body:has(#stories-artisans:target, #stories-tutorials:target, #stories-cases:target) #home-page { display: none; }
body:has(#stories-artisans:target, #stories-tutorials:target, #stories-cases:target) #stories-page { display: block; }
.stories-tab-btn { text-decoration: none; display: inline-block; }
.stories-tab-btn:target, body:has(#stories-artisans:target) .stories-tab-btn[href="#stories-artisans"],
body:has(#stories-tutorials:target) .stories-tab-btn[href="#stories-tutorials"],
body:has(#stories-cases:target) .stories-tab-btn[href="#stories-cases"] {
  background: var(--color-primary);
  color: #fff;
}

footer h3, footer p {
  font-family: 'Italianno', cursive !important;
}
footer h3 { font-size: 38px; }
footer p { font-size: 22px; color: #d9cfbf; }

.btn-dark {
  background: var(--color-primary) !important;
  color: #fff !important;
}
.btn-dark:hover {
  background: #e05050 !important;
}

.btn-white {
  background: var(--color-primary) !important;
  color: var(--color-gilding) !important;
}
footer h3, footer p {
  color: var(--color-gilding) !important;
}

footer {
  background: #14100e !important;
}
footer h3 {
  color: #9a8a70 !important;
}
footer p {
  color: #7a6e5c !important;
}

@media (max-width: 900px) {
  .hero {
    background-position: center center !important;
    background-size: cover !important;
  }
}

@media (max-width: 900px) {
  .hero {
    background: linear-gradient(180deg, rgba(31,23,20,0.45) 0%, rgba(31,23,20,0.65) 100%),
      url('https://res.cloudinary.com/znouuxhw/image/upload/v1790168498/hero-mobile.webp') center/cover no-repeat !important;
    background-attachment: scroll;
  }
}

.timeline-section {
  color: #F2E8D5;
}
.timeline-section p,
.timeline-section .dot-item p {
  color: #d9c9a8 !important;
}
.timeline-section .dot-item strong {
  color: #F2E8D5 !important;
}

.timeline-section {
  background: linear-gradient(180deg, transparent 0%, #1f1714 100%) !important;
}
.masterworks-section {
  background: linear-gradient(180deg, #1f1714 0%, #1f1714 100%) !important;
  padding-top: 0;
}
.studio-entry-section, .stories-section {
  background: #1f1714;
}

.timeline-section,
.masterworks-section,
.studio-entry-section,
.stories-section,
.shop-list,
.stories-tabs {
  background: transparent !important;
}
body {
  background-color: #1f1714 !important;
}

.timeline-section {
  padding-bottom: 120px !important;
}
.masterworks-section {
  padding-top: 120px !important;
}

@media (max-width: 900px) {
  html, body {
    background-size: 80px 80px !important;
  }
}

@media (max-width: 900px) {
  .timeline-section {
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-top: 60px !important;
    padding-bottom: 80px !important;
  }
  .timeline-axis { display: none !important; }
  .timeline-dots {
    flex-direction: column !important;
    gap: 40px;
  }
  .dot-item {
    width: 100% !important;
    text-align: left !important;
    margin-top: 0 !important;
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }
  .dot-circle {
    margin: 0 !important;
    flex-shrink: 0;
  }
}

.marquee-outer {
  overflow: hidden;
  width: 100%;
  margin-bottom: 40px;
  padding: 20px 0;
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 25s linear infinite;
}
.marquee-track img {
  height: 200px;
  width: auto;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track:hover {
  animation-play-state: paused;
}
