.joseki-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.board-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.joseki-id {
    font-size: 36px;
    font-weight: bold;
    color: #764ba2;
}

.joseki-id-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.description-box {
    line-height: 1.8;
    color: #555;
    font-size: 15px;
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.winrate-info {
    display: none;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 10px 16px;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
}

.winrate-info .winrate-diff {
    color: #888;
    font-size: 12px;
}

.winrate-info .winrate-diff.positive {
    color: #16a34a;
}

.winrate-info .winrate-diff.negative {
    color: #dc2626;
}

.winrate-info .winrate-sep {
    width: 1px;
    height: 16px;
    background: #c7d2fe;
    margin: 0 20px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    flex: 1;
    max-width: 160px;
}

.nav-btn:hover:not(:disabled) {
    background: #5a67d8;
}

.nav-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.candidates-section {
    margin-top: 20px;
}

.candidates-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
    font-size: 15px;
}

.candidate-item {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    background: #e0e7ff;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    color: #4c51bf;
}

.candidate-item:hover {
    background: #c7d2fe;
}

#boardCanvas {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    background: #dcb35c;
}

.hint-text {
    color: #667eea;
    font-style: italic;
    margin-top: 10px;
    font-size: 14px;
}

.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.toggle-switch {
    position: relative;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #667eea;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.search-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    margin-top: 10px;
    max-height: 180px;
    overflow-y: auto;
}

.search-result-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 4px;
    font-size: 14px;
}

.search-result-item:hover {
    background: #e0e7ff;
}

.content-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: visible;
}

.info-section {
    flex-shrink: 0;
}

.share-btn {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.share-btn:hover { background: #5a67d8; }

.share-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.share-overlay.show { display: flex; }

.share-dialog {
    background: white;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 420px;
    width: 90%;
}
.share-dialog h3 {
    margin: 0 0 8px 0;
    color: #2d3748;
    font-size: 18px;
}
.share-dialog .share-id {
    color: #764ba2;
    font-weight: bold;
    font-size: 22px;
    margin-bottom: 16px;
}
.share-url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.share-url-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    color: #555;
    background: #f8f9fa;
    outline: none;
}
.share-copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.share-copy-btn:hover { background: #5a67d8; }
.share-copy-btn.copied { background: #16a34a; }

.share-close {
    display: inline-block;
    margin-top: 8px;
    color: #999;
    cursor: pointer;
    font-size: 14px;
}
.share-close:hover { color: #555; }

/* Toast */
.toast-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.toast-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: auto;
}
.toast-card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px 36px 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 420px;
    width: 90%;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s;
    pointer-events: auto;
}
.toast-container.show .toast-overlay { opacity: 1; }
.toast-container.show .toast-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.toast-icon { font-size: 56px; margin-bottom: 12px; }
.toast-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px;
}
.toast-msg {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px;
}
.toast-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.toast-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.toast-btn-primary { background: #667eea; color: white; }
.toast-btn-primary:hover { background: #5a67d8; }
.toast-btn-secondary { background: #e2e8f0; color: #475569; }
.toast-btn-secondary:hover { background: #cbd5e0; }