/* Homepage result surfaces only; existing handlers, limits and requests are unchanged. */
body.index-page #tab1 #reload {
    position: relative !important;
    inset: auto !important;
    float: right;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 2;
    width: 34px !important;
    height: 34px;
    margin-top: 10px;
    border: 1px solid #dae6df;
    border-radius: 10px !important;
    background: #edf4ef !important;
    color: #47796c !important;
    line-height: 1 !important;
}

body.index-page #tab1 .shortener-action-wrap { display: flex; flex-direction: column; align-items: flex-end; }
body.index-page #tab1 .shortener-input-wrap input[full_url] { border-color: #b5d5c6 !important; background: #f0f7f3; color: #1d695c; }
body.index-page #tab1 #upgradePackage {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between !important;
    align-items: center;
    margin-top: 20px !important;
    padding: 16px;
    border: 1px solid #dce7df;
    border-radius: 14px;
    background: #f5f8f5;
    clear: both;
}

body.index-page #tab1 #upgradePackage > .col-auto:first-child { flex: 1 1 230px; min-width: 0; }
body.index-page #tab1 #upgradePackage > .col-auto:first-child > .col-12 { gap: 8px; align-items: flex-start !important; margin-bottom: 5px; }
body.index-page #tab1 #upgradePackage small { font-size: 11px !important; line-height: 1.75; font-weight: 400 !important; overflow-wrap: anywhere; }
body.index-page #tab1 #upgradePackage span { flex: 0 0 20px; }
body.index-page #tab1 #upgradePackage span i { font-size: 18px !important; color: #559382 !important; }
body.index-page #tab1 #upgradePackage > .col-auto:nth-child(2) { display: none; }
body.index-page #tab1 #upgradePackage .upgrade-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    height: auto;
    padding: 10px 18px !important;
    border: 1px solid #cfe1d5;
    border-radius: 11px !important;
    color: #fff !important;
    background: linear-gradient(130deg,#329577,#1e745a) !important;
    font-size: 12px !important;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.7;
}

body.index-page #tab2 { padding-block: 12px !important; }
body.index-page #tab2 #qrDiv { padding-inline: 12px; margin-top: 8px; min-width: 0; }
body.index-page #tab2 #qrDiv > .card {
    border: 1px solid #dce7df;
    border-radius: 18px !important;
    background: #f2f7f3 !important;
    box-shadow: none;
}

body.index-page #tab2 #qrDiv > .card > .card-body { padding: 18px; }
body.index-page #tab2 #qrDiv .card-body > .row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 0; }
body.index-page #tab2 #qrDiv .card-body > .row > .col-4 { flex: 0 0 auto; width: auto; padding: 0; }
body.index-page #tab2 #qrDiv .card-body > .row > .col-6 { flex: 1 1 125px; width: auto; min-width: 0; padding: 0; }
body.index-page #tab2 #canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto !important;
    height: auto !important;
    min-width: 120px;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #dce5de;
    border-radius: 13px;
    background: #fff;
}

body.index-page #tab2 .color-picker-container { width: 100%; margin: 0 0 10px; }
body.index-page #tab2 .color-picker-container:last-child { margin-bottom: 0; }
body.index-page #tab2 .qr-color-input {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #dce6df;
    border-radius: 10px;
    background: #fff;
}

body.index-page #tab2 #colorCode,
body.index-page #tab2 #bgColorCode {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 0 !important;
    color: #47695b;
    font-family: 'Meiryo', 'メイリオ', sans-serif;
    font-size: 12px;
    line-height: 1.7;
    white-space: nowrap;
}

body.index-page #tab2 #color,
body.index-page #tab2 #bgColor {
    position: static;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 1px solid #d5ded7;
    border-radius: 6px;
    box-shadow: 0 0 0 2px #f2f6f3;
}

body.index-page #tab2 #qrDiv > .row { margin: 12px -6px 8px; --bs-gutter-x: 12px; }
body.index-page #tab2 #qrDiv > .row > .col-12 { margin-block: 8px !important; }
body.index-page #tab2 #qrDiv small { display: block; margin-bottom: 8px; color: #62776b; font-size: 11px; line-height: 1.7; }
body.index-page #tab2 #qrDiv .scroll-container { display: flex; align-items: center; gap: 8px; padding: 4px 2px 8px; scrollbar-width: thin; scrollbar-color: #b9cfc1 transparent; }
body.index-page #tab2 #qrDiv .scroll-item { flex: 0 0 auto; }
body.index-page #tab2 #qrDiv .pattern,
body.index-page #tab2 #qrDiv .corner,
body.index-page #tab2 #qrDiv .logo {
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    border: 1px solid #d7e3db !important;
    border-radius: 11px !important;
    background: #f8faf8;
    box-shadow: none;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

body.index-page #tab2 #qrDiv .pattern:hover,
body.index-page #tab2 #qrDiv .corner:hover,
body.index-page #tab2 #qrDiv .logo:hover { background: #edf5ef; border-color: #90baa5 !important; }
body.index-page #tab2 #qrDiv .border-primary { border: 2px solid #20766b !important; background: #e8f3eb; box-shadow: 0 0 0 2px #e0eee5 !important; }

body.index-page #tab2 #download,
body.index-page #tab3 .sm-compress-file button,
body.index-page #tab3 #download_all_btn {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    height: auto !important;
    padding: 12px 18px !important;
    border: 1px solid transparent;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #287e73, #186459);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.65;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 5px 12px -7px rgba(26,103,89,.4);
}

body.index-page #tab2 #download { width: 100%; margin-top: 4px; }
body.index-page #tab2 #download::before,
body.index-page #tab3 #download_all_btn::before { content: '\f30a'; font-family: 'bootstrap-icons'; font-size: 16px; font-weight: normal; }
body.index-page #tab3 .sm-compress-file button::before { content: '\f603'; font-family: 'bootstrap-icons'; font-size: 17px; font-weight: normal; }
body.index-page #tab2 #download:hover,
body.index-page #tab3 .sm-compress-file button:hover,
body.index-page #tab3 #download_all_btn:hover { filter: brightness(1.08); }
body.index-page #tab3 #download_all_btn:disabled { opacity: .5; cursor: wait; box-shadow: none; }

body.index-page #tab3 { padding-block: 12px !important; }
body.index-page #tab3 .sm-compress-file { flex-direction: column-reverse; align-items: center !important; gap: 16px; margin-bottom: 20px; }
body.index-page #tab3 .sm-compress-file h6 { color: #18332f !important; line-height: 1.75 !important; text-align: center; overflow-wrap: anywhere; }
body.index-page #tab3 .files-box {
    width: 100%;
    min-height: 160px;
    margin: 0 0 18px;
    padding: 0;
    gap: 12px;
    border: 0 !important;
    border-radius: 16px;
    scrollbar-width: thin;
}

body.index-page #tab3 .files-box.file-placeholder:not(:has(.file-item)) {
    min-height: 190px;
    padding: 24px 16px;
    flex-direction: column;
    gap: 12px;
    border: 1px dashed #b9d5c5 !important;
    background: #f4f8f5;
}

body.index-page #tab3 .files-box.file-placeholder:not(:has(.file-item))::before {
    content: '\f603';
    font-family: 'bootstrap-icons';
    font-size: 28px;
    color: #75a58f;
    line-height: 1;
}

body.index-page #tab3 .file-placeholder h3 { margin: 0; color: #82998b; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
body.index-page #tab3 .files-box.highlight { border-color: #20766b !important; background: #e7f2eb !important; }
body.index-page #tab3 .files-box .file-item {
    padding: 16px;
    min-width: 0;
    border: 1px solid #dce7df;
    border-radius: 14px;
    background: #f7faf7;
}

body.index-page #tab3 .file-item > .row { margin: 0; --bs-gutter-x: 0; row-gap: 12px; }
body.index-page #tab3 .file-item .col-8 { width: calc(100% - 94px); min-width: 0; align-items: flex-start !important; gap: 10px !important; }
body.index-page #tab3 .file-item .col-4 { width: 94px; padding-left: 8px; flex-direction: column; align-items: flex-end !important; gap: 8px !important; }
body.index-page #tab3 .file-item .flex-column { min-width: 0; width: 100%; }
body.index-page #tab3 .files-box .file-item img { width: 36px; height: 44px; border-radius: 8px; object-fit: cover; flex: 0 0 36px; }
body.index-page #tab3 .file-item .ellipsis { display: block; width: 100% !important; white-space: normal; overflow-wrap: anywhere; font-size: 12px; color: #294c3c; line-height: 1.6; }
body.index-page #tab3 .file-item p { display: flex; flex-wrap: wrap; gap: 3px 6px; font-size: 12px; line-height: 1.6; }
body.index-page #tab3 .file-item .loader-percentage { font-size: 17px; line-height: 1.5; color: #20766b !important; }
body.index-page #tab3 .file-item .download-file,
body.index-page #tab3 .file-item .remove-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid #d9e6dd;
    background: #fff;
    color: #54826d !important;
    font-size: 16px !important;
    line-height: 1;
}

body.index-page #tab3 .file-item .loading-bar { margin-top: 14px; height: 5px; border-radius: 8px; background: #e1ebe3; overflow: hidden; }
body.index-page #tab3 .file-item .loading-bar-loader { height: 5px; border-radius: 8px; background: #70b199; transition: width .3s ease; }
body.index-page #tab3 .files-box + .row { gap: 8px 16px; align-items: flex-start !important; margin-bottom: 14px !important; }
body.index-page #tab3 p.compress_note { flex: 1 1 160px; padding: 0; font-size: 11px !important; line-height: 1.8; color: #84988a; overflow-wrap: anywhere; }
body.index-page #tab3 label.compress_note { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; height: auto; padding: 6px 10px !important; border: 1px solid #f0dcd7; border-radius: 9px !important; background: #fcf4f1; color: #a26d61 !important; font-size: 11px !important; line-height: 1.8; cursor: pointer; white-space: normal; }
body.index-page #tab3 .action-buttons { padding: 0 !important; }

body.index-page #alert-modal .modal-dialog { max-width: 430px; padding: 12px; margin-inline: auto; }
body.index-page #alert-modal .modal-content { border: 1px solid #e1e9e3; border-radius: 24px !important; box-shadow: 0 24px 80px rgba(19,44,32,.18); overflow: hidden; }
body.index-page #alert-modal .modal-header { padding: 18px 18px 0; }
body.index-page #alert-modal .btn-close { padding: 8px !important; border-radius: 50%; background-color: #f1f5f2; opacity: .6; }
body.index-page #alert-modal .modal-body { padding: 8px 28px 32px !important; }
body.index-page #alert-modal .modal-body::before { content: '!'; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 auto 16px; border: 1px solid #f0dec7; border-radius: 16px; background: #faf3e8; color: #a38a56; font-size: 24px; font-weight: 700; }
body.index-page #alert-modal h3 { margin-bottom: 18px; color: #234738; font-size: 25px; line-height: 1.6; }
body.index-page #alert-modal .card { border: 1px solid #e1e8e2 !important; border-radius: 14px; background: #f6f9f6; margin: 0 0 20px !important; }
body.index-page #alert-modal .card-body { padding: 18px; }
body.index-page #alert-modal .card .row { margin: 0; }
body.index-page #alert-modal .card .col-12 { margin: 0 !important; padding: 0; }
body.index-page #alert-modal .msg { display: block; font-size: 13px; line-height: 1.9; color: #637b6c; overflow-wrap: anywhere; }
body.index-page #alert-modal .btn-new { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; width: 100%; min-height: 48px; height: auto; padding: 12px 18px; border: 1px solid transparent; border-radius: 13px !important; background: #20766b; color: #fff; font-size: 13px !important; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }

/* Decorative completion overlay; never intercept input or touch events. */
.home-compress-celebration { position: fixed; inset: 0; z-index: 99999; overflow: hidden; pointer-events: none; }
.home-compress-confetti { position: absolute; top: -24px; width: 8px; height: 14px; background: var(--confetti-color); border-radius: 2px; animation: home-compress-fall var(--confetti-duration) var(--confetti-delay) cubic-bezier(.15,.5,.35,1) both; }
@keyframes home-compress-fall {
    0% { opacity: 0; transform: translate3d(0,-30px,0) rotate(0); }
    8% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--confetti-drift),110vh,0) rotate(var(--confetti-spin)); }
}

@media (max-width: 600px) {
    body.index-page #tab1 #upgradePackage { gap: 12px; padding: 14px; }
    body.index-page #tab1 #upgradePackage > .col-auto:first-child { flex-basis: 100%; }
    body.index-page #tab2 #qrDiv > .card > .card-body { padding: 12px; }
    body.index-page #tab2 #qrDiv .card-body > .row { gap: 10px; }
    body.index-page #tab2 #qrDiv .card-body > .row > .col-6 { flex-basis: 110px; }
    body.index-page #tab2 #canvas { min-width: 110px; min-height: 110px; padding: 5px; }
    body.index-page #tab2 .qr-color-input { gap: 5px; padding: 6px; }
    body.index-page #tab2 #colorCode,
    body.index-page #tab2 #bgColorCode { font-size: 11px; }
    body.index-page #tab2 #color,
    body.index-page #tab2 #bgColor { flex-basis: 20px; width: 20px; height: 20px; }
    body.index-page #tab3 .files-box .file-item { padding: 12px; }
    body.index-page #tab3 .file-item .col-8 { width: calc(100% - 74px); gap: 8px !important; }
    body.index-page #tab3 .file-item .col-4 { width: 74px; }
    body.index-page #tab3 .file-item .download-file,
    body.index-page #tab3 .file-item .remove-file { width: 28px; height: 30px; }
    body.index-page #tab3 .file-item .loader-percentage { font-size: 15px; }
    body.index-page #tab3 .file-item .ellipsis { font-size: 11px; }
    body.index-page #alert-modal .modal-dialog { width: calc(100% - 16px); padding: 0; }
    body.index-page #alert-modal .modal-body { padding: 10px 20px 26px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .home-compress-confetti { animation: none; }
    body.index-page #tab3 .file-item .loading-bar-loader { transition: none; }
}

/* The upgrade label stays legible even if a shared button theme styles a child. */
body.index-page #tab1 #upgradePackage .upgrade-btn *{color:#fff!important}
