:root {
    --text: #202124;
    --sub: #5f6368;
    --line: #dadce0;
    --bg: #fff;
    --tab: #f1f3f4;
    --tab-active: #fff
}

[data-theme="dark"] {
    --text: #e8eaed;
    --sub: #9aa0a6;
    --line: #3c4043;
    --bg: #202124;
    --tab: #2b2c2f;
    --tab-active: #202124
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.4 system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Arial;
    transition: background .3s, color .3s;
    overflow: hidden
}

.app {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100%
}

/* tabs */
.bar {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    background: transparent
}

.tabs {
    display: flex;
    gap: 6px;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none
}

.tabs::-webkit-scrollbar {
    display: none
}

.tab {
    display: grid;
    grid-template-columns: 16px minmax(60px, 180px) 16px;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid var(--line);
    background: var(--tab);
    border-radius: 10px;
    min-width: 140px;
    user-select: none;
    cursor: pointer
}

.tab.active {
    background: var(--tab-active);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08)
}

.ico {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain
}

.ttl {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px
}

.x {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--sub)
}

.x:hover {
    background: rgba(128, 128, 128, .15)
}

.new {
    height: 30px;
    width: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    cursor: pointer
}

/* stage */
.stage {
    position: relative;
    height: 100%;
    width: 100%;
    background: var(--bg)
}

.pane {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: none;
    background: var(--bg)
}

.pane.active {
    display: block
}

/* try to hide scrollbars (works for same-origin) */
.pane::-webkit-scrollbar {
    display: none
}

.pane {
    scrollbar-width: none;
    -ms-overflow-style: none
}