* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-align: center;
    background-color: #f4f4f9;
    padding: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* セットアップ・初期設定モーダル（スマホ大画面スケール版） */
.setup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    z-index: 1000;
    padding: 6svw 4svw;
    border-radius: 4svw;
    width: 88svw;
    max-width: 800px;
    border: 0.8svw solid #00b0f0;
    box-shadow: 0 4svw 10svw rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* タイトル */
.setup h1 {
    font-size: 6.5svw;
    font-weight: 800;
    color: #111111;
    margin: 0 0 1svw 0;
    line-height: 1.2;
}

/* サブテキスト (RC-S380) */
.setup p {
    font-size: 4svw;
    font-weight: bold;
    color: #555555;
    margin: 0 0 4svw 0;
}

/* 読み取り開始ボタン */
button#readButton {
    width: 100%;
    padding: 3.5svw 2svw;
    font-size: 4.5svw;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2.5svw;
    border: none;
    background-color: #0078D7;
    color: white;
    box-shadow: 0 1svw 3svw rgba(0, 120, 215, 0.3);
    transition: 0.2s;
    margin: 5svw 0;
    white-space: nowrap;
    box-sizing: border-box;
}

button#readButton:active {
    transform: scale(0.96);
}

/* 「待機中...」テキスト */
#output {
    margin: 4svw 0 2svw 0;
    font-size: 4.8svw;
    font-weight: 800;
    color: #222222;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* API Token 入力欄 */
.setup input#token {
    width: 90%;
    padding: 3.5svw 2svw;
    font-size: 4.5svw;
    border: 0.4svw solid #c0c6cc;
    border-radius: 2svw;
    text-align: center;
    outline: none;
    margin-top: 3svw;
    box-sizing: border-box;
    background-color: #fcfcfd;
}

.setup input#token:focus {
    border-color: #00b0f0;
    background-color: #ffffff;
    box-shadow: 0 0 0 0.8svw rgba(0, 176, 240, 0.25);
}

/* 読み取り開始ボタン */
button {
    width: 100%;
    max-width: 600px;
    padding: 12px 20px;
    font-size: clamp(0.95rem, 4vw, 1.05rem);
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background-color: #0078D7;
    color: white;
    transition: background-color 0.2s, transform 0.1s;
    margin: 6px auto 0;
    display: inline-block;
}

button:hover {
    background-color: #005A9E;
}

button:active {
    transform: scale(0.98);
}

/* 結果表示エリア */
.result {
    background-color: #00b0f0;
    width: 100%;
    height: 30svw;
    padding: 1svw 0;
    margin: 0;
    transition: background-color 0.3s;
}

#logo {
    width: 10svw;
    position: absolute;
    right: 0;
    margin: 2svw;
    z-index: 100;
    fill: #ffffff;
}

#result-text {
    font-size: 20svw;
    font-family: 'Arial', sans-serif;
    font-style: oblique;
    letter-spacing: 0.1em;
    color: #ffffff;
    line-height: 30svw;
    margin: 0;
}

/* カード詳細情報エリア */
.card-info {
    width: 90%;
    margin: 1svw auto;
    height: 40svw;
    position: relative;
}

.card-info .label {
    display: block;
    font-size: 7svw;
    color: #000000;
    margin-top: 0;
    position: absolute;
    left: 5svw;
}

.card-info .result-text {
    display: block;
    font-size: 10svw;
    color: #000000;
    margin-top: 15svw;
    position: relative;
    bottom: -15svw;
}

.card-info .result-text-underline {
    margin-top: 15svw;
    position: absolute;
    left: 15svw;
    width: 70svw;
    height: 0.5svw;
    background-color: #000000;
}

/* フルスクリーン黒画面オーバーレイ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: none;
}