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: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

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

/* タブメニュー */
.tab-menu {
    width: 100%;
    display: flex;
    gap: 4px;
    background: #16213e;
    padding: 6px;
    border-radius: 14px;
    border: 2px solid #0f3460;
    overflow-x: auto;
    box-sizing: border-box;
}

.tab-btn {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: inherit;
    background: transparent;
    color: #aaa;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

/* 設定バー */
.settings-bar {
    width: 100%;
    background: #16213e;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #0f3460;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #aaa;
    box-sizing: border-box;
}

.settings-bar select {
    padding: 6px 10px;
    background: #0f3460;
    color: #fff;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    font-family: inherit;
}

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

.convert-box {
    background: #0f3460;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #1a1a2e;
}

.output-bg {
    background: #111a30;
}

.input-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
}

input[type="number"], input[type="text"], select {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    background: #16213e;
    color: #fff;
    border: 1px solid #0f3460;
    border-radius: 10px;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #4ecca3;
}

#val-to {
    color: #4ecca3;
    font-weight: bold;
    background: #1a1a2e;
}

/* 逆変換ボタンエリア */
.switch-container {
    display: flex;
    justify-content: center;
    margin: -4px 0;
    z-index: 2;
}

.reverse-btn {
    background: #0f3460;
    color: #4ecca3;
    border: 1px solid #1a1a2e;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.reverse-btn:active {
    background: #4ecca3;
    color: #1a1a2e;
}

.copy-btn {
    width: 100%;
    background: #4ecca3;
    color: #1a1a2e;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    margin-top: 4px;
}

.copy-btn:active {
    transform: scale(0.98);
}

/* 情報ボックス */
.info-box {
    width: 100%;
    background: #16213e;
    border-radius: 15px;
    padding: 15px;
    box-sizing: border-box;
    border: 2px solid #0f3460;
}

.info-box h3 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: #4ecca3;
}

.info-box p {
    margin: 0;
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
}

/* SEO用テキストボックス */
.seo-text-box {
    margin-top: 10px;
    background-color: #16213e;
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid #0f3460;
    max-width: 440px;
    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;
}
