.drama-detail-v2, .drama-d-related {
    --dd-surface: var(--dx-base2-color, #17171e);
    --dd-surface-2: var(--dx-base3-color, #202029);
    --dd-line: var(--dx-border-color, #353742);
    --dd-text: #f3f3f6;
    --dd-muted: var(--dx-font2-color, #94949e);
    --dd-brand: var(--dx-primary-color, #ff2f6d);
}
.drama-detail-v2 { padding-bottom: 54px; }
.drama-detail-v2 *, .drama-detail-v2 *::before, .drama-detail-v2 *::after { box-sizing: border-box; }
.drama-detail-v2 button, .drama-detail-v2 input { font: inherit; }
.drama-detail-v2 .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.drama-d-title { margin: 6px 0 20px; color: var(--dd-text); font-size: 28px; font-weight: 750; letter-spacing: -.01em; line-height: 1.3; }
.drama-d-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); margin-bottom: 34px; }
.drama-d-cover { align-self: start; position: relative; width: 100%; max-width: 300px; height: auto; aspect-ratio: 9/16; margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: linear-gradient(145deg, #2b2b35, #101014); box-shadow: 0 18px 42px rgba(0,0,0,.3); }
.drama-d-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.drama-d-status { position: absolute; top: 13px; right: 13px; padding: 6px 11px; border-radius: 7px; background: linear-gradient(135deg, var(--dd-brand), #ff6b45); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 4px 13px rgba(0,0,0,.34); }
.drama-d-body { display: flex; min-width: 0; min-height: 533px; flex-direction: column; }
.drama-d-block { margin: 0 0 16px; }
.drama-d-block h2, .drama-d-section-head h2 { margin: 0 0 8px; color: var(--dd-text); font-size: 16px; font-weight: 720; }
.drama-d-muted { margin: 0; color: var(--dd-muted); }
.drama-d-synopsis p { display: -webkit-box; margin: 0; overflow: hidden; color: #b8b8c2; font-size: 14px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.drama-d-synopsis p.is-open { display: block; overflow: visible; }
.drama-d-synopsis button { display: inline-flex; margin-top: 8px; padding: 4px 12px; align-items: center; gap: 5px; border: 1px solid rgba(255,47,109,.35); border-radius: 999px; background: rgba(255,47,109,.1); color: #ff759d; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.drama-d-synopsis button::after { width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; content: ""; transform: rotate(45deg) translate(-1px,-1px); transition: transform .2s ease; }
.drama-d-synopsis button[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px,-2px); }
.drama-d-synopsis button[hidden] { display: none; }
.drama-d-rating { display: flex; min-height: 32px; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--dd-muted); }
.drama-d-score { display: inline-flex; align-items: baseline; }
.drama-d-rating strong { color: #ffb340; font-size: 22px; font-weight: 800; line-height: 1; }
.drama-d-rating-scale { color: #818493; font-size: 14px; }
.drama-d-stars { position: relative; display: inline-block; flex-shrink: 0; color: #39404f; font-size: 18px; line-height: 1; letter-spacing: 3px; white-space: nowrap; }
.drama-d-stars i { position: absolute; inset: 0 auto 0 0; width: 0; overflow: hidden; color: #ffb340; font-style: normal; }
.drama-d-stars i::before { content: "★★★★★"; }
.drama-d-my-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 8px; }
.drama-d-rate-label { color: #a5a8b6; font-size: 14px; }
.drama-d-rate-buttons { display: inline-flex; gap: 2px; }
.drama-d-rate-buttons button { display: grid; width: 22px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #39404f; cursor: pointer; font-size: 18px; line-height: 1; transition: color .12s; }
.drama-d-rate-buttons button.is-on { color: #ffb340; }
.drama-d-rate-buttons button:focus-visible { outline: 2px solid #ffc247; outline-offset: 2px; }
.drama-d-rate-buttons button:disabled { cursor: wait; }
.drama-d-rate-hint, .drama-d-rating-feedback { color: #818493; font-size: 12px; }
.drama-d-rating-count { margin: 3px 0 0; color: #818493; font-size: 12px; }
.drama-d-rating-count[hidden] { display: none; }
.drama-d-rating-feedback { margin: 4px 0 0; }
.drama-d-rating-feedback:empty { display: none; }
.drama-d-rating [hidden] { display: none !important; }
.drama-d-tags { display: flex; margin: 0; padding: 0; flex-wrap: wrap; gap: 7px; list-style: none; }
.drama-d-tags li { padding: 5px 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; background: var(--dd-surface); color: #b7b7c0; font-size: 12px; line-height: 1; }
.drama-d-meta { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 3px 12px; margin: 0; font-size: 14px; }
.drama-d-meta dt { color: var(--dd-muted); }
.drama-d-meta dd { overflow-wrap: anywhere; margin: 0; color: #d8d8df; }
.drama-d-actions { display: flex; margin-top: auto; padding-top: 12px; flex-wrap: wrap; gap: 10px; }
.drama-d-btn { display: inline-flex; min-height: 40px; padding: 0 18px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 680; text-decoration: none; }
.drama-d-btn--primary { background: linear-gradient(135deg, var(--dd-brand), #ff5a3d); color: #fff; }
.drama-d-btn--ghost { border-color: var(--dd-line); background: var(--dd-surface); color: #d1d1d8; }
.drama-d-btn--ghost:hover { border-color: rgba(255,47,109,.55); color: #fff; }
.drama-d-btn:disabled { cursor: not-allowed; filter: grayscale(.35); opacity: .5; }
.drama-d-section, .drama-d-comments { margin: 0 0 38px; }
.drama-d-episodes { scroll-margin-top: 96px; }
.drama-d-section-head { display: flex; min-height: 28px; margin-bottom: 12px; align-items: center; justify-content: space-between; gap: 16px; }
.drama-d-section-head h2 { margin: 0; font-size: 19px; }
.drama-d-section-head > span { color: var(--dd-muted); font-size: 13px; }
.drama-d-section-head > a { color: #ff759d; font-size: 13px; text-decoration: none; }
.drama-d-ep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.drama-d-ep-grid li { min-width: 0; }
.drama-d-ep-grid button, .drama-d-ep-grid a { position: relative; display: flex; width: 100%; height: 42px; padding: 0 5px; align-items: center; justify-content: center; border: 1px solid var(--dd-line); border-radius: 8px; background: var(--dd-surface); color: #c9c9d1; opacity: 1; text-decoration: none; }
.drama-d-ep-grid a { cursor: pointer; transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease; }
.drama-d-ep-grid a:hover, .drama-d-ep-grid a:focus-visible { border-color: rgba(255,47,109,.68); background: rgba(255,47,109,.11); color: #fff; transform: translateY(-1px); outline: none; }
.drama-d-ep-grid button { cursor: not-allowed; opacity: .48; }
.drama-d-ep-grid strong { font-size: 13px; font-weight: 650; }
.drama-d-ep-grid small { position: absolute; right: 4px; bottom: 2px; color: #777782; font-size: 8px; line-height: 1; }
.drama-d-comments { padding: clamp(16px,2vw,22px); border: 1px solid var(--dd-line); border-radius: 20px; background: var(--dd-surface); }
.drama-d-empty { padding: 34px 18px; border: 1px dashed var(--dd-line); border-radius: 12px; background: rgba(255,255,255,.018); color: var(--dd-muted); text-align: center; }
.drama-d-empty strong { display: block; margin-bottom: 5px; color: #d0d0d7; font-size: 15px; }
.drama-d-empty p { margin: 0; font-size: 13px; }
.drama-d-related { margin-top: 40px; }
.drama-d-related .drama-d-section-head { min-height: 0; margin-bottom: 16px; gap: 12px; }
.drama-d-related .drama-d-section-head h2 { position: relative; padding-left: 14px; color: #f3f3f6; font-size: 21px; font-weight: 750; line-height: 1.6; }
.drama-d-related .drama-d-section-head h2::before { position: absolute; top: .16em; bottom: .16em; left: 0; width: 4px; border-radius: 4px; background: #ff2f6d; content: ""; }
.drama-d-related-heading-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.drama-d-related-subtitle { color: #83838f; font-size: 13px; }
.drama-d-related .drama-d-section-head > a { flex-shrink: 0; white-space: nowrap; }
.drama-d-related-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 18px 14px; margin: 0; padding: 0; list-style: none; }
.drama-d-related-card { display: block; height: 100%; overflow: hidden; border: 1px solid var(--dd-line); border-radius: 12px; background: var(--dd-surface); color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.drama-d-related-card:hover { transform: translateY(-3px); border-color: rgba(255,47,109,.45); }
.drama-d-related-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 9/16; background: linear-gradient(145deg,#292934,#101014); }
.drama-d-related-cover::after { position: absolute; inset: 55% 0 0; content: ""; background: linear-gradient(transparent,rgba(0,0,0,.72)); }
.drama-d-related-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.drama-d-related-cover em { position: absolute; z-index: 1; bottom: 8px; left: 9px; color: #fff; font-size: 11px; font-style: normal; font-weight: 650; text-shadow: 0 1px 4px #000; }
.drama-d-related-info { display: block; padding: 10px 11px 12px; }
.drama-d-related-info strong { display: block; overflow: hidden; color: var(--dd-text); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.drama-d-related-info small { display: block; margin-top: 5px; color: var(--dd-muted); font-size: 11px; }
@media (max-width: 1199px) {
    .drama-d-related-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .drama-detail-v2 { padding-inline: 12px !important; padding-bottom: 38px; }
    .drama-d-title { margin-top: 6px; font-size: 18px; }
    .drama-d-hero { grid-template-columns: 1fr; gap: 22px; }
    .drama-d-cover { width: 100%; max-width: 300px; }
    .drama-d-body { min-height: 0; }
    .drama-d-actions { margin-top: 2px; padding-top: 6px; }
    .drama-d-btn { min-height: 39px; padding-inline: 15px; }
    .drama-d-related { margin-top: 26px; }
    .drama-d-related .drama-d-section-head h2 { font-size: 17px; }
    .drama-d-related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px 10px; }
}
@media (max-width: 340px) {
    .drama-detail-v2 { padding-inline: 10px !important; }
    .drama-d-meta { grid-template-columns: 76px minmax(0,1fr); }
    .drama-d-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .drama-detail-v2 *, .drama-detail-v2 *::before, .drama-detail-v2 *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Match the video detail composer; motion uses the shared component stylesheet. */
.drama-detail-v2 .comment-composer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
}

.drama-detail-v2 #comment-input {
    flex: 1;
    width: 0;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 22px;
    background: #131319;
    color: #f0f0f3;
    resize: none;
}

.drama-detail-v2 #comment-input:focus { border-color: #ff2f6d; }
.drama-detail-v2 .comment-composer-actions { margin: 0; }
.drama-detail-v2 .btn-comment {
    min-width: 84px;
    min-height: 42px;
    border-radius: 999px;
    background: linear-gradient(100deg, #ff2f6d, #ff5543);
}

.drama-detail-v2 #comment-nickname {
    flex: 0 0 120px;
    width: 120px;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    outline: none;
    background: #131319;
    color: #f0f0f3;
    font-size: 14px;
}
.drama-detail-v2 #comment-nickname:focus { border-color: #ff2f6d; }
.drama-detail-v2 [data-comment-guest][hidden] { display: none !important; }
.drama-detail-v2 .comment-rules { margin: -8px 0 14px; color: #83838f; font-size: 12px; line-height: 1.7; }

@media (max-width: 559px) {
    .drama-detail-v2 .comment-composer { flex-wrap: wrap; gap: 8px; }
    .drama-detail-v2 #comment-nickname { flex: 1 1 100px; }
    .drama-detail-v2 #comment-input { order: 3; flex-basis: 100%; width: 100%; min-height: 60px; }
    .drama-detail-v2 .comment-composer-actions { margin-left: auto; }
}


.drama-detail-v2 .drama-d-comments { margin: 0; border-radius: 20px; background: var(--dd-surface); }
.drama-detail-v2 .drama-d-comments .comment-heading { font-size: 20px; font-weight: 750; }

.drama-detail-v2 [data-drama-favorite][aria-pressed="true"] { border-color: #ff3866; color: #ff668a; }
.drama-detail-v2 .drama-d-favorite-feedback { flex-basis: 100%; color: #aaaab5; font-size: 13px; }
.drama-detail-v2 .drama-d-favorite-feedback:empty { display: none; }
