html {
  height: 100%;
  background: 50% 50% no-repeat
    url('data:image/svg+xml,<svg viewBox="-20 -5 60 40" width="140" xmlns="http://www.w3.org/2000/svg" opacity="0.2"><path d="M1 8l11-7 11 7v8l-11 7-11-7zm0 0l11 8 11-8m0 8L12 8 1 16M12 1v7m0 8v7" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="2"/><text x="-12" y="32" font-size="5" font-family="monospace" fill="currentColor">Built on CodePen</text></svg>');
}
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
body { 
    background-color: #120b08; 
    color: #fca; 
    font-family: -apple-system, BlinkMacSystemFont, 'Courier New', Courier, monospace; 
    padding: 5px; 
    margin: 0; 
}
#game-container { 
    max-width: 800px; 
    margin: 0 auto; 
    border: 2px solid #c83; 
    padding: 8px; 
    background-color: #21130d; 
    box-shadow: 0 0 10px rgba(200, 136, 51, 0.3);
    display: flex;
    flex-direction: column;
}
h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    text-align: center;
    color: #fda;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#bgm-toggle-btn {
    background-color: #3a2214;
    color: #ffaa00;
    border: 1px solid #ffaa00;
    font-size: 10px;
    padding: 2px 6px;
    cursor: pointer;
    width: auto;
    display: inline-block;
}
#boss-header-panel {
    border: 1px solid #f33;
    background-color: #2a0808;
    padding: 5px;
    margin-bottom: 6px;
    font-size: 11px;
    border-radius: 4px;
}
.hp-bar-bg {
    background-color: #441111;
    border: 1px solid #833;
    height: 12px;
    width: 100%;
    margin-top: 3px;
    border-radius: 2px;
    overflow: hidden;
}
.hp-bar-fill {
    background-color: #f33;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

#main-layout { 
    display: flex; 
    gap: 6px; 
    margin-bottom: 6px;
}
#screen { 
    flex: 1.2; 
    height: 450px; 
    border: 1px dashed #c83; 
    padding: 6px; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
    white-space: pre-wrap; 
    font-size: 11px; 
    line-height: 1.4;
    background-color: #0f0704;
}
#status-panel { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    height: 450px; 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}

#parties-status-box, #relics-box { 
    border: 1px solid #c83; 
    padding: 4px; 
    font-size: 9px; 
    background-color: #180d08; 
    line-height: 1.3;
}
.status-title { 
    border-bottom: 1px dotted #c83; 
    margin-bottom: 3px; 
    font-weight: bold; 
    color: #fda;
}
.member-card {
    border-bottom: 1px solid #322;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#command-area {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
button { 
    background-color: #2a180e; 
    color: #fca; 
    border: 1px solid #c83; 
    padding: 8px 5px; 
    margin: 2px 0; 
    font-size: 11px; 
    cursor: pointer; 
    width: 100%; 
    display: block;
    touch-action: manipulation;
    border-radius: 0;
    -webkit-appearance: none;
    text-align: center;
}
button:active {
    background-color: #422617;
}
.btn-danger {
    color: #ff5555;
    border-color: #ff5555;
    background-color: #260d0d;
}
.btn-time {
    color: #55ffff;
    border-color: #55ffff;
    background-color: #0d2626;
    font-weight: bold;
}
.btn-warning {
    color: #ffaa00;
    border-color: #ffaa00;
    background-color: #261a0d;
    font-weight: bold;
}
.btn-party {
    color: #ff88ff;
    border-color: #ff88ff;
    background-color: #260d26;
    font-weight: bold;
}
.btn-equip {
    background-color: #1a3344;
    color: #55ffff;
    border: 1px solid #55ffff;
    padding: 1px 3px;
    font-size: 8px;
    display: inline-block;
    width: auto;
    margin-left: 4px;
    cursor: pointer;
}
.equip-select-btn {
    background-color: #112233;
    color: #aae;
    border: 1px solid #55a;
    padding: 5px;
    margin: 2px 0;
    font-size: 10px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}