/* RESET */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Noto Sans JP", monospace;
    background: #0b0f14;
    color: #0f0;
    overflow-y: auto;
}

/* APP */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid #222;
    color: #fff;
}

.header-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MAIN */
.main {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* SIDEBAR */
.sidebar {
    width: 180px;
    border-right: 1px solid #222;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.mascot-sidebar {
    width: 100%;
    border-radius: 6px;
    display: block;
}

/* NOTES */
.notes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.note {
    background: #fff3a0;
    color: #111;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    border-left: 4px solid #ffcc00;
    min-height: 110px;
}

.note pre {
    font-family: monospace;
    font-size: 11px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* CONTENT */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

/* INFO */
.info {
    padding: 10px;
    font-size: 13px;
    color: #aaa;
    border-bottom: 1px solid #222;
    line-height: 1.6;
    flex-shrink: 0;
}

/* MAP ROW */
.map-row {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
}

/* MAP */
.map {
    flex: 1;
    height: 260px;
    min-height: 200px;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

/* SIDE PANEL */
.side-panel {
    flex: 1;
    display: flex;
    align-items: stretch;
}

/* PANEL (Your Data) */
.panel-box {
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    font-size: 12px;
    color: #666;
}

/* YOUR DATA CONTROLS */
.yd-controls {
    display: flex;
    gap: 6px;
    margin: 6px 0;
}

.yd-controls input {
    flex: 1;
    background: #0b0f14;
    border: 1px solid #333;
    color: #0f0;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.yd-controls input:focus {
    outline: none;
    border-color: #0f0;
}

.yd-controls button {
    background: #111;
    border: 1px solid #333;
    color: #0f0;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.yd-controls button:hover {
    background: #1a1a1a;
}

/* STREAM */
.stream {
    flex: 1;
    min-height: 0;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.3;
    font-family: monospace;
}

/* ROW */
.row {
    padding: 2px 0;
    white-space: nowrap;
    overflow-x: auto;
}

/* STREAM COLORS */
.row .time { color: #fff; }
.row .device { color: #4da3ff; }
.row .meta { color: #aaa; }
.row .payload { color: #0f0; }
.row .size { color: #666; }

/* YOUR DATA COLORS */
.panel-box .time {
    color: #777;
    margin-right: 6px;
}

.panel-box .payload {
    color: #0f0;
}

.panel-box .raw {
    color: #555;
    font-size: 10px;
    margin-top: 2px;
}

/* FOOTER */
.footer {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #aaa;
    border-top: 1px solid #222;
    background: #0e131a;
}

/* MOBILE */
@media (max-width: 768px) {

    .main {
        flex-direction: column;
    }

    .content {
        order: 1;
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        order: 2;
        width: 100%;
        border-right: none;
        border-top: 1px solid #222;
    }

    .notes {
        grid-template-columns: repeat(2, 1fr);
    }

    .map-row {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .map {
        width: 100%;
        height: 160px;
    }

    .side-panel {
        width: 100%;
    }

    .stream {
        min-height: 120px;
        max-height: none;
    }

    .mascot-sidebar {
        order: 99;
        max-height: 90px;
        object-fit: contain;
    }
}