/* --- 共通: 基本設定 (前回同様) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Header */
.site-header {
    width: 100%;
    background-color: #ffffff;
    color: #333333; 
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
    position: sticky;
    top: 0;
    z-index: 100; 
}
.header-content {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}
.site-header h1 {
    margin: 0;
    font-size: 1.8em;
    color: #1abc9c;
}
.site-header .subtitle {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.9em;
}

/* Container */
.container {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    box-sizing: border-box;
}

/* Breadcrumbs */
.breadcrumbs {
    width: 100%;
    background-color: transparent;
    padding: 0 0 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}
.breadcrumbs-content {
    width: 100%;
    font-size: 0.85em; 
    color: #555555;
}
.breadcrumbs a {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumbs a:hover {
    color: #333333;
    text-decoration: underline;
}
.current-page {
    color: #555555; 
}

/* Simulator Form */
.simulator-wrapper h2 {
    font-size: 1.5em;
    color: #34495e;
    border-left: 5px solid #16a085;
    padding-left: 10px;
    margin: 0 0 10px 0;
}
.simulator-description {
    font-size: 0.9em;
    color: #555555;
    margin-bottom: 20px;
}
.divider {
    border: 0;
    border-top: 1px dashed #dddddd;
    margin: 20px 0;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-weight: bold;
    font-size: 0.9em;
    color: #555555;
    margin-bottom: 5px;
}
input[type="text"],
input[type="number"],
select,
textarea {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
.select-input {
    background-color: #ffffff;
    cursor: pointer;
}
.form-row {
    display: flex;
    gap: 15px;
}
.form-row .form-group {
    flex: 1;
}
.hidden-row {
    display: none;
}

/* Team Maker Specific */
.member-area {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}
.member-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #2c3e50;
}
.member-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.member-count {
    font-size: 0.9em;
    font-weight: bold;
    color: #1abc9c;
}
.input-note {
    font-size: 0.8em;
    color: #95a5a6;
    margin-top: 10px;
    text-align: right;
}

/* Member List */
.members-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}
.member-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    padding: 8px 10px;
    border: 1px solid #eeeeee;
    border-radius: 5px;
}
.drag-handle {
    font-size: 0.8em;
    color: #bdc3c7;
    min-width: 25px;
}
.member-name {
    flex: 2;
    min-width: 0; /* Flexbox overflow fix */
}
.level-wrapper {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
}
.inline-label {
    font-size: 0.8em;
    color: #7f8c8d;
}
.member-level {
    padding: 5px;
    font-size: 0.9em;
}

/* Buttons */
.preset-btn {
    background-color: #ffffff;
    border: 1px solid #1abc9c;
    color: #1abc9c;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.preset-btn:hover {
    background-color: #e8f8f5;
}
.icon-btn {
    background-color: #34495e;
    color: #fff;
    border-color: #34495e;
}
.icon-btn:hover {
    background-color: #2c3e50;
    color: #fff;
}

.add-option-area {
    text-align: center;
    padding-top: 10px;
    border-top: 1px dashed #dddddd;
}
.compact-add-area {
    margin-top: 10px;
}
.add-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    font-size: 0.9em;
}
.add-btn:hover {
    opacity: 0.9;
}

.main-btn {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    background-color: #1abc9c;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.main-btn:hover {
    background-color: #16a085;
    transform: translateY(-2px);
}

/* Result Area */
.hidden {
    display: none !important;
}
.result-area {
    margin-top: 30px;
    padding: 25px;
    background-color: #34495e; /* Secondary Color */
    color: #e8f8f5;
    border-radius: 8px;
}
.result-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.result-header-row h3 {
    margin: 0;
    color: #ffffff;
}
.result-actions {
    display: flex;
    gap: 8px;
}

.capture-container {
    background-color: #34495e;
    padding: 10px; /* キャプチャ用の余白 */
    border-radius: 5px;
}
.hidden-on-screen {
    display: none;
}
/* キャプチャ時に表示するクレジット */
.capture-mode .hidden-on-screen {
    display: block;
    text-align: right;
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    margin-top: 10px;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.team-card {
    background-color: #ffffff;
    color: #333333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.team-card-header {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.team-power {
    font-size: 0.8em;
    background-color: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
}
.team-member-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.team-member-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    justify-content: space-between;
    font-size: 0.95em;
}
.team-member-item:last-child {
    border-bottom: none;
}
.member-lvl-badge {
    color: #95a5a6;
    font-size: 0.85em;
}

.result-area .note {
    font-size: 0.8em;
    color: #95a5a6;
    margin-top: 15px;
}

/* Dialog */
.custom-dialog {
    border: none;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
}
.custom-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}
.custom-dialog h3 {
    margin-top: 0;
    color: #2c3e50;
}
.custom-dialog textarea {
    width: 100%;
    margin: 10px 0;
}
.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Caution */
.usage-caution-area {
    margin-top: 40px;
    padding-top: 20px;
}
.usage-caution-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #34495e;
    margin: 0 0 15px 0;
}
.usage-caution-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
    color: #555555;
    font-size: 0.85em;
    line-height: 1.8;
}

/* Footer */
.page-footer {
    width: 100%;
    background-color: #2c3e50;
    color: #ffffff;
    padding: 40px 0 20px 0;
    margin-top: auto;
}
.footer-content {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto; 
}
.footer-row {
    display: flex;
    justify-content: flex-start;
    gap: 80px;
    margin-bottom: 40px;
}
.footer-section {
    flex: 0 0 auto;
    min-width: auto;
}
.section-title {
    color: #1abc9c;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 15px;
}
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-section li {
    margin-bottom: 10px;
}
.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.95rem;
}
.footer-section a:hover {
    color: #1abc9c;
    text-decoration: underline;
}
.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #95a5a6;
    border-top: 1px solid #34495e;
    padding-top: 20px;
    width: 100%;
}

/* Responsive */
@media (max-width: 600px) {
    .container, .header-content, .footer-content {
        width: 95%;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .result-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .result-actions {
        width: 100%;
        justify-content: space-between;
    }
    .preset-btn {
        flex: 1;
        text-align: center;
    }
    .footer-row {
        flex-direction: column;
        gap: 20px;
    }
}