.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 48px; padding: 11px 22px; border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.quiet { border-color: #dcd1e1; background: #fffdf866; color: var(--accent-dark); }
.button.quiet:hover { background: var(--lavender); }
.button.small { min-height: 38px; font-size: 12px; padding: 7px 14px; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.text-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero { display: grid; grid-template-columns: .97fr 1.03fr; gap: 54px; align-items: center; padding: 27px 0 28px; }
.hero-copy h1 { font-size: clamp(30px, 3.3vw, 47px); line-height: 1.65; letter-spacing: -.045em; margin: 22px 0 20px; }
.hero-copy h1 span { background: linear-gradient(transparent 65%, #edddce 65%, #edddce 95%, transparent 95%); }
.hero-copy > p:not(.eyebrow) { line-height: 2; color: #756a72; font-size: 14px; }
.hero-copy .actions { margin-top: 30px; }
.tiny-star { color: #b78e65; padding-right: 8px; }
.hero-copy p.hero-note { font-size: 10px; margin: 23px 0 0; color: #998d91; letter-spacing: .04em; }
.hero-note span { margin: 0 7px; }
.hero-art { position: relative; padding: 13px 13px 30px; background: #fffdf9; border: 1px solid #ded3c9; border-radius: 3px; transform: rotate(2deg); box-shadow: 0 10px 35px #56452c13; margin: 0 12px 0 0; }
.hero-art::before { content: ''; width: 95px; height: 28px; background: #dcd1ba9c; position: absolute; top: -11px; left: 41%; transform: rotate(-7deg); z-index: 1; }
.hero-art img { aspect-ratio: 1.19; width: 100%; object-fit: cover; border-radius: 2px; }
.art-sticker { position: absolute; right: -20px; bottom: 60px; background: #eee5f4; border: 1px solid #dacee3; padding: 10px 18px; border-radius: 4px; font-size: 12px; transform: rotate(-5deg); box-shadow: var(--shadow); }
.art-caption { display: block; padding: 9px 0 0; color: #a29489; text-align: center; font-size: 10px; letter-spacing: .1em; }
.episode-card, .character-card, .asset-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.episode-cover { display: block; height: 285px; position: relative; overflow: hidden; background: #eae2d9; }
.episode-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; transition: transform .35s; }
.episode-cover:hover img { transform: scale(1.025); }
.cover-number { position: absolute; top: 18px; left: 18px; width: 45px; height: 45px; background: #fffdf6e8; border: 1px solid #e8ded2; border-radius: 50%; display: grid; place-items: center; font: 24px Georgia, serif; color: #71607d; }
.cover-label { position: absolute; bottom: 16px; right: 16px; background: #fffdf6ed; border: 1px solid #eee3d8; font-size: 10px; padding: 4px 11px; border-radius: 20px; color: #716675; }
.card-body { padding: 24px 27px 28px; }
.card-body h2 { font-size: 22px; }
.card-body p { font-size: 13px; }
.card-body .eyebrow { font-size: 10px; margin-bottom: 6px; }
.cast-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; }
.cast-tile { min-width: 0; text-align: center; border: 1px solid var(--line); border-radius: 13px; background: #fffcf6; padding: 8px 8px 18px; }
.cast-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; mix-blend-mode: multiply; margin-bottom: 14px; }
.cast-tile strong { display: block; font-size: 12px; }
.cast-tile span { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.end-note { margin-top: 66px; padding: 30px 34px; display: flex; gap: 26px; align-items: center; background: #efe9df; border-radius: var(--radius); border: 1px solid #e6ddcf; }
.end-note > span { font-size: 35px; color: #ac977b; }
.end-note h2 { font-size: 18px; margin-bottom: 8px; }
.end-note p { margin: 0; color: var(--muted); font-size: 12px; }
.end-note > a { margin-left: auto; white-space: nowrap; }
.image-button { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; text-align: left; color: inherit; }
.image-button img { width: 100%; }
.character-card .image-button { background: white; }
.character-card .image-button img { aspect-ratio: 1.5; object-fit: contain; }
.character-lines { list-style: none; padding: 0; margin: 18px 0; font-size: 12px; color: #706574; line-height: 2; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 30px; align-items: center; }
.search-field { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 7px 13px; border: 1px solid #ded6cf; border-radius: 9px; background: var(--surface); color: var(--muted); }
.search-field > span { font: 24px Georgia, serif; }
.search-field input { width: 205px; min-width: 0; border: 0; background: transparent; font-size: 12px; outline-offset: 5px; color: var(--ink); }
.search-field input::placeholder { color: #a2999f; }
.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-tabs button { border: 1px solid transparent; background: transparent; padding: 7px 13px; color: var(--muted); font-size: 12px; border-radius: 8px; }
.filter-tabs button[aria-pressed="true"] { background: var(--lavender); color: var(--accent-dark); border-color: #e0d4e7; }
.result-count { margin-left: auto; color: #a0949c; font-size: 11px; }
.asset-card .image-button img { aspect-ratio: 1.5; object-fit: contain; background: white; }
.asset-card .card-body h2 { font-size: 19px; }
.asset-card .card-body > p:not(.eyebrow) { font-size: 12px; }
.pill { display: inline-block; background: var(--lavender); border-radius: 20px; padding: 3px 10px; font-size: 10px; color: var(--accent); }
.notice { background: #eee7f3; border: 1px solid #e0d4e7; border-radius: 12px; padding: 18px 22px; color: #75647f; font-size: 12px; margin-bottom: 28px; }
.material-card, .prose-panel, .studio-summary { background: var(--surface); padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.material-card { font-size: 13px; }
.material-card h2 { font-size: 22px; margin: 18px 0 22px; }
.material-meta { display: flex; align-items: center; gap: 12px; justify-content: space-between; font-size: 11px; color: var(--muted); }
.label { color: var(--accent); font-size: 10px; letter-spacing: .08em; font-weight: 650; margin-bottom: 7px; }
.material-limit { font-size: 11px; color: #9c8473; border-left: 2px solid #dcc6b0; padding-left: 12px; }
.adaptation { border-top: 1px solid var(--line); padding-top: 18px; }
.source-details { font-size: 11px; color: var(--muted); padding-top: 15px; border-top: 1px solid var(--line); margin-top: 20px; overflow-wrap: anywhere; }
summary { cursor: pointer; color: var(--accent); }
code { font-size: 11px; }
.empty-state { padding: 55px 20px; text-align: center; color: var(--muted); border: 1px dashed #dacfe0; border-radius: 12px; }
.studio-tabs { display: flex; gap: 30px; border-bottom: 1px solid var(--line); margin-bottom: 30px; font-size: 13px; }
.studio-tabs a { padding: 0 0 13px; color: var(--muted); }
.studio-tabs [aria-current] { border-bottom: 2px solid var(--accent); color: var(--accent-dark); font-weight: bold; }
.studio-summary { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; background: #f0eaf1; }
.studio-summary > div { max-width: 780px; }
.studio-summary > a { align-self: flex-start; }
.stat-row { display: flex; gap: 32px; margin-top: 25px; }
.stat-row span { font-size: 11px; color: #8b7e91; }
.stat-row strong { display: block; font: 35px Georgia, serif; color: var(--accent); margin-bottom: 8px; }
.prose-panel { font-size: 13px; }
.prose-panel > p { max-width: 850px; }
.prose-panel > h2:not(:first-child) { margin-top: 30px; }
.prose-panel li { margin: 12px 0; }
.delivery-row { border-bottom: 1px solid var(--line); padding: 15px 0 20px; }
.delivery-row h3 { font-size: 15px; }
.delivery-row a { font-size: 12px; color: var(--accent); }
.delivery-row p { margin: 12px 0 0; }
.workflow { margin-top: 28px; }
.workflow ol { list-style: none; counter-reset: workflow; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.workflow li { counter-increment: workflow; margin: 0; padding-left: 34px; position: relative; }
.workflow li::before { content: counter(workflow, decimal-leading-zero); position: absolute; left: 0; top: 0; color: #b69dbf; font: 20px Georgia, serif; }
.workflow strong, .workflow span { display: block; }
.workflow span { color: var(--muted); font-size: 12px; margin-top: 8px; }
.credit-list { list-style: none; padding: 0; margin: 25px 0; }
.credit-list li { display: grid; grid-template-columns: 100px 1fr auto; gap: 20px; padding: 16px 0; margin: 0; border-bottom: 1px solid var(--line); }
.credit-list a { color: var(--accent); }
.storyboard-list > section { margin-bottom: 40px; }
.storyboard-list h2 { font-size: 21px; }
.storyboard-page { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 24px; margin: 15px 0; }
.storyboard-page > p { font-size: 12px; margin: 18px 0; }
.storyboard-panels { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; padding-top: 20px; }
.storyboard-panels article { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.storyboard-panels img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 15px 0; border-radius: 6px; }
.dialogue { padding: 15px; background: var(--lavender); border-radius: 8px; margin: 15px 0; }
.dialogue p:last-child { margin-bottom: 0; }
dialog { padding: 0; border: 0; border-radius: 12px; background: #f8f5ef; width: min(1400px, 96vw); max-width: 96vw; max-height: 94vh; box-shadow: 0 25px 100px #0004; }
dialog::backdrop { background: #211b2bdd; backdrop-filter: blur(5px); }
.viewer-tools { display: flex; gap: 20px; align-items: center; padding: 14px 20px; color: #6a5a72; font-size: 12px; position: sticky; top: 0; background: #f8f5eff5; }
.viewer-tools > span { margin-right: auto; }
.viewer-tools a { white-space: nowrap; text-decoration: underline; }
.viewer-tools button { background: #e9e1ec; border: 0; border-radius: 6px; padding: 6px 12px; white-space: nowrap; color: var(--ink); }
#viewer-image { max-width: 100%; max-height: calc(94vh - 64px); width: auto; height: auto; object-fit: contain; margin: auto; }
@media (max-width: 1000px) {
  .hero { gap: 30px; }
  .cast-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .cast-tile img { aspect-ratio: 1.5; }
  .workflow ol { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 761px) and (max-height: 750px) {
  main { padding-top: 32px; }
  .hero { padding-top: 8px; }
  .hero-art img { aspect-ratio: 1.55; }
  .hero-copy h1 { font-size: 38px; line-height: 1.5; margin: 16px 0; }
  .hero-copy .actions { margin-top: 20px; }
  .hero-copy p.hero-note { display: none; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 0; }
  .hero-copy h1 { font-size: 34px; line-height: 1.6; margin: 17px 0; }
  .hero-copy > p:not(.eyebrow) { font-size: 13px; }
  .hero-copy .actions { margin-top: 22px; gap: 10px; }
  .button { padding: 10px 16px; min-height: 44px; font-size: 12px; }
  .hero-art { margin: 0 8px; }
  .hero-art img { aspect-ratio: 1.4; }
  .art-sticker { right: -12px; font-size: 10px; padding: 9px 12px; }
  .episode-cover { height: 245px; }
  .card-body { padding: 22px; }
  .cast-strip { gap: 10px; }
  .cast-tile { padding: 5px 5px 14px; }
  .cast-tile img { aspect-ratio: 1; }
  .cast-tile strong { font-size: 10px; }
  .cast-tile span { font-size: 8px; }
  .end-note { padding: 24px; gap: 15px; flex-wrap: wrap; margin-top: 44px; }
  .end-note h2 { font-size: 16px; }
  .end-note > span { display: none; }
  .end-note > a { margin-left: 0; }
  .search-field { width: 100%; }
  .search-field input { width: 100%; }
  .filter-bar { gap: 13px; }
  .filter-tabs { gap: 4px; }
  .filter-tabs button { padding: 6px 10px; font-size: 11px; }
  .result-count { font-size: 10px; }
  .material-card, .prose-panel, .studio-summary { padding: 22px; }
  .material-card h2 { font-size: 21px; }
  .studio-summary { flex-direction: column; }
  .stat-row { gap: 24px; }
  .stat-row strong { font-size: 30px; }
  .workflow ol, .storyboard-panels { grid-template-columns: 1fr; }
  .credit-list li { grid-template-columns: 70px 1fr; gap: 9px; font-size: 12px; }
  .credit-list li > :last-child { grid-column: 2; }
  .studio-tabs { gap: 22px; font-size: 12px; }
  .storyboard-page { padding: 16px; }
  .viewer-tools { padding: 12px; font-size: 10px; gap: 10px; }
  .viewer-tools > span { max-width: 45%; }
}
