.panel-chort {
    border: 4px outset #8a95b3;
    background: linear-gradient(180deg, #1c1e39 0%, #101226 100%);
}

.chort-shell {
    display: grid;
    gap: 10px;
}

.panel-chort .panel-header {
    background: linear-gradient(180deg, #003f74 0%, #001f42 100%);
    border-bottom: 4px solid #43e6ff;
    padding: 16px 18px;
    gap: 16px;
}

.panel-chort .panel-header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.panel-chort .panel-header h2 {
    color: #00f0ff;
    text-shadow: 3px 3px 0 #00102c;
    letter-spacing: 1px;
}

.panel-chort .panel-header .home-panel-quote {
    color: #ffcc33;
    font-size: 20px;
    font-style: italic;
    margin: 0;
}

.chort-header-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #43e6ff;
    background: #00102c;
    image-rendering: pixelated;
}

.chort-panel .panel-content.chort-content {
    display: grid;
    gap: 14px;
}

.chort-status-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: "Courier New", monospace;
    font-size: 14px;
}

.chort-room {
    display: inline-block;
    background: #1b2d4a;
    color: #8bf7ff;
    border: 2px outset #44628c;
    padding: 4px 8px;
}

.chort-status {
    color: #666;
}

.chort-status-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.chort-info {
    position: relative;
}

.chort-info-toggle {
    list-style: none;
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px outset #4d6386;
    background: #182746;
    color: #a6dcff;
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: bold;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.chort-info-toggle::-webkit-details-marker {
    display: none;
}

.chort-info-toggle::marker {
    content: "";
}

.chort-info-toggle:focus-visible {
    outline: 2px solid #43e6ff;
    outline-offset: 2px;
}

.chort-info[open] .chort-info-toggle {
    border-style: inset;
    background: #12213a;
}

.chort-info-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(92vw, 320px);
    background: #0d1630;
    border: 2px outset #5d7294;
    padding: 10px;
    display: grid;
    gap: 8px;
    z-index: 20;
}

.chort-info-title {
    color: #7ea2d4;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.chort-room-alias {
    font-family: "Courier New", monospace;
    color: #91abd3;
    font-size: 13px;
    word-break: break-word;
}

.chort-open-app {
    width: 100%;
}

.chort-auth {
    border: 2px solid #1f2d4f;
    background: #0d1124;
    color: #d7e6ff;
    padding: 16px;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: start;
}

.chort-auth-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #32507d;
    background: #081128;
    image-rendering: pixelated;
}

.chort-auth-body {
    display: grid;
    gap: 10px;
}

.chort-auth-copy {
    margin: 0;
}

.chort-auth-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chort-chat {
    display: grid;
    gap: 10px;
}

.chort-timeline {
    background: #05070f;
    border: 2px inset #5a6b88;
    min-height: 420px;
    max-height: 58vh;
    overflow-y: auto;
    padding: 12px;
}

.chort-empty {
    color: #6b7f99;
    font-family: "Courier New", monospace;
    font-size: 13px;
}

.chort-msg {
    border-bottom: 1px solid #1c2941;
    padding: 8px 4px;
}

.chort-msg:last-child {
    border-bottom: 0;
}

.chort-msg-meta {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 4px;
    font-family: "Courier New", monospace;
    font-size: 12px;
}

.chort-msg-sender {
    color: #ffd35d;
    font-weight: bold;
}

.chort-msg-time {
    color: #6f87a8;
}

.chort-msg-body {
    color: #d7e6ff;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}

.chort-compose {
    display: grid;
    gap: 8px;
}

.chort-compose label {
    font-size: 13px;
    color: #8ea7cf;
    font-weight: bold;
}

#chort-input {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 74px;
    font-family: "Courier New", monospace;
    border: 2px inset #4d6386;
    background: #090f20;
    color: #d7e6ff;
    padding: 8px;
}

#chort-input::placeholder {
    color: #6f87a8;
}

.chort-compose-actions {
    display: flex;
    justify-content: flex-end;
}

#chort-send-btn {
    min-width: 92px;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    letter-spacing: 0.6px;
}

.chort-error {
    border: 2px solid #8c1b1b;
    background: #2d0d10;
    color: #ffb0b0;
    padding: 10px;
    font-family: "Courier New", monospace;
}

@media (max-width: 640px) {
    .chort-auth {
        grid-template-columns: 1fr;
    }

    .chort-auth-image {
        width: min(200px, 100%);
        height: auto;
    }
}
