* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #151520;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Manrope", Arial, sans-serif;
    color: #f3e5ce;
}

.dashboard-container {
    width: 80%;
    height: 85vh;
    display: flex;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
}

.resolve-turn-container {
    background: #1d1d29;
    border-radius: 10px;
    border: 2px solid #f3e5ce;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.resolve-turn-intro {
    white-space: pre-line;
    color: #f3e5ce;
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0;
}

.resolve-turn-stories {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    margin-top: 30px;
}

.resolve-turn-stories .story-container {
    cursor: default;
}

.resolve-turn-stories .story-main {
    width: 40%;
    opacity: 0;
}

.resolve-turn-stories .story-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    opacity: 0;
}

.resolve-turn-stories .story-reach-rating-label {
    width: 100%;
    text-align: right;
}

.resolve-turn-stories .story-score {
    width: 100%;
    position: relative;
}

.resolve-turn-stories .story-score-value {
    width: 0;
    visibility: hidden;
}

.resolve-score-status {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 0.78rem;
    color: #fff;
    padding-left: 8px;
    pointer-events: none;
}

.resolve-turn-stories .story-score-value.resolve-score-jitter {
    animation: resolve-score-jitter 240ms linear 2;
}

@keyframes resolve-score-jitter {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

.resolve-turn-close-btn {
    align-self: flex-end;
    min-width: 140px;
    border: 0;
    border-radius: 10px;
    padding: 10px 20px;
    background: #f05a5b;
    color: #151520;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.left-container {
    width: 70%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.right-container {
    width: 30%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.stories-container,
.people-container,
.boss-container,
.resources-container {
    border: 2px solid #f3e5ce;
    border-radius: 10px;
    margin: 5px;
}

.stories-container {
    height: 60%;
    overflow-y: auto;
    padding: 8px;
}

.story-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    cursor: default;
}

.story-container.drop-target-active {
    outline: 2px dashed #dfb85a;
    outline-offset: 3px;
    border-radius: 8px;
}

.story-assigned-journalists {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 2px 2px;
    min-height: 0;
}

.assigned-journalist-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #dfb85a;
    cursor: grab;
    flex-shrink: 0;
}

.assigned-journalist-icon:active {
    cursor: grabbing;
}

.assigned-journalist-icon.dragging {
    opacity: 0.4;
}

.assigned-journalist-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-main {
    width: 60%;
    background: #f3e5ce;
    border-radius: 8px;
    padding: 10px;
}

.story-title {
    color: #151520;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.story-text {
    color: #6d6d6d;
    font-size: 0.85rem;
    line-height: 1.3;
}

.story-fake-rating {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    cursor: pointer;
    width: fit-content;
}

.story-fake-rating-label {
    font-size: 0.65rem;
    color: #888;
    margin: 0;
}

.story-fake-score {
    width: 100px;
    height: 10px;
    background: #808080;
    border-radius: 999px;
    overflow: hidden;
}

.story-fake-score-value {
    height: 100%;
    background: #f05a5b;
    border-radius: 999px;
}

.story-side {
    flex: 1;
    margin: 0 20px;
}

.story-reach-rating-label {
    font-size: 0.65rem;
    color: #888;
    margin: 0 0 0 0;
    margin-top: 15px;
}

.story-score {
    width: 100%;
    height: 30px;
    margin-top: 10px;
    background: #808080;
    border-radius: 6px;
    cursor: pointer;
}

.story-score-value {
    width: 40%;
    height: 100%;
    background: #7a4161;
    border-radius: 6px;
}

.people-container {
    height: calc(40% - 10px);
    display: flex;
    gap: 10px;
    padding: 8px;
    transition: outline 120ms ease;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
}

.people-container.drop-target-active {
    outline: 2px dashed #f05a5b;
    outline-offset: 2px;
}

.journalist-container {
    position: relative;
    margin: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
   min-width: 120px;
    transition: opacity 220ms ease;
}

.journalist-container[draggable="true"] {
    cursor: grab;
}

.journalist-container[draggable="true"]:active {
    cursor: grabbing;
}

.journalist-container.dragging {
    opacity: 0.4 !important;
}

.journalist-container.drop-target-active {
    outline: none;
}

.influence-rating {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #dfb85a;
    color: #151520;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.journalist {
    height: 150px;
    width: auto;
    margin: 40px auto 4px;
    object-fit: contain;
}

.journalist-name {
    text-align: center;
    font-size: 0.72rem;
    color: #888;
    margin: 0 4px 4px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commitment-score {
    width: 100%;
    height: 18px;
    background: #808080;
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
}

.commitment-score-value {
    width: 30%;
    height: 100%;
    background: #3c4488;
}

.boss-container {
    height: 20%;
    padding: 12px;
    cursor: pointer;
}

.turn-container,
.finish-container {
    margin: 5px;
}

.turn-container {
    height: 15%;
    border: 0;
    background: transparent;
    color: #dfb85a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 8px 4px;
}

.turn-label {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.turn-value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.section-title {
    color: #f05a5b;
    font-size: 1.5rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    margin-bottom: 12px;
}

.boss-rating {
    width: 100%;
    height: 22px;
    background: #cccccc;
    border-radius: 999px;
    overflow: hidden;
}

.boss-rating-value {
    width: 30%;
    height: 100%;
    background: #f05a5b;
}

.resources-container {
    height: calc(40% - 20px);
    padding: 12px;
    cursor: pointer;
}

.finish-container {
    height: calc(25% - 20px);
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.end-week-btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 12px;
    background: #f05a5b;
    color: #151520;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
}

.end-week-help-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: #808080;
    color: #f3e5ce;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
}

.stories-container > .section-title {
    cursor: pointer;
}

.resources-container .section-title {
    margin-bottom: 10px;
}

.resource {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #f3e5ce;
}

.resource-icon {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
}

.resource-value {
    font-weight: 700;
    font-size: 1.5rem;
}

.popup-layer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.is-hidden {
    display: none;
}

.popup-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0.8;
    z-index: 1;
}

.popup-stack {
    position: relative;
    z-index: 2;
    width: min(900px, 90vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.popup-container {
    width: 100%;
    height: auto;
    background: #1d1d29;
    border: 2px solid #f3e5ce;
    border-radius: 10px;
    padding: 14px;
}

.help-container {
    width: 40%;
}

.popup-close {
    margin-left: auto;
    display: block;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f05a5b;
    color: #151520;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
}

.help-container p,
.dialog-text {
    color: #f3e5ce;
    line-height: 1.4;
}

.dialog-container,
.action-container {
    width: 60%;
}

.action-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.action-message-container {
    background: #f3e5ce;
    border-radius: 12px;
    padding: 14px;
}

.action-message-text {
    color: #151520;
    white-space: pre-line;
    line-height: 1.5;
}

.action-attachment {
    margin-top: 12px;
    color: #6d6d6d;
    font-size: 0.95rem;
    line-height: 1.4;
}

.action-typing-text {
    color: #808080;
    line-height: 1.4;
}

.increase-commitment-actions {
    margin-top: 6px;
    padding: 14px;
    background: #ffffff33;
    border-radius: 8px;
}

.increase-commitment-text {
    color: #f3e5ce;
    font-size: 0.92rem;
    line-height: 1.4;
}

.increase-commitment-error {
    margin-top: 10px;
    color: #f05a5b;
    font-size: 0.9rem;
}

.increase-commitment-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.commitment-action-btn {
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    background: #dfb85a !important;
    color: #151520;
    font-weight: 700;
    cursor: pointer;
}

.journalist-profile-container {
    width: 60%;
}

.journalist-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.journalist-profile-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dfb85a;
}

.journalist-profile-name {
    color: #dfb85a;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.journalist-profile-text {
    color: #f3e5ce;
    line-height: 1.5;
    margin-bottom: 12px;
    white-space: pre-line;
}

.journalist-profile-audience {
    color: #f3e5ce;
    font-weight: 700;
    margin-bottom: 14px;
}

.dialog-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.popup-btn {
    border: 0;
    border-radius: 8px;
    padding: 8px 16px;
    background: #f05a5b;
    color: #151520;
    font-weight: 700;
    cursor: pointer;
}

.popup-btn-secondary {
    background: #808080;
    color: #f3e5ce;
}

.finish-btn {
    display: block;
    margin-left: auto;
}

@media (max-width: 800px) {
    .help-container,
    .dialog-container,
    .action-container {
        width: 90%;
    }
}
