/* Homepage presentation only. Keep application behaviour in the existing code. */
body.index-page {
    --home-ink: #18332f;
    --home-muted: #657671;
    --home-accent: #20766b;
    --home-line: #dce5e1;
    --default-font: 'Meiryo', 'メイリオ', sans-serif;
    --heading-font: 'Meiryo', 'メイリオ', sans-serif;
    color: var(--home-ink);
    font-family: var(--default-font);
    background: radial-gradient(ellipse at 10% 10%, #ece5f3 0, transparent 48%),
        radial-gradient(ellipse at 95% 80%, #d8eee5 0, transparent 52%), #f6f8f4;
    background-attachment: fixed;
}

body.index-page #header {
    min-height: 76px;
    max-width: 1320px;
    width: 100%;
    margin-inline: auto;
    position: relative;
}

body.index-page #header > .position-absolute {
    top: 12px !important;
    gap: 12px;
}

body.index-page #header a.text-white {
    color: var(--home-ink) !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--home-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
}

body.index-page #header a .bi-person { margin: 0 !important; }
body.index-page #header img { border-radius: 4px; }

body.index-page #main {
    min-height: calc(100dvh - 76px);
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

body.index-page #wrapper.vh-12 {
    flex: 1 0 auto;
    width: 100%;
    padding: 48px 40px 72px !important;
    margin: 0 !important;
    justify-content: center;
    background: transparent;
}

body.index-page .mobile-heading {
    max-width: 1240px;
    width: 100%;
    margin: auto !important;
    align-items: center !important;
    row-gap: 40px;
    --bs-gutter-x: 48px;
}

body.index-page .heading-box {
    position: static !important;
    height: auto !important;
    text-align: left !important;
    min-width: 0;
}

body.index-page .heading-section {
    width: 100%;
    transform: none !important;
    padding: 0;
    max-width: 480px;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    color: var(--home-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    line-height: 1.7;
}

.home-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 12px;
}

body.index-page .heading-section h1 {
    color: var(--home-ink) !important;
    font-size: clamp(44px, 4.8vw, 68px);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.16;
    margin-bottom: 20px;
    overflow-wrap: anywhere;
}

.home-brand-name { display: block; color: var(--home-accent); }

body.index-page .heading-section .sub-heading {
    color: var(--home-ink) !important;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.7;
    letter-spacing: -.02em;
    padding: 0;
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

body.index-page .app-purpose {
    color: var(--home-muted);
    margin: 0;
    padding: 0;
    max-width: 370px;
    font-size: 14px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

body.index-page .app-purpose-cta { text-align: left; margin: 28px 0 0; }

body.index-page .app-purpose-cta .btn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
    height: auto;
    padding: 12px 20px !important;
    color: var(--home-ink) !important;
    border: 1px solid #cddbd5 !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.65) !important;
    box-shadow: none !important;
    font-size: 13px !important;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.index-page .app-purpose-cta .btn-btn::after { content: '↗'; font-size: 18px; }
body.index-page .app-purpose-cta .btn-btn:hover { background: #fff !important; border-color: var(--home-accent) !important; }

body.index-page .mobile-heading > .col-lg-7 { min-width: 0; }
body.index-page #tb-content { width: 100% !important; max-width: 100% !important; padding: 0; }

body.index-page #tb-content > .home_page.container {
    margin-top: 0 !important;
    padding: 10px !important;
    min-width: 0 !important;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 30px;
    background: rgba(255,255,255,.64);
    box-shadow: 0 24px 64px -24px rgba(34,64,52,.2), 0 2px 6px rgba(34,64,52,.03);
}

body.index-page #myTabs {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 5px;
    min-width: 0 !important;
    width: 100%;
    padding: 2px 0 10px;
    margin: 0;
    border: 0 !important;
    align-items: stretch;
}

body.index-page #myTabs > li:not(.d-none) {
    display: flex;
    min-width: 0;
    width: auto !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: transparent !important;
}

body.index-page #myTabs > li > span { display: none; }
body.index-page #myTabs #tab66-tab.active::after { content: none; }

body.index-page #myTabs .nav-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 76px;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 3px !important;
    border: 1px solid transparent !important;
    border-radius: 16px !important;
    color: #697a73 !important;
    background: transparent;
    line-height: 1.35;
    text-align: center;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

body.index-page #myTabs .nav-link:hover { color: var(--home-accent) !important; background: #eaf2ed; }
body.index-page #myTabs .nav-link.active {
    color: var(--home-accent) !important;
    background: #e2efe8;
    border-color: #cfe2d7 !important;
}

body.index-page #myTabs .nav-link i { font-size: 21px !important; line-height: 1; }
body.index-page #myTabs .nav-link img { width: 21px; height: 21px; margin: 0 !important; padding: 0 !important; }
.home-tab-label { font-size: 10px; font-weight: 700; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }

body.index-page #tb-content > .home_page > .tab-content {
    width: 100%;
    min-width: 0 !important;
    height: auto;
    margin: 0 !important;
    padding: 28px !important;
    border: 1px solid #e4ebe6 !important;
    border-radius: 22px !important;
    background: #fff !important;
}

body.index-page #tb-content .text-muted { color: var(--home-muted) !important; }
body.index-page #tb-content .tab-pane h6 { line-height: 1.8; overflow-wrap: anywhere; }
body.index-page #tb-content .tab-pane h6 b { font-size: 18px; color: var(--home-ink); font-weight: 700; }
body.index-page #tb-content .tab-pane label { line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }

body.index-page .home-shortener-pane {
    padding: 16px 0 22px !important;
}

body.index-page .home-shortener-pane > .text-center { text-align: left !important; margin: 0 0 22px !important; }
body.index-page .home-shortener-pane .shortener-form-row { align-items: stretch; gap: 10px; }
body.index-page .home-shortener-pane .shortener-input-wrap { flex: 1 1 0; min-width: 0; width: auto !important; }
body.index-page .home-shortener-pane .shortener-action-wrap { flex: 0 1 130px; min-width: 100px; }
body.index-page .home-shortener-pane .shortener-input-wrap,
body.index-page .home-shortener-pane .shortener-action-wrap { margin: 0 !important; }

body.index-page #tab2 > .row.align-items-center > dvi { display: flex; gap: 10px; align-items: stretch; }
body.index-page #tab2 > .row.align-items-center > dvi > div:first-child { flex: 1 1 0; min-width: 0; width: auto !important; margin-right: 0 !important; }
body.index-page #tab2 > .row.align-items-center > dvi > div:last-child { flex: 0 1 130px; min-width: 100px; }

body.index-page #tb-content .original_url {
    min-height: 52px;
    height: auto;
    padding: 13px 16px !important;
    border: 1px solid #d6e2db !important;
    border-radius: 14px !important;
    background: #f8faf8;
    font-size: 14px;
    color: var(--home-ink);
    line-height: 1.7;
}

body.index-page #tb-content .original_url::placeholder { color: #8c9c93; }
body.index-page #tb-content .original_url:focus { border-color: var(--home-accent) !important; box-shadow: 0 0 0 4px rgba(32,118,107,.1); background: #fff; }

body.index-page #wrapper button,
body.index-page #wrapper .btn,
body.index-page #wrapper .btn-btn {
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.6;
    text-align: center;
}

body.index-page #wrapper button:not(.dropdown-item),
body.index-page #wrapper .btn,
body.index-page #wrapper .btn-btn {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

body.index-page #tb-content .createShortLink {
    width: 100% !important;
    min-height: 52px;
    height: auto;
    padding: 12px 16px !important;
    border: 1px solid transparent;
    border-radius: 14px !important;
    color: #fff;
    background: linear-gradient(135deg, #287e73, #186459);
    box-shadow: 0 5px 12px -6px rgba(26,103,89,.6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
}

body.index-page #tb-content .createShortLink:hover { filter: brightness(1.08); }
body.index-page #tb-content .appointment-auth-button { padding: 12px 24px; min-height: 46px; border-radius: 14px; }

body.index-page .legal-links-footer,
body.index-page .legal-links-footer-fixed {
    position: static !important;
    margin: 0 !important;
    width: 100%;
    padding: 20px 24px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 24px;
    border-top: 1px solid rgba(97,126,107,.12);
    background: transparent !important;
}

body.index-page .legal-links-footer a { color: var(--home-muted) !important; margin: 0 !important; font-size: 11px; line-height: 1.7; }
body.index-page .legal-links-footer a:hover { color: var(--home-accent) !important; }
body.index-page a:focus-visible,
body.index-page button:focus-visible { outline: 3px solid #66a99a; outline-offset: 4px; }

@media (min-width: 992px) and (max-width: 1199.98px) {
    body.index-page #myTabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    body.index-page #wrapper.vh-12 { padding-inline: 28px !important; }
    body.index-page .mobile-heading { --bs-gutter-x: 32px; }
}

@media (max-width: 991.98px) {
    body.index-page #wrapper.vh-12 { padding: 36px 28px 48px !important; }
    body.index-page .mobile-heading { gap: 32px; }
    body.index-page .heading-section { max-width: 620px; margin-inline: auto; text-align: center; }
    body.index-page .heading-box { text-align: center !important; }
    body.index-page .heading-section h1 { font-size: clamp(42px, 7vw, 60px); }
    .home-brand-name { display: inline; }
    .home-brand { margin-bottom: 20px; }
    body.index-page .app-purpose { margin-inline: auto; max-width: 480px; }
    body.index-page .app-purpose-cta { text-align: center; margin-top: 20px; }
    body.index-page .mobile-heading > .col-lg-7 { max-width: 720px !important; margin-inline: auto; }
}

@media (max-width: 600px) {
    body.index-page #header { min-height: 64px; }
    body.index-page #header > .position-absolute { top: 4px !important; }
    body.index-page #main { min-height: calc(100dvh - 64px); }
    body.index-page #wrapper.vh-12 { padding: 20px 16px 36px !important; }
    body.index-page .mobile-heading { --bs-gutter-x: 0; gap: 28px; }
    .home-brand { font-size: 9px; gap: 9px; letter-spacing: .12em; margin-bottom: 16px; }
    .home-brand img { width: 30px; height: 30px; border-radius: 9px; }
    body.index-page .heading-section h1 { font-size: 42px; margin-bottom: 14px; }
    body.index-page .heading-section .sub-heading { font-size: 16px; }
    body.index-page .app-purpose { font-size: 12px; padding: 0 8px; }
    body.index-page .app-purpose-cta { margin-top: 16px; }
    body.index-page #tb-content > .home_page.container { border-radius: 24px; padding: 8px !important; }
    body.index-page #myTabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding-bottom: 8px; }
    body.index-page #myTabs .nav-link { min-height: 65px; padding: 10px 4px !important; gap: 7px; border-radius: 13px !important; }
    body.index-page #myTabs .nav-link i { font-size: 19px !important; }
    .home-tab-label { font-size: 10px; }
    body.index-page #tb-content > .home_page > .tab-content { padding: 20px 16px !important; border-radius: 18px !important; }
    body.index-page #tb-content .tab-pane h6 b { font-size: 16px; }
    body.index-page .home-shortener-pane { padding: 8px 0 12px !important; }
    body.index-page .home-shortener-pane .shortener-form-row { flex-direction: column; gap: 12px; }
    body.index-page .home-shortener-pane .shortener-action-wrap { flex-basis: auto; width: 100%; }
    body.index-page #tab2 > .row.align-items-center > dvi { flex-direction: column; gap: 12px; padding-inline: 12px; }
    body.index-page #tab2 > .row.align-items-center > dvi > div { flex-basis: auto !important; margin: 0 !important; width: 100%; }
    body.index-page #tb-content .original_url { font-size: 16px; }
    body.index-page #tb-content .createShortLink { font-size: 13px; min-height: 48px; }
    body.index-page #upgradePackage { flex-wrap: wrap; gap: 12px; }
    body.index-page .legal-links-footer { gap: 10px 18px; padding-inline: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
    body.index-page #createShortLink,
    body.index-page #createQrCode { animation: none; }
}
