/* 首頁專用：介紹、作品牆、價目與檢視器；共用基礎先由 shared/styles.css 載入。 */
body.modal-open {
  overflow: hidden;
}
.hero {
  border-top: 1px solid #eee6cd;
}
.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  padding-block: 36px 38px;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 80px);
  white-space: nowrap;
}
.hero-copy {
  min-width: 0;
}
.hero-copy p {
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 800;
  line-height: 1.65;
}
.hero-copy .button {
  margin-top: 26px;
  padding-inline: 32px;
  border-radius: 24px;
}
.hero-stage {
  background: var(--surface);
  padding-block: 32px 18px;
}
.hero-reel {
  display: grid;
  grid-template-columns: 1fr 1.95fr 1.2fr;
  align-items: center;
  gap: 30px;
}
.hero-reel figure {
  position: relative;
  padding: 8px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 4px 12px #46301f09;
  min-width: 0;
}
.hero-reel video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: white;
  object-fit: contain;
}
.reel-chibi {
  transform: rotate(-4deg);
}
.reel-animation {
  transform: rotate(3deg);
}
.reel-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  min-height: 40px;
}
.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1.5px solid #cfbe92;
  border-radius: 24px;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.3;
}
.motion-toggle .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}
.motion-toggle:hover {
  background: #fff9;
  border-color: var(--brand);
}
.motion-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.portfolio {
  padding-block: 58px 76px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 28px;
}
.section-heading h2 {
  font-size: clamp(35px, 4.6vw, 66px);
  letter-spacing: -0.035em;
}
.section-heading p {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filters button {
  padding: 10px 22px;
  min-height: 46px;
  border-radius: 24px;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}
.filters button span {
  padding-left: 5px;
  font-weight: 600;
}
.filters button:hover {
  background: var(--surface);
}
.filters button[aria-pressed="true"] {
  background: var(--brand);
  color: white;
}
.playback-status {
  padding: 12px 16px;
  margin-bottom: 24px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 14px;
}
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 28px;
  overflow-anchor: none;
}
.art-grid.is-transitioning {
  overflow: clip;
  overflow-clip-margin: 8px;
}
.artwork {
  min-width: 0;
}
.art-link {
  display: block;
}
.art-image {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 12px;
  background: #faf5e4;
  padding: 6px;
}
/* 依作品類型貼近原始比例，避免正方形被壓矮、橫式動畫上下留白。 */
.artwork[data-category="chibi"] .art-image {
  aspect-ratio: 1;
}
.artwork[data-category="animation"] .art-image {
  aspect-ratio: 16 / 9;
}
.art-image img,
.art-image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.art-link:hover .art-image {
  background: #ede2b8;
}
.art-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  line-height: 1.5;
}
.art-category {
  font-size: 15px;
  font-weight: 800;
}
.art-title {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
.art-open {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  transition: transform 0.2s;
}
.art-link:hover .art-open {
  transform: translate(2px, -2px);
}
.video-notice {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  color: white;
  background: #46301fe8;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}
@media (min-width: 761px) {
  #art-grid[data-filter="chibi"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery-footer {
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 24px;
  overflow-anchor: none;
}
.gallery-footer .button {
  min-width: 240px;
  border-radius: 30px;
}
#gallery-count {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.fallback-note {
  padding-block: 20px;
}
.pricing {
  padding-block: 54px 28px;
  background: var(--surface);
}
.section-label {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}
.pricing-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  margin-bottom: 28px;
}
.pricing-heading h2 {
  font-size: clamp(40px, 5.4vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.pricing-heading > p {
  padding-right: 12%;
  font-size: 25px;
  font-weight: 800;
}
.price-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(280px, max-content);
  align-items: center;
  gap: 30px;
  padding-block: 22px;
  border-bottom: 1px solid #d9cba5;
}
.price-number {
  font-size: 28px;
  font-weight: 900;
  color: #856b42;
  border-right: 1px solid #d9cba5;
  line-height: 1.5;
}
.price-row h3 {
  font-size: 28px;
  margin-bottom: 4px;
}
.price-row p {
  font-size: 15px;
  line-height: 1.6;
}
.price-amount {
  font-size: 42px;
  color: var(--brand);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.price-amount small {
  font-size: 22px;
  letter-spacing: normal;
}
.pricing-notes {
  margin-block: 24px;
  padding-left: 24px;
  border-left: 7px solid var(--accent);
  font-size: 14px;
  color: #675538;
}
.pricing-notes p + p {
  margin-top: 4px;
}
.commission-guide {
  border-block: 1px solid #d9cba5;
}
.commission-guide summary {
  display: flex;
  gap: 20px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding-block: 20px;
  font-size: 19px;
  font-weight: 800;
}
.commission-guide summary::-webkit-details-marker {
  display: none;
}
.commission-guide .icon {
  color: var(--brand);
}
.commission-guide[open] summary .icon {
  transform: rotate(45deg);
}
.commission-guide > div {
  padding: 0 0 22px 42px;
  max-width: 920px;
  color: #675538;
}
.commission-guide p + p {
  margin-top: 8px;
}
.lightbox {
  width: min(1050px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  border: 0;
  padding: 0;
  border-radius: 20px;
  color: var(--ink);
  background: white;
  overflow: auto;
}
.lightbox::backdrop {
  background: #2f201bd9;
  backdrop-filter: blur(5px);
}
.lightbox[open] {
  animation: lightbox-enter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox[open]::backdrop {
  animation: artwork-fade-in 220ms ease-out;
}
@keyframes lightbox-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes artwork-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.lightbox-shell {
  padding: 22px;
}
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}
#lightbox-category {
  font-size: 12px;
  color: var(--muted);
}
.lightbox-header h2 {
  font-size: 23px;
}
.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
}
.icon-button:hover:enabled {
  background: #e8dba9;
}
.lightbox-media {
  min-height: 120px;
  display: grid;
  place-items: center;
  background: #faf5e4;
  border-radius: 10px;
  overflow: hidden;
}
.lightbox-media video,
.lightbox-media img {
  max-width: 100%;
  width: auto;
  max-height: 65dvh;
  object-fit: contain;
  animation: artwork-fade-in 220ms ease-out;
}
.lightbox-media video {
  width: 100%;
}
.lightbox-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
}
#lightbox-count {
  font-size: 13px;
  color: var(--muted);
}
#lightbox-form {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
}
#media-error {
  background: var(--surface);
  padding: 12px;
  margin-top: 12px;
  border-radius: 8px;
  font-size: 14px;
}
@media (min-width: 1600px) {
  .hero-intro {
    padding-block: 42px 48px;
  }
}
@media (max-width: 1100px) {
  .hero-reel {
    gap: 22px;
  }
  .section-heading {
    gap: 26px;
  }
  .section-heading p {
    font-size: 17px;
  }
  .filters button {
    padding-inline: 16px;
    font-size: 15px;
  }
  .art-grid {
    gap: 24px;
  }
  .price-row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(250px, max-content);
    gap: 20px;
  }
  .price-amount {
    font-size: 35px;
  }
  .price-row h3 {
    font-size: 25px;
  }
  .pricing-heading > p {
    padding-right: 4%;
    font-size: 20px;
  }
}
@media (max-width: 760px) {
  .hero-intro {
    display: flex;
    gap: 26px;
    padding-block: 24px 30px;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero h1 {
    font-size: clamp(30px, 10.2vw, 68px);
  }
  .hero-copy {
    width: 100%;
  }
  .hero-copy p {
    font-size: 17px;
    line-height: 1.65;
  }
  .hero-copy .button {
    font-size: 14px;
    margin-top: 18px;
    min-height: 48px;
    padding: 12px 18px;
    gap: 7px;
    border-radius: 17px;
  }
  .hero-stage {
    padding-top: 24px;
  }
  .hero-reel {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
  }
  .hero-reel figure {
    padding: 6px;
    border-radius: 13px;
  }
  .reel-main {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .reel-chibi {
    width: 82%;
    justify-self: center;
    transform: rotate(-3deg);
  }
  .reel-animation {
    transform: rotate(3deg);
  }
  .hero-reel video {
    border-radius: 7px;
  }
  .reel-controls {
    margin-top: 20px;
  }
  .portfolio {
    padding-block: 40px 50px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }
  .section-heading h2 {
    font-size: 36px;
  }
  .section-heading p {
    padding-left: 24px;
    font-size: 15px;
  }
  .section-heading p br {
    display: none;
  }
  .gallery-toolbar {
    align-items: flex-start;
    gap: 16px;
    flex-direction: column;
    margin-bottom: 22px;
  }
  .filters {
    gap: 6px;
  }
  .filters button {
    padding: 10px 13px;
    min-height: 44px;
    font-size: 14px;
  }
  .gallery-toolbar .motion-toggle {
    align-self: flex-end;
  }
  .art-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }
  .art-image {
    padding: 4px;
  }
  .art-caption {
    gap: 8px;
    flex-wrap: wrap;
  }
  .art-category {
    font-size: 13px;
  }
  .art-title {
    font-size: 11px;
  }
  .art-open {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
  .pricing {
    padding-block: 36px 24px;
  }
  .section-label {
    font-size: 16px;
  }
  .pricing-heading {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .pricing-heading h2 {
    font-size: clamp(33px, 6.8vw, 48px);
  }
  .pricing-heading > p {
    font-size: 17px;
    padding: 0;
  }
  .pricing-heading > p br {
    display: none;
  }
  .price-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    padding-block: 24px;
  }
  .price-number {
    font-size: 22px;
    align-self: start;
  }
  .price-row h3 {
    font-size: 24px;
  }
  .price-row p {
    font-size: 13px;
    margin-top: 5px;
  }
  .price-amount {
    grid-column: 2;
    font-size: 33px;
    margin-top: 8px;
  }
  .price-amount small {
    font-size: 17px;
  }
  .price-row > div:first-of-type {
    grid-column: 2 / -1;
  }
  .pricing-notes {
    font-size: 12px;
    padding-left: 16px;
    border-left-width: 5px;
  }
  .commission-guide summary {
    font-size: 15px;
    gap: 12px;
  }
  .commission-guide > div {
    padding-left: 34px;
    font-size: 14px;
  }
  .lightbox {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }
  .lightbox-shell {
    padding: 14px;
  }
  .lightbox-header h2 {
    font-size: 19px;
  }
  .lightbox-footer {
    gap: 10px;
    flex-wrap: wrap;
  }
  #lightbox-form {
    font-size: 12px;
  }
  .lightbox-footer .icon-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}
@media (max-width: 440px) {
  .art-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .art-category {
    font-size: 15px;
  }
  .art-title {
    font-size: 13px;
  }
  .filters button {
    padding-inline: 11px;
  }
}
.commission-entry {
  margin-top: 24px;
}
