.flatte-size-guide-trigger-wrap .flatte-size-guide-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.flatte-size-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(24, 28, 27, .48);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.flatte-size-guide-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999999;
    width: min(620px, 100%);
    height: 100dvh;
    background: #fff;
    box-shadow: -18px 0 50px rgba(28, 43, 39, .18);
    transform: translateX(102%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.flatte-size-guide-is-open { overflow: hidden; }
.flatte-size-guide-is-open .flatte-size-guide-overlay { opacity: 1; visibility: visible; }
.flatte-size-guide-is-open .flatte-size-guide-drawer { transform: translateX(0); }

.flatte-size-guide-drawer__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 24px 28px;
    border-bottom: 1px solid #e7ecea;
}
.flatte-size-guide-drawer__eyebrow { margin: 0 0 3px; color: #637c75; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.flatte-size-guide-drawer__header h2 { margin: 0; font-size: clamp(26px, 4vw, 36px); line-height: 1.1; }
.flatte-size-guide-drawer__close { border: 0; background: #f2f5f4; width: 42px; height: 42px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.flatte-size-guide-drawer__body { padding: 24px 28px 36px; overflow-y: auto; }

.flatte-size-guide-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f2f5f4; border-radius: 12px; margin-bottom: 26px; }
.flatte-size-guide-tab { border: 0; background: transparent; border-radius: 9px; padding: 9px 10px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; }
.flatte-size-guide-tab.is-active { background: #fff; box-shadow: 0 2px 10px rgba(45, 69, 62, .1); color: #637c75; }
.flatte-size-guide-tab__badge { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 999px; background: #637c75; color: #fff; font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.flatte-size-guide-tab:not(.is-active) .flatte-size-guide-tab__badge { background: #dce5e2; color: #506861; }
.flatte-size-guide-panel:not(.is-active) { display: none; }
.flatte-size-guide-intro h3 { margin: 0 0 10px; font-size: 22px; }
.flatte-size-guide-intro p, .flatte-size-guide-intro li { font-size: 15px; line-height: 1.55; }
.flatte-size-guide-intro ol { padding-left: 20px; }

.flatte-size-guide-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 16px; }
.flatte-size-guide-form label { display: grid; gap: 7px; font-weight: 700; }
.flatte-size-guide-input-wrap { display: flex; align-items: center; border: 1px solid #cbd6d2; border-radius: 10px; overflow: hidden; background: #fff; }
.flatte-size-guide-input-wrap input { width: 100%; border: 0 !important; box-shadow: none !important; padding: 13px 12px !important; }
.flatte-size-guide-input-wrap > span { padding-right: 12px; color: #6c7773; font-weight: 400; }
.flatte-size-guide-form select { width: 100%; min-height: 48px; border: 1px solid #cbd6d2; border-radius: 10px; background: #fff; padding: 0 12px; }
.flatte-size-guide-submit { grid-column: 1 / -1; border: 0; border-radius: 10px; min-height: 50px; padding: 12px 20px; background: #637c75; color: #fff; font-weight: 800; cursor: pointer; }
.flatte-size-guide-submit:hover { background: #506861; }

.flatte-size-guide-result { margin: 14px 0 20px; }
.flatte-size-guide-result:empty { display: none; }
.flatte-size-guide-result__card { border-radius: 14px; padding: 18px; }
.flatte-size-guide-result__card span { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.flatte-size-guide-result__card strong { display: block; font-size: 27px; line-height: 1.15; }
.flatte-size-guide-result__card p { margin: 9px 0 0; line-height: 1.5; }
.flatte-size-guide-result__card--success { background: #edf4f1; border: 1px solid #cbded7; }
.flatte-size-guide-result__card--success strong { color: #506861; }
.flatte-size-guide-result__card--advice { background: #fff6ee; border: 1px solid #f0d2b7; }
.flatte-size-guide-result__card--advice strong { font-size: 20px; }
.flatte-size-guide-result__card--advice a { display: inline-block; margin-top: 12px; font-weight: 800; text-decoration: underline; }

.flatte-size-guide-details { margin-top: 18px; border-top: 1px solid #e4e9e7; border-bottom: 1px solid #e4e9e7; }
.flatte-size-guide-details summary { padding: 16px 0; font-weight: 800; cursor: pointer; }
.flatte-size-guide-details--measure-visual { margin-bottom: 18px; }
.flatte-size-guide-details--measure-visual .flatte-size-guide-measure-visual { margin: 0; padding: 0 0 16px; background: #f7f6f2; }
.flatte-size-guide-details--measure-visual .flatte-size-guide-measure-visual img { border-radius: 12px; }
.flatte-size-guide-table-wrap { overflow-x: auto; padding-bottom: 16px; }
.flatte-size-guide-table-wrap table { width: 100%; border-collapse: collapse; min-width: 470px; font-size: 14px; }
.flatte-size-guide-table-wrap th, .flatte-size-guide-table-wrap td { border: 1px solid #d8dfdc; padding: 10px; text-align: center; white-space: nowrap; }
.flatte-size-guide-table-wrap thead th { background: #637c75; color: #fff; }
.flatte-size-guide-table-wrap tbody th { background: #f5f7f6; }
.flatte-size-guide-table--matrix { min-width: 650px !important; }

.flatte-size-guide-measure-visual { margin: 0; background: #f7f6f2; }
.flatte-size-guide-measure-visual img { display: block; width: 100%; height: auto; }
.flatte-size-guide-help { display: grid; gap: 4px; margin-top: 24px; padding: 18px; border-radius: 14px; background: #f5f7f6; }
.flatte-size-guide-help a { width: fit-content; color: #506861; font-weight: 800; text-decoration: underline; }

@media (max-width: 640px) {
    .flatte-size-guide-drawer { top: auto; bottom: 0; width: 100%; height: min(92dvh, 860px); border-radius: 20px 20px 0 0; transform: translateY(102%); }
    .flatte-size-guide-is-open .flatte-size-guide-drawer { transform: translateY(0); }
    .flatte-size-guide-drawer__header { padding: 20px; }
    .flatte-size-guide-drawer__body { padding: 20px 20px 30px; }
    .flatte-size-guide-form { grid-template-columns: 1fr; }
    .flatte-size-guide-submit { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .flatte-size-guide-overlay, .flatte-size-guide-drawer { transition: none; }
}
