:root {
    color-scheme: light;
    --ink: #1f2f3d;
    --title: #164b63;
    --primary: #35addf;
    --primary-dark: #209bd0;
    --label: #2e6f8c;
    --muted: #557584;
    --line: rgba(177, 221, 241, 0.88);
    --card: rgba(255, 255, 255, 0.86);
    --danger: #c24141;
    --success: #168454;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 280px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 30%),
        linear-gradient(135deg, #eaf8ff 0%, #d8f1ff 45%, #f7fcff 100%);
    font-family: Arial, "Noto Sans KR", sans-serif;
    line-height: 1.5;
}

@supports (min-height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}

body::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
    background: url("../assets/logo.png") center center / min(70vw, 520px) auto no-repeat;
    opacity: 0.12;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: rgba(53, 173, 223, 0.16);
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: wait;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
}

@supports (min-height: 100dvh) {
    .page-wrap {
        min-height: 100dvh;
    }
}

.header {
    width: 100%;
    border-bottom: 1px solid rgba(180, 220, 240, 0.6);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    width: 100%;
    max-width: 1180px;
    min-height: 72px;
    margin: 0 auto;
    padding: 18px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #22627f;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(118, 205, 255, 0.8));
}

.header-actions,
.button-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.form-container,
.admin-container {
    width: calc(100% - 28px);
    margin: 0 auto;
    padding-top: 28px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: calc(54px + env(safe-area-inset-bottom));
}

.form-container {
    max-width: 760px;
}

.event-selector {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow:
        0 10px 26px rgba(80, 170, 210, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.event-selector-heading {
    margin-bottom: 17px;
}

.event-selector-title {
    margin: 0;
    color: var(--title);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.event-selector-description {
    margin: 6px 0 0;
    color: #5c7d8c;
    font-size: 14px;
}

.event-selector-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.event-select-button {
    display: flex;
    min-height: 78px;
    padding: 14px 16px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(165, 218, 242, 0.9);
    border-radius: 10px;
    color: var(--title);
    background: rgba(255, 255, 255, 0.84);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.event-select-button strong {
    color: var(--label);
    font-size: 13px;
}

.event-select-button:hover {
    transform: translateY(-1px);
    border-color: rgba(53, 173, 223, 0.8);
    box-shadow: 0 6px 16px rgba(53, 173, 223, 0.16);
}

.event-select-button:focus-visible {
    outline: 3px solid rgba(53, 173, 223, 0.3);
    outline-offset: 3px;
}

.event-select-button.is-active {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, #6fd4ff, #35addf);
    box-shadow: 0 6px 16px rgba(53, 173, 223, 0.28);
}

.event-select-button.is-active strong {
    color: #ffffff;
}

.event-select-button.is-closed {
    color: #667985;
    background: rgba(239, 246, 249, 0.9);
}

.event-select-button.is-closed strong {
    color: #b13f3f;
}

.application-anchor {
    position: relative;
    top: -12px;
    scroll-margin-top: 18px;
}

.admin-container {
    max-width: 1120px;
}

.form-card,
.admin-panel,
.response-card,
.login-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow:
        0 10px 26px rgba(80, 170, 210, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.form-card {
    margin-bottom: 18px;
    padding: 26px 28px;
}

.form-intro {
    overflow: hidden;
    padding-top: 34px;
}

.accent-bar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 8px;
    background: linear-gradient(90deg, #7ed6ff, #35addf);
}

.form-title {
    margin: 0;
    color: var(--title);
    font-size: clamp(25px, 4vw, 32px);
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.form-description {
    margin: 12px 0 0;
    color: #5c7d8c;
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.required-note {
    margin: 22px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.capacity-box {
    margin-top: 22px;
    padding: 14px 15px;
    border: 1px solid rgba(165, 218, 242, 0.88);
    border-radius: 11px;
    background: rgba(238, 250, 255, 0.78);
}

.capacity-meta {
    display: flex;
    margin-bottom: 9px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--label);
    font-size: 14px;
}

.capacity-meta strong {
    color: var(--title);
    font-size: 16px;
    white-space: nowrap;
}

.capacity-progress {
    display: block;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #d5edf7;
    color: var(--primary);
    -webkit-appearance: none;
    appearance: none;
}

.capacity-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #d5edf7;
}

.capacity-progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, #7ed6ff, #35addf);
}

.capacity-progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #7ed6ff, #35addf);
}

.capacity-box.is-full {
    border-color: rgba(232, 87, 87, 0.42);
    background: rgba(255, 239, 239, 0.84);
}

.capacity-box.is-full .capacity-progress::-webkit-progress-value {
    background: linear-gradient(90deg, #ff9292, #e85757);
}

.capacity-box.is-full .capacity-progress::-moz-progress-bar {
    background: linear-gradient(90deg, #ff9292, #e85757);
}

.question-card.has-error {
    border-color: rgba(224, 83, 83, 0.8);
    box-shadow: 0 0 0 2px rgba(224, 83, 83, 0.1), 0 10px 26px rgba(80, 170, 210, 0.14);
}

.question-heading {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}

.question-number,
.question-label {
    color: var(--title);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.55;
}

.question-label {
    overflow-wrap: anywhere;
}

.required-mark {
    margin-left: 3px;
    color: var(--danger);
}

.question-description {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid rgba(150, 205, 232, 0.95);
    border-radius: 9px;
    outline: 0;
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    font-size: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    scroll-margin-block: 110px;
}

.form-control::placeholder {
    color: #6c8794;
    opacity: 1;
}

.form-control:focus {
    border-color: #4bbde9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(95, 208, 255, 0.22);
}

.form-control[aria-invalid="true"] {
    border-color: rgba(224, 83, 83, 0.9);
}

.form-textarea {
    min-height: 126px;
    resize: vertical;
}

.form-select {
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, #47788e 50%),
        linear-gradient(135deg, #47788e 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    -webkit-appearance: none;
    appearance: none;
}

.choice-fieldset {
    display: grid;
    min-width: 0;
    margin: 4px 0 0;
    padding: 0;
    border: 0;
    gap: 6px;
}

.choice-row {
    display: flex;
    min-height: 46px;
    padding: 8px 10px;
    align-items: center;
    gap: 11px;
    border-radius: 9px;
    color: #25485a;
    cursor: pointer;
    touch-action: manipulation;
}

.choice-row:hover {
    background: rgba(223, 246, 255, 0.7);
}

.choice-row input {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin: 0;
    accent-color: var(--primary);
}

.choice-row span {
    overflow-wrap: anywhere;
}

.field-error {
    margin: 9px 0 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
}

.submit-row {
    display: flex;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    min-height: 46px;
    padding: 11px 18px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    touch-action: manipulation;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.logo:focus-visible,
.event-select-button:focus-visible {
    outline: 3px solid rgba(53, 173, 223, 0.32);
    outline-offset: 3px;
}

.btn-primary {
    min-width: 118px;
    color: #fff;
    background: linear-gradient(135deg, #6fd4ff, #35addf);
    box-shadow: 0 6px 16px rgba(53, 173, 223, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4bc3f4, #209bd0);
}

.btn-secondary {
    color: var(--label);
    border: 1px solid rgba(165, 218, 242, 0.9);
    background: rgba(255, 255, 255, 0.84);
}

.btn-secondary:hover {
    background: #e8f8ff;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff8585, #df5050);
}

.btn-small {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
}

.btn[disabled] {
    transform: none;
    opacity: 0.64;
    box-shadow: none;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
}

.alert-error {
    border-color: #fecaca;
    color: #991b1b;
    background: #fee2e2;
}

.alert-success {
    border-color: #bbf7d0;
    color: #166534;
    background: #dcfce7;
}

.alert-info {
    border-color: #bfdbfe;
    color: #1e4f7c;
    background: #e5f4ff;
}

.success-card,
.closed-card {
    margin-top: 38px;
    padding: 48px 30px;
    text-align: center;
}

.success-card .btn {
    margin-top: 26px;
}

.success-icon,
.closed-icon {
    display: inline-flex;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 800;
}

.contact-link {
    display: inline-flex;
    min-height: 46px;
    margin-top: 20px;
    padding: 10px 16px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(165, 218, 242, 0.95);
    border-radius: 10px;
    color: var(--label);
    background: #fff;
    font-size: 18px;
    font-weight: 800;
}

.success-icon {
    color: var(--success);
    background: #dcfce7;
}

.closed-icon {
    color: #64748b;
    background: #edf4f7;
}

.footer {
    margin-top: auto;
    padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
    color: rgba(46, 111, 140, 0.72);
    font-size: 12px;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 관리자 로그인 */
.login-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px 14px calc(24px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 410px;
    padding: 32px;
}

.login-brand {
    display: flex;
    margin-bottom: 22px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #22627f;
    font-size: 20px;
    font-weight: 800;
}

.login-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.login-title {
    margin: 0;
    color: var(--title);
    font-size: 25px;
    text-align: center;
}

.login-description {
    margin: 9px 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.form-group {
    margin-bottom: 17px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--label);
    font-size: 14px;
    font-weight: 700;
}

.login-card .btn-primary {
    width: 100%;
}

/* 관리자 편집 화면 */
.admin-heading {
    display: flex;
    margin-bottom: 22px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.admin-title {
    margin: 0;
    color: var(--title);
    font-size: 28px;
    line-height: 1.3;
}

.admin-description {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-menu-card {
    display: flex;
    min-height: 180px;
    padding: 28px;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 26px rgba(80, 170, 210, 0.14);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-menu-card:hover {
    border-color: rgba(53, 173, 223, 0.8);
    box-shadow: 0 14px 30px rgba(45, 151, 197, 0.2);
    transform: translateY(-2px);
}

.admin-menu-card:focus-visible {
    outline: 3px solid rgba(53, 173, 223, 0.3);
    outline-offset: 3px;
}

.admin-menu-title {
    color: var(--title);
    font-size: 22px;
}

.admin-menu-description {
    color: var(--muted);
    font-size: 14px;
}

.action-password-dialog {
    width: min(430px, calc(100% - 32px));
    max-width: none;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 16px;
    color: var(--ink);
    background: transparent;
    box-shadow: 0 22px 60px rgba(20, 75, 100, 0.3);
}

.action-password-dialog:not([open]) {
    display: none;
}

.action-password-dialog::backdrop {
    background: rgba(22, 57, 73, 0.45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.action-password-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fdff;
}

.action-password-title {
    margin: 0;
    color: var(--title);
    font-size: 22px;
}

.action-password-description {
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.action-password-dialog .form-control {
    font-size: 16px;
}

.action-password-actions {
    justify-content: flex-end;
}

.admin-panel {
    margin-bottom: 22px;
    padding: 24px;
}

.panel-heading {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-title {
    margin: 0;
    color: var(--title);
    font-size: 20px;
}

.panel-description,
.help-text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.panel-description {
    width: 100%;
    margin: -6px 0 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.settings-grid .full-width {
    grid-column: 1 / -1;
}

.switch-row {
    display: flex;
    min-height: 48px;
    padding: 10px 12px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(150, 205, 232, 0.75);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--label);
    font-weight: 700;
    cursor: pointer;
}

.switch-row input {
    width: 21px;
    height: 21px;
    margin: 0;
    accent-color: var(--primary);
}

.question-editor-list {
    display: grid;
    gap: 14px;
}

.question-editor {
    padding: 18px;
    border: 1px solid rgba(177, 221, 241, 0.88);
    border-radius: 13px;
    background: rgba(248, 253, 255, 0.82);
}

.question-editor-head {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.editor-number {
    color: var(--title);
    font-size: 15px;
    font-weight: 800;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(165, 218, 242, 0.9);
    border-radius: 9px;
    color: var(--label);
    background: #fff;
    font-size: 18px;
    line-height: 1;
    touch-action: manipulation;
}

.icon-btn:hover {
    background: #e8f8ff;
}

.icon-btn.remove {
    color: var(--danger);
}

.icon-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 14px;
}

.editor-grid .full-width {
    grid-column: 1 / -1;
}

.editor-grid .form-group {
    margin: 0;
}

.options-group[hidden],
.placeholder-group[hidden] {
    display: none;
}

.required-toggle {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    color: var(--label);
    cursor: pointer;
}

.required-toggle input {
    width: 21px;
    height: 21px;
    margin: 0;
    accent-color: var(--primary);
}

.editor-footer {
    display: flex;
    margin-top: 18px;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.save-bar {
    position: sticky;
    z-index: 5;
    bottom: 10px;
    display: flex;
    margin-top: 20px;
    padding: 12px;
    justify-content: flex-end;
    border: 1px solid rgba(177, 221, 241, 0.92);
    border-radius: 13px;
    background: rgba(246, 252, 255, 0.92);
    box-shadow: 0 10px 24px rgba(65, 145, 185, 0.18);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.response-summary {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.response-count {
    color: var(--primary-dark);
    font-size: 28px;
    font-weight: 800;
}

.admin-capacity {
    margin: 0 0 18px;
}

.response-list {
    display: grid;
    gap: 12px;
}

.response-card {
    padding: 18px;
}

.response-meta {
    display: flex;
    margin-bottom: 13px;
    padding-bottom: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(177, 221, 241, 0.72);
    color: var(--muted);
    font-size: 12px;
}

.response-meta-main {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
}

.response-sequence {
    color: var(--primary-dark);
    font-size: 15px;
}

.response-id {
    color: #718b97;
    overflow-wrap: anywhere;
}

.response-badge {
    display: inline-flex;
    padding: 3px 7px;
    align-items: center;
    border-radius: 999px;
    color: #316b82;
    background: #dff6ff;
    font-size: 11px;
    font-weight: 800;
}

.response-badge.warning {
    color: #9a4e16;
    background: #fff1d6;
}

.response-answers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    gap: 14px 20px;
}

.response-answer {
    min-width: 0;
}

.response-answer dt {
    margin-bottom: 3px;
    color: var(--label);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.response-answer dd {
    margin: 0;
    color: #243f4d;
    font-size: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 34px 16px;
    border: 1px dashed rgba(177, 221, 241, 0.9);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

.ip-notice {
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(165, 218, 242, 0.85);
    border-radius: 10px;
    color: #376a80;
    background: rgba(235, 249, 255, 0.82);
    font-size: 13px;
    line-height: 1.55;
}

@media (max-width: 768px) {
    body::before {
        background-size: min(78vw, 380px) auto;
        opacity: 0.11;
    }

    .header-inner {
        min-height: 72px;
        padding: 14px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-img {
        width: 56px;
        height: 56px;
    }

    .header-actions {
        gap: 7px;
    }

    .header-actions .btn {
        min-height: 42px;
        padding: 8px 11px;
        font-size: 13px;
    }

    .form-container,
    .admin-container {
        width: calc(100% - 24px);
        padding-top: 18px;
    }

    .form-card,
    .event-selector,
    .admin-panel,
    .response-card {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .form-card {
        padding: 22px 18px;
    }

    .form-intro {
        padding-top: 30px;
    }

    .form-control,
    .admin-container input,
    .admin-container select,
    .admin-container textarea,
    .login-card input {
        font-size: 16px;
    }

    .admin-heading {
        flex-direction: column;
    }

    .admin-menu-grid {
        grid-template-columns: 1fr;
    }

    .admin-panel {
        padding: 18px;
    }

    .settings-grid,
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid .full-width,
    .editor-grid .full-width {
        grid-column: auto;
    }

    .response-answers {
        grid-template-columns: 1fr;
    }

    .save-bar {
        position: static;
        bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 520px) {
    body::before {
        background-size: min(86vw, 320px) auto;
        opacity: 0.1;
    }

    .header-inner {
        padding: 12px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .logo-img {
        width: 52px;
        height: 52px;
    }

    .header-actions {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .form-container,
    .admin-container {
        width: calc(100% - 20px);
    }

    .form-card {
        margin-bottom: 14px;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .event-selector {
        margin-bottom: 14px;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .event-selector-buttons {
        grid-template-columns: 1fr;
    }

    .question-label,
    .question-number {
        font-size: 16px;
    }

    .submit-row .btn,
    .success-card .btn {
        width: 100%;
    }

    .success-card,
    .closed-card {
        padding-top: 38px;
        padding-bottom: 38px;
    }

    .login-card {
        padding: 26px 18px;
    }

    .admin-title {
        font-size: 24px;
    }

    .admin-panel {
        padding: 16px 12px;
    }

    .action-password-card {
        padding: 22px 18px;
    }

    .action-password-actions .btn {
        flex: 1;
    }

    .question-editor {
        padding: 14px 11px;
    }

    .question-editor-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .editor-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .icon-btn {
        width: 44px;
        height: 44px;
    }

    .editor-footer,
    .editor-footer .btn,
    .save-bar .btn {
        width: 100%;
    }

    .response-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .response-meta form,
    .response-meta form .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
