/* ===================================================================
   common.css — 全ページ共通のスタイル
   ここには「全テンプレートに字句どおり同一で存在する」ルールだけを置く。
   ページ固有の見た目を変えないため、汎用セレクタ（p, ul, h1 など）は
   絶対に足さないこと。
   base.html から <style> より前に読み込まれるので、ページ側の
   インライン <style> が常に上書きできる（カスケード順を維持）。
   =================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

.language-switcher {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
}

.language-switcher label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.language-switcher select {
    min-width: 104px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    padding: 5px 8px;
}

@media (max-width: 640px) {
    .language-switcher {
        right: 10px;
        bottom: 10px;
    }

    .language-switcher label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
}

/* Shared setup-guide navigation.  Guide pages supply the surrounding nav
   style; these rules keep the logo and action links aligned at every size. */
body > nav {
    display: flex !important;
    align-items: center !important;
    padding: 0 40px !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 8px rgba(74, 74, 255, 0.07) !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    overflow: hidden;
}
body > nav > a[style*="flex:1"] {
    display: flex;
    align-items: center;
    height: 64px !important;
}
body > nav > a[style*="flex:1"] img {
    display: block;
    width: auto !important;
    height: 60px !important;
    min-height: 0 !important;
    max-height: 60px !important;
    object-fit: contain;
}
.nav-links { display: flex; gap: 12px; align-items: center; }
.btn-nav { padding: 8px 16px; color: #4a4aff; font-size: 14px; font-weight: 600; text-decoration: none; border-radius: 6px; background: #f0f0ff; }
.btn-login, .btn-mypage { padding: 8px 20px; border: 1px solid #d1d5db; border-radius: 6px; text-decoration: none; color: #374151; font-size: 14px; }
.btn-signup { padding: 8px 20px; background: #4a4aff; border-radius: 6px; text-decoration: none; color: #fff; font-size: 14px; font-weight: bold; }
.btn-logout { padding: 8px 20px; border-radius: 6px; text-decoration: none; color: #94a3b8; font-size: 14px; }
.nav-username { font-size: 14px; color: #6366f1; font-weight: 600; }

@media (max-width: 640px) {
    body > nav { height: 52px !important; min-height: 52px !important; max-height: 52px !important; }
    body > nav > a[style*="flex:1"] { height: 52px !important; }
    body > nav > a[style*="flex:1"] img { height: 44px !important; max-height: 44px !important; }
    .nav-links { gap: 6px; }
    .btn-nav, .btn-login, .btn-mypage, .btn-signup { padding: 6px 10px; font-size: 12px; }
    .btn-logout { padding: 6px 8px; font-size: 12px; }
}

/* SVGアイコン（絵文字置換 / 方式b）: 文字色を継承し、周囲の文字サイズに揃える。
   装飾は aria-hidden、意味を持つ場合は aria-label を付ける（render_icon 側で制御）。 */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
