/* 十二夜与守灵技的局部界面扩展。 */
:root {
    --red: #8b3a3a;
}

.menu-screen {
    background-color: #17231c;
    background-image: none;
}

.hud-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: none;
}

.btn-primary {
    background-image: var(--asset-button-primary-normal, none);
    background-position: center;
    background-size: 600% 140%;
    background-repeat: no-repeat;
}

.btn-primary:hover {
    background-image: var(--asset-button-primary-hover, var(--asset-button-primary-normal, none));
}

.btn-primary:active {
    background-image: var(--asset-button-primary-pressed, var(--asset-button-primary-normal, none));
}

.btn-secondary {
    background-image: var(--asset-button-secondary-normal, none);
    background-position: center;
    background-size: 600% 140%;
    background-repeat: no-repeat;
}

.btn-secondary:hover {
    background-image: var(--asset-button-secondary-hover, var(--asset-button-secondary-normal, none));
}

.btn-secondary:active {
    background-image: var(--asset-button-secondary-pressed, var(--asset-button-secondary-normal, none));
}

.tower-card {
    background-color: #17271e;
    background-image: var(--asset-panel-base, none);
    background-size: cover;
    background-position: center;
}

.build-card[hidden] {
    display: none;
}

.scene-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 0;
    max-height: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.scene-card {
    min-height: 168px;
    padding: 14px 15px 12px;
}

.scene-card > :not(.scene-card-visual) {
    flex-shrink: 0;
}

.scene-title {
    margin: 10px 0 12px;
    font-size: 32px;
}

.scene-intro {
    margin: 0;
}

.scene-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 0;
    width: 88%;
}

.scene-content > .section-kicker {
    margin: 0;
}

.scene-list {
    gap: 12px;
    margin: 18px 0;
}

.scene-card-visual {
    position: absolute;
    top: 10px;
    right: 12px;
    margin: 0;
    font-size: 38px;
    opacity: .16;
}

.scene-card-title {
    margin-top: 9px;
}

.scene-content > #backBtn {
    align-self: flex-start;
    flex: none;
}

.scene-card.locked {
    opacity: .68;
    filter: saturate(.35);
}

.scene-card-status {
    min-height: 18px;
    margin-top: 9px;
    color: #d6bd7b;
    font-size: 11px;
    letter-spacing: 1px;
}

.scene-card.locked .scene-card-status {
    color: #9fa694;
}

.scene-card.cleared .scene-card-status {
    color: #9dc39e;
}

.scene-card .btn-scene:disabled {
    color: #778073;
    cursor: not-allowed;
    opacity: .8;
}

.tower-card {
    z-index: 35;
    max-height: calc(100% - 124px);
    overflow-y: auto;
}

.skill-panel {
    position: absolute;
    left: 16px;
    bottom: 122px;
    z-index: 8;
    display: flex;
    gap: 7px;
}

.skill-btn {
    position: relative;
    width: 64px;
    height: 66px;
    display: grid;
    place-items: center;
    padding: 5px 3px;
    overflow: hidden;
    border: 1px solid #bd9d5d88;
    background: #26352be8;
    color: #ead9ad;
}

.skill-btn:hover:not(:disabled) {
    border-color: #e1c77b;
    background: #3b4934;
}

.skill-btn:disabled {
    cursor: not-allowed;
}

.skill-key {
    position: absolute;
    top: 3px;
    left: 5px;
    color: #bd9d5d;
    font-family: var(--sans);
    font-size: 11px;
}

.skill-glyph {
    font-size: 20px;
    line-height: 1;
}

.skill-name {
    font-size: 11px;
}

.skill-cd {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #111a17bf;
    color: #d6bd7b;
    font-size: 10px;
    text-align: center;
}

.skill-btn.unaffordable {
    filter: saturate(.45);
    opacity: .72;
}

.story-bar {
    left: 232px;
    max-width: 42%;
    pointer-events: none;
}

.ending-card {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #b09e6f65;
    background: #202d23b8;
    text-align: left;
}

.ending-card strong {
    color: #e0c58d;
    font-size: 15px;
    letter-spacing: 3px;
}

.ending-card p {
    margin: 8px 0 0;
    color: #b9c3ab;
    font-size: 11px;
    line-height: 1.8;
}

@media (max-width: 1200px) and (orientation: landscape) {
    .skill-panel {
        left: 8px;
        bottom: 84px;
    }

    .skill-btn {
        width: 48px;
        height: 53px;
    }

    .story-bar {
        left: 154px;
        max-width: 48%;
    }
}

@media (max-width: 1000px) {
    .scene-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: none;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .scene-content {
        width: 92%;
        padding: 10px 0;
    }

    .scene-title {
        font-size: 22px;
        margin: 3px 0;
    }

    .scene-intro {
        margin: 4px 0;
    }

    .scene-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 9px 0;
        gap: 8px;
    }

    .scene-card {
        min-height: 146px;
        padding: 10px;
    }
}

.difficulty-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--ink);
}

.difficulty-picker select {
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  font: inherit;
}

.difficulty-picker select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.tc-terrain {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--gold);
}

.tc-terrain-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
}
