body {
    background: #1a1a2e;
    font-family: 'Zen Maru Gothic', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 10px;
    color: #fff;
    min-height: 100vh;
    overscroll-behavior: none;
}

.back-btn {
    align-self: flex-start;
    text-decoration: none;
    color: #ccc;
    background: #16213e;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    border: 1px solid #0f3460;
}

.tool-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

h1 {
    margin: 0;
    color: #4ecca3;
    font-size: 1.3rem;
}

/* タブメニュー */
.tab-menu {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: #16213e;
    padding: 6px;
    border-radius: 14px;
    border: 2px solid #0f3460;
}

.tab-btn {
    padding: 10px 4px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: inherit;
    background: transparent;
    color: #aaa;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #4ecca3;
    color: #1a1a2e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 計算パネル */
.calc-panel {
    width: 100%;
    background: #16213e;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
    border: 2px solid #0f3460;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hidden {
    display: none !important;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    background: #0f3460;
    color: #fff;
    border: 1px solid #1a1a2e;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: right;
}

.input-group input:focus {
    outline: none;
    border-color: #4ecca3;
}

.unit {
    font-size: 0.85rem;
    color: #aaa;
    text-align: right;
}

.radio-group {
    display: flex;
    gap: 20px;
    background: #0f3460;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.radio-group label {
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 結果表示ボックス */
.result-box {
    background: #0f3460;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid #1a1a2e;
    margin-top: 5px;
}

.result-label {
    font-size: 0.8rem;
    color: #aaa;
}

.result-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4ecca3;
}

.result-sub {
    font-size: 0.85rem;
    color: #ffd700;
}

.result-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    padding: 4px 0;
}

.result-row strong {
    color: #4ecca3;
    font-size: 1.2rem;
}

/* SEO用テキストボックス */
.seo-text-box {
    margin-top: 15px;
    background-color: #16213e;
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid #0f3460;
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.6;
}
.seo-text-box h2 {
    font-size: 1rem;
    color: #fff;
    margin-top: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 4px;
}
