body {
    font-family: Arial, sans-serif;
    padding: 0;
    margin: 0;
    color: #2c3e50;
}

header,
footer {
    width: 100%;
    background: linear-gradient(135deg, #00b140, #ffd700);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 20px;
}

header a {
    color: white;
    text-decoration: none;
}

.background {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main {
    max-width: 800px;
    margin: auto;
}

.section {
    margin-bottom: 0;
    padding: 0 10px 5px 10px;
    border-bottom: 2px solid #ddd;
}

.section h3 {
    padding-left: 10px;
    margin-bottom: 0;
}

.section p {
    margin-top: 5px;
    padding-left: 20px;
}

/* ↓パンくず */
.breadcrumb {
    font-size: 0.9em;
    margin: 16px 0;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb li+li::before {
    content: "›";
    margin: 0 8px;
    color: #666;
}

.breadcrumb a {
    text-decoration: none;
    color: #0073e6;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ↑パンくず */

.main-content {
    max-width: 560px;
    width: 100%;
    text-align: center;
    padding: 20px;
    margin: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-wrap: break-word;
}

.container {
    max-width: 800px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
    color: #00b140;
}


.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 16px;
}

.compare-table th,
.compare-table td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}

.compare-table th {
    background-color: #f5f5f5;
    font-weight: bold;

}

.compare-table2 th {
    width: 50%;
}

.compare-table3 th {
    width: 33%;
}

.compare-table4 th {
    width: 25%;
}

.code-spase {
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: monospace;
    padding: 10px 0 10px 10px;
    margin: 0 0 10px 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-button-container {
    position: relative;
    max-width: 500px;
    display: flex;

    padding: 8px 20px;
    margin: 0 auto;
}

.input-button-container input {
    flex: 1;

    padding: 10px;
    margin-right: 10px;
    max-width: 500px;
    font-size: 16px;
    border: 1px solid #ccc;
}

.input-button-container label {
    width: 150px;
    text-align: left;
    margin-top: 5px;
    margin-right: 20px;
    margin-left: 20px;
}

.typeSelect {
    font-size: 20px;
}

.details-content {
    width: 100%;
}

.form-group {
    position: relative;
    max-width: 500px;
    display: flex;
    padding: 8px 20px;
    margin: 0 auto;
}

.form-group label {
    width: 150px;
    text-align: left;
    margin-top: 5px;
    margin-right: 20px;
    margin-left: 20px;
}

.form-group input[type="number"],
.form-group input[type="color"],
.form-group select,
.form-group textarea {
    border: 1px solid #ccc;
}

.form-group input[type="number"] {
    padding: 5px 10px;
    width: 200px;
    font-size: 16px;
}

.form-group input[type="color"] {
    width: 100px;
    margin-top: 7px;
}

.form-group select {
    padding: 5px 10px;
    width: 220px;
    font-size: 16px;
}

.form-group textarea {
    padding: 5px 10px;
    width: 200px;
    font-size: 16px;
}

.form-group span {
    margin-left: 10px;
}

.form-group p {
    margin: 0px;
    text-align: left;
}

.form-group div {
    text-align: left;
}

.sub-details label {
    padding-right: 0;
    padding-left: 20px;
    margin-right: 0;
}

.details-area {
    background-color: rgba(188, 233, 188, 0.2);
}

.selectCheck {
    margin-top: 12px;
}

button {
    min-width: 160px;
    padding: 8px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.generate-button {
    margin-top: 5px;
    background: linear-gradient(135deg, #00b140, #ffd700);
    color: white;
    border: 2px solid white;
}

.generate-button:hover {
    /* background: linear-gradient(-45deg, #00b140, #ffd700); */
    background: white;
    color: #00b140;
    border: 2px solid #00b140;
}

.clear-button,
.reset-button,
.clear-details-button {
    background: white;
    color: #00b140;
    border: 2px solid #00b140;
}

.clear-button:hover,
.reset-button:hover,
.clear-details-button:hover {
    background: linear-gradient(135deg, #00b140, #ffd700);
    color: white;
    border: 2px solid white;
}

.qr-code {
    margin: 20px auto;
    display: block;
}

#errorMessage {
    color: red;
    margin: 0 auto 10px auto;
}

#detailErrorMessage {
    color: red;
    margin: 0 auto 10px auto;
}

#fixImageArea {
    display: none;
}

#qrCodeImage {
    margin-top: 20px;
    background: repeating-linear-gradient(45deg,
            #e9e9e9 0, #e9e9e9 15px,
            #f9f9f9 15px, #f9f9f9 30px);
}

#urlDisplay {
    overflow-wrap: break-word;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.popup img {
    height: 90%;
    width: 90%;
    object-fit: contain;
}

#qrContainer {
    position: relative;
    display: none;
    margin-top: 20px;
}

/* ポップアップのコンテンツ */
.popup-content {
    background: white;
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    padding: 15px 40px;
    border-radius: 8px;
    position: fixed;
    overflow: hidden;
    z-index: 11;
    top: 20px;
}

.popup-content h2 {
    margin: 5px auto;
}

/* スクロール可能にする */
.popup-scroll {
    max-height: 70vh;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* 閉じるボタン */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 100px;
    border: none;
    background: none;
    font-size: 30px;
    cursor: pointer;
}

/* 利用規約 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    border-radius: 8px;
}

.terms-text {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 14px;
}


/* タブ　*/
.tabs {
    display: flex;
    width: 100%;
}

.tab {
    flex: 1;
    padding: 5px;
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
    transition: background 0.3s;
}

.tab.active {
    background: #fff;
    border-bottom: 4px solid #4CAF50;
    font-weight: bold;
}

.form-container {
    padding: 0px;
    display: none;
}

.form-container.active {
    display: block;
}

.logo-container {
    padding: 0px;
    display: none;
}

.logo-container.active {
    display: block;
}

.hidden {
    display: none;
}

.content {
    display: none;
    padding: 10px;
    border: 1px solid #ccc;
}

.content.active {
    display: block;
}

/* フォント */
.f-m {
    font-family: "Meiryo", sans-serif;
}

.f-yg {
    font-family: "Yu Gothic", sans-serif;
}

.f-pg {
    font-family: "MS PGothic", sans-serif;
}

.f-pm {
    font-family: "MS PMincho", serif;
}

.f-hk {
    font-family: "Hiragino Kaku Gothic Pro", sans-serif;
}

.f-hm {
    font-family: "Hiragino Mincho Pro", serif;
}

/* ファイル名 */
#logoImage::file-selector-button {
    display: block;
}

/* グラデーションパターン */
.patternCanvas {
    position: relative;
    width: 30px;
    height: 30px;
    transform: scale(2, 2) translate(0, -8px);
    overflow: hidden;
    border: 1px solid #000;
    margin-left: 50px;
}

.pattern {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    transform-origin: center;
}

.half {
    position: absolute;
    width: 50%;
    height: 100%;
}

.half.left {
    left: 0;
}

.half.right {
    right: 0;
}

.square-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--gradEnd);
    display: flex;
    justify-content: center;
    align-items: center;
}

.square {
    width: 40%;
    height: 40%;
    background-color: var(--dotColor);
}

/* 画像トリミング */
#preview {
    max-width: 100%;
    max-height: 200px;
    /* 画像の最大高さを制限 */
    display: none;
    border: 1px solid #ccc;
    padding-bottom: 10px;
}

.preview-content {
    max-width: 300px;
    /* max-height: 300px; */
    padding-bottom: 10px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 要素を中央に配置 */
    justify-content: center;
    /* 縦方向の余白調整 */
}

#cropButton {
    display: none;
    margin-top: 10px;
    /* 余白を適切に */
}

#croppedCanvas {
    max-width: 100px;
    display: none;
    border: 1px solid #ccc;
    margin-top: 10px;
    /* 余白を適切に */
}

#qr-preview {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed #00b140;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

@media (max-width: 600px) {
    .content {
        max-width: none;
        width: 90%;
    }

    .input-button-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-button-container input {
        max-width: none;
        width: 95%;
        margin-left: 20px;
        margin-right: 0;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        margin-bottom: 5px;
        text-align: left;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        margin-left: 20px;
    }

    .sub-details input,
    .sub-details select,
    .sub-details textarea {
        margin-left: 40px;
    }

    #logoErrorLevelLavel p {
        padding: 10px;
        margin-left: 20px;
        border: 1px solid #ccc;
        width: 200px;
    }

    .patternCanvas {
        width: 60px;
        height: 60px;
        transform: scale(1, 1) translate(0, 0);
        margin: 20px 60px;
    }
}


/* ↓メニュー 消去候補*/
.nav-menu {
    display: none;
    position: fixed;
    top: 60px;
    right: 0;
    width: 240px;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    padding: 5px 20px;
}

.nav-menu.show {
    display: block;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0 0 10px 0;
    font-weight: bold;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding-left: 1em;
    font-weight: normal;
}

.nav-menu li.menu-section {
    font-weight: bold;
    color: #777;
    padding-left: 0;
    margin-top: 20px;
    margin-bottom: 5px;
}

.nav-menu li a:hover {
    background: #f0f0f0;
}

/* ↑メニュー */


/* ハンバーガーメニュー */
.menu-btn {
    position: absolute;
    top: 10px;
    left: 15px;
    cursor: pointer;
    z-index: 100;
}

.menu-btn div {
    width: 30px;
    height: 4px;
    background: white;
    margin: 6px 0;
}

.menu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: rgba(51, 51, 51, 0.9);
    color: white;
    padding-top: 60px;
    transition: left 0.3s;
    z-index: 99;
}

.menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
}

.menu a:hover {
    background: rgba(255, 215, 0, 0.7);
}

.menu.active {
    left: 0;
}

@media (min-width: 600px) {
    .menu {
        width: 250px;
        left: -250px;
    }

    .menu.active {
        left: 0;
    }
}

.menu a.sub {
    padding: 5px 0px 5px 40px;
}

.links {
    text-align: center;
    width: 600px;
}

.links a {
    display: block;
    color: #00b140;
    background-color: #f9f9f9;
    text-decoration: none;
    padding: 5px;
    margin: 20px auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.links a:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* 目次 */

.toc ul {
    list-style: none;
    padding-left: 10px;
}

.toc a {
    color: #1976D2;
    text-decoration: none;
}

/* グリッド */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.grid-item {
    text-align: center;
    background: #eee;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.grid-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.grid-item h3 {
    margin: 10px 0;
}

.grid-item p {
    margin: 10px 0;
    font-weight: bold;
    text-align: left;
}

.grid-item a {
    padding: 10px 20px;
    background: #00b140;
    color: #fff;
    border-radius: 5px;
    border: 2px solid #eee;
    text-decoration: none;
}

.grid-item a:hover {
    background: #fff;
    color: #00b140;
    border: 2px solid #00b140;
}

.cta {
    text-align: center;
    margin-top: 30px;
}