.survey-doc-modal {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100vw - 40px));
    height: min(900px, calc(100vh - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    border-radius: 30px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 252, 247, 0.99) 0%, rgba(249, 241, 231, 0.98) 100%);
    border: 1px solid rgba(255, 233, 199, 0.6);
    box-shadow:
        0 34px 80px rgba(49, 22, 10, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    outline: none;
    transition: width 0.26s ease, height 0.26s ease;
}

.survey-doc-header {
    position: relative;
    flex: 0 0 auto;
    padding: 20px 88px 18px 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 227, 168, 0.22) 0%, rgba(255, 227, 168, 0) 24%),
        linear-gradient(135deg, #8b250f 0%, #bc661f 100%);
    color: #fff8f0;
}

.survey-doc-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 232, 205, 0.24);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.survey-doc-header h2 {
    margin: 12px 0 8px;
    max-width: 100%;
    font-size: clamp(24px, 2.9vw, 34px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #fffaf5;
}

.survey-doc-header p {
    margin: 0;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.58;
    color: rgba(255, 244, 228, 0.92);
}

.survey-doc-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 249, 240, 0.96);
    color: #8d280f;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(60, 24, 10, 0.18);
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.survey-doc-close:hover,
.survey-doc-close:focus {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(60, 24, 10, 0.22);
    outline: none;
}

.survey-doc-close svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
}

.survey-doc-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 18px 18px;
    overflow: hidden;
}

.survey-doc-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 12px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(243, 199, 86, 0.12) 0%, rgba(243, 199, 86, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 244, 236, 0.98) 100%);
    border: 1px solid rgba(181, 124, 27, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.survey-doc-image,
.survey-doc-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    border: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(62, 34, 20, 0.08);
}

.survey-doc-image {
    display: block;
    object-fit: contain;
}

.survey-doc-modal.is-portrait {
    width: min(780px, calc(100vw - 40px));
}

.survey-doc-modal.is-portrait .survey-doc-header {
    padding: 18px 84px 16px 28px;
}

.survey-doc-modal.is-portrait .survey-doc-header h2 {
    margin: 10px 0 6px;
    font-size: clamp(22px, 2.45vw, 30px);
    line-height: 1.14;
}

.survey-doc-modal.is-portrait .survey-doc-header p {
    max-width: 54ch;
    font-size: 13.5px;
    line-height: 1.5;
}

.survey-doc-modal.is-portrait .survey-doc-body {
    padding-top: 12px;
}

.survey-doc-modal.is-portrait .survey-doc-content {
    padding: 10px;
}

.survey-doc-modal.is-landscape {
    width: min(1120px, calc(100vw - 40px));
}


.survey-doc-open { overflow: hidden; }
.survey-doc-modal { position: fixed; inset: 0; margin: auto; padding: 0; color: #282828; box-sizing: border-box; }
.survey-doc-modal:not([open]) { display: none; }
.survey-doc-modal::backdrop { background: rgba(22,16,11,.58); backdrop-filter: blur(6px); }
.survey-doc-close { z-index: 2; padding: 0; }
.survey-doc-close:focus-visible { outline: 3px solid #f3c756; outline-offset: 3px; }
.survey-doc-content { overflow: auto; }
.survey-doc-footer { flex: 0 0 auto; padding: 10px 24px 16px; font-size: 13px; line-height: 1.6; }
.survey-doc-footer a { color: #81301c; text-decoration: underline; }
.ikm-footer.survey-doc-actions, .ipak-footer.survey-doc-actions { display: flex; flex-direction: column; gap: 10px; }
.survey-doc-actions a { white-space: normal; text-align: center; }
@media (max-width: 575px) {
    .survey-doc-modal { width: calc(100vw - 20px); max-width: calc(100vw - 20px); height: calc(100vh - 24px); max-height: calc(100vh - 24px); border-radius: 22px; }
    .survey-doc-header, .survey-doc-modal.is-portrait .survey-doc-header { padding: 16px 68px 14px 18px; }
    .survey-doc-header h2, .survey-doc-modal.is-portrait .survey-doc-header h2 { font-size: 22px; }
    .survey-doc-header p { font-size: 12px; }
    .survey-doc-eyebrow { font-size: 10px; padding: 0 10px; min-height: 28px; }
    .survey-doc-close { top: 16px; right: 14px; width: 42px; height: 42px; }
    .survey-doc-body { padding: 10px; }
    .survey-doc-content { padding: 6px; border-radius: 16px; }
    .survey-doc-footer { padding: 4px 16px 12px; }
}
