:root {
    --bg: #eef4ff;
    --bg-deep: #d9e7ff;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: #ffffff;
    --line: rgba(36, 85, 180, 0.14);
    --line-strong: rgba(36, 85, 180, 0.24);
    --text: #163050;
    --muted: #5d7699;
    --brand: #1163ff;
    --brand-strong: #0d4dd9;
    --brand-soft: #e9f1ff;
    --danger: #d63d57;
    --danger-soft: #ffe9ee;
    --success: #13885c;
    --success-soft: #e9fff4;
    --warning: #d97706;
    --warning-soft: #fff3dc;
    --shadow: 0 28px 70px rgba(17, 68, 160, 0.14);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(17, 99, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.12), transparent 26%),
        linear-gradient(180deg, #f7fbff 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

a {
    color: var(--brand-strong);
}

img {
    max-width: 100%;
}

.app-shell {
    width: min(1880px, calc(100vw - 24px));
    max-width: none;
    margin: 0 auto;
    padding: 20px 12px 28px;
}

.surface,
.hero,
.panel,
.modal-card,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
    padding: 24px 26px;
    margin-bottom: 20px;
    position: relative;
    z-index: 30;
    isolation: isolate;
    overflow: visible;
}

.hero-brand {
    display: flex;
    gap: 18px;
    align-items: center;
}

.brand-mark,
.brand-logo {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(17, 99, 255, 0.14), rgba(8, 145, 178, 0.12));
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.brand-mark span {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-strong);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1,
.page-header h1,
.login-card h1 {
    margin: 10px 0 6px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.04;
}

.hero p,
.page-header p,
.muted,
.hint {
    color: var(--muted);
}

.hero-subtitle {
    margin: 0;
    max-width: 72ch;
}

.top-actions,
.nav-pills,
.button-row,
.row-actions,
.toolbar,
.stats-grid,
.footer-row,
.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.nav-pills {
    margin-top: 16px;
}

.top-actions {
    position: relative;
    z-index: 120;
    overflow: visible;
}

.lang-switch {
    justify-content: flex-end;
}

.nav-pill,
.btn,
button,
.icon-btn {
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
}

.nav-pill,
.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    box-shadow: 0 14px 30px rgba(17, 99, 255, 0.2);
}

.nav-pill.secondary,
.btn.secondary,
button.secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn.ghost,
.nav-pill.ghost {
    background: rgba(255, 255, 255, 0.62);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-color: rgba(17, 99, 255, 0.16);
}

.btn.danger,
button.danger {
    background: var(--danger);
    box-shadow: 0 14px 28px rgba(214, 61, 87, 0.18);
}

.icon-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    display: inline-grid;
    place-items: center;
    color: var(--text);
    box-shadow: none;
}

.icon-btn svg,
.btn svg,
.nav-pill svg {
    width: 18px;
    height: 18px;
}

.icon-btn.is-favorite {
    background: rgba(255, 214, 102, 0.28);
    border-color: rgba(217, 119, 6, 0.25);
    color: #b45309;
}

.icon-btn.static-indicator {
    cursor: default;
    pointer-events: none;
}

.icon-btn.static-indicator span {
    font-size: 18px;
    line-height: 1;
}

.icon-btn.note-btn {
    background: var(--brand-soft);
    border-color: rgba(17, 99, 255, 0.14);
    color: var(--brand-strong);
}

.notification-trigger {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d63d57;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(214, 61, 87, 0.28);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(17, 99, 255, 0.12), rgba(8, 145, 178, 0.12));
    display: grid;
    place-items: center;
    color: var(--brand-strong);
    font-weight: 700;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel,
.surface {
    padding: 24px;
    margin-bottom: 18px;
}

.stats-grid {
    align-items: stretch;
}

.stat-card {
    flex: 1 1 180px;
    min-width: 180px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(240,247,255,0.92));
    border: 1px solid var(--line);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.section-title {
    margin: 8px 0 0;
    font-size: 24px;
    line-height: 1.15;
}

.flash {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.flash.success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(19, 136, 92, 0.14);
}

.flash.error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(214, 61, 87, 0.16);
}

.filters,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

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

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

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(17, 99, 255, 0.18);
    border-color: rgba(17, 99, 255, 0.36);
}

.field-builder {
    display: grid;
    gap: 14px;
}

.field-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.6fr) minmax(130px, 1fr) minmax(160px, 1.2fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.roles-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1.7fr) repeat(3, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.roles-grid > div {
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.88);
}

.field-style-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.field-style-head,
.field-style-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
}

.field-style-head {
    padding: 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-style-row {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.field-style-label {
    min-width: 0;
}

.field-style-label strong,
.field-style-label span {
    display: block;
}

.field-style-label strong {
    font-size: 15px;
}

.field-style-label span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.field-style-control {
    min-width: 0;
}

.field-style-control label {
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.field-style-color-control input[type="color"] {
    width: 100%;
    min-height: 46px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.95);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.entry-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,247,255,0.9));
    box-shadow: 0 18px 46px rgba(17, 68, 160, 0.12);
}

.gallery.compact-search-gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: center;
    align-items: start;
}

.gallery.compact-search-gallery .entry-card {
    width: 100%;
}

.entry-media {
    position: relative;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    background: linear-gradient(135deg, rgba(17, 99, 255, 0.24), rgba(8, 145, 178, 0.2));
    display: grid;
    place-items: center;
    color: #fff;
    padding: 12px;
    overflow: hidden;
}

.entry-media-badges {
    position: absolute;
    top: 3px;
    right: 3px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 3;
}

.winner-badge {
    position: relative;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(10, 25, 55, 0.18);
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.56);
}

.winner-state-won {
    background: rgba(34, 197, 94, 0.92);
    color: #fff;
}

.winner-state-lost {
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
}

.winner-state-blocked {
    background: rgba(185, 28, 28, 0.95);
    color: #fff;
}

.winner-state-neutral {
    background: rgba(148, 163, 184, 0.92);
    color: #fff;
}

.entry-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

.entry-body {
    padding: 18px;
}

.entry-title {
    margin: 0 0 8px;
    font-size: 24px;
}

.entry-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.entry-id {
    margin-bottom: 6px;
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}

.tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 500;
}

.tag-company {
    font-size: 11px;
    font-weight: 500;
}

.inline-icon-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    font-size: 1.25em;
    line-height: 1;
}

.birthday-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 999px;
    color: #d97706;
    background: rgba(255, 247, 237, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 6px 14px rgba(10, 25, 55, 0.12);
}

.birthday-marker svg {
    width: 11px;
    height: 11px;
}

.name-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-list {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(36, 85, 180, 0.08);
}

.detail-row span:first-child {
    color: var(--muted);
}

.detail-row span:last-child {
    min-width: 0;
    text-align: right;
    word-break: break-word;
}

.field-emphasis {
    display: inline;
}

.field-style-none {
    font-weight: inherit;
    font-style: normal;
    text-decoration: none;
}

.field-style-bold {
    font-weight: 800;
}

.field-style-italic {
    font-style: italic;
}

.field-style-underline {
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.field-style-color {
    font-weight: inherit;
}

.field-size-sm {
    font-size: 0.9em;
}

.field-size-md {
    font-size: 1em;
}

.field-size-lg {
    font-size: 1.08em;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.72);
    width: 100%;
}

table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(36, 85, 180, 0.1);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: rgba(17, 99, 255, 0.04);
}

tr:hover td {
    background: rgba(17, 99, 255, 0.03);
}

.cell-stack {
    display: grid;
    gap: 4px;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.08);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}

.submission-badge {
    gap: 5px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
}

.submission-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.submission-badge-icon svg {
    width: 11px;
    height: 11px;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 25, 55, 0.5);
    z-index: 1000;
}

.modal.is-open {
    display: flex;
}

.modal-card {
    width: min(980px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 26px;
}

.note-content {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    line-height: 1.7;
    white-space: normal;
}

.panel-subsection {
    margin-bottom: 18px;
}

.quick-action-card {
    padding: 18px;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-summary-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.admin-summary-card strong {
    font-size: 18px;
    line-height: 1.2;
}

.admin-accordion {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    padding: 0 18px 18px;
    margin-bottom: 16px;
}

.admin-accordion[open] {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.admin-accordion summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 4px;
    font-size: 16px;
    font-weight: 700;
}

.admin-summary-note {
    margin-left: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.admin-accordion summary::-webkit-details-marker {
    display: none;
}

.admin-checkbox-grid {
    display: grid;
    gap: 10px;
}

.admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.admin-filter-actions {
    align-self: end;
}

.mini-list {
    display: grid;
    gap: 10px;
}

.mini-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.mini-list-row strong,
.mini-list-row span {
    display: block;
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.detail-photo-frame {
    width: 100%;
    min-height: 320px;
    border-radius: 24px;
    border: 1px solid rgba(36, 85, 180, 0.14);
    background: linear-gradient(135deg, rgba(17, 99, 255, 0.12), rgba(8, 145, 178, 0.08));
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 14px;
}

.detail-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
    object-position: center;
}

.detail-photo-fallback {
    width: 100%;
    min-height: 290px;
    border-radius: 20px;
}

.detail-entry-id {
    margin-bottom: 10px;
}

.form-photo-frame {
    max-width: 340px;
    min-height: 240px;
}

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

.history-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
}

.footer {
    margin-top: 26px;
    padding: 18px 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.footer .footer-row {
    justify-content: space-between;
    align-items: flex-end;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.footer a {
    color: inherit;
}

.online-popover {
    position: relative;
}

.notification-popover {
    position: relative;
    z-index: 200;
}

.notification-popover[open] {
    z-index: 10000;
}

.online-popover summary {
    list-style: none;
}

.notification-popover summary {
    list-style: none;
}

.online-popover summary::-webkit-details-marker {
    display: none;
}

.notification-popover summary::-webkit-details-marker {
    display: none;
}

.online-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.online-popover-card {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(380px, 90vw);
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(11, 42, 102, 0.18);
    z-index: 40;
}

.notification-popover-card {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(430px, 92vw);
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(11, 42, 102, 0.18);
    z-index: 9999;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: 30px;
}

.login-card .brand-logo,
.login-card .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
}

.login-card .brand-logo img {
    padding: 8px;
}

.login-actions {
    justify-content: flex-start;
}

.login-submit {
    min-width: 118px;
    padding: 8px 14px;
    box-shadow: none;
}

.compact-submit {
    min-width: 136px;
    padding: 9px 15px;
    background: var(--brand);
    box-shadow: none;
}

.center {
    text-align: center;
}

@media (max-width: 980px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-brand,
    .top-actions {
        width: 100%;
    }

    .top-actions {
        justify-content: space-between;
    }

    .modal-grid,
    .field-row {
        grid-template-columns: 1fr;
    }

    .field-style-head {
        display: none;
    }

    .field-style-row {
        grid-template-columns: 1fr 1fr;
    }

    .field-style-label {
        grid-column: 1 / -1;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .gallery.compact-search-gallery {
        grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    }

    .page-toolbar {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .app-shell {
        width: calc(100vw - 12px);
        padding: 10px 6px 18px;
    }

    .hero,
    .panel,
    .surface,
    .login-card,
    .modal-card {
        padding: 18px;
        border-radius: 24px;
    }

    .login-card .brand-logo,
    .login-card .brand-mark {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .login-submit {
        min-width: 112px;
        padding: 8px 13px;
    }

    .compact-submit {
        min-width: 126px;
        padding: 9px 14px;
    }

    .hero-brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-toolbar,
    .mini-list-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .field-style-row {
        grid-template-columns: 1fr;
    }

    .top-actions,
    .toolbar,
    .button-row,
    .segmented,
    .nav-pills {
        width: 100%;
    }

    .top-actions {
        gap: 10px;
    }

    .top-actions > * {
        max-width: 100%;
    }

    .lang-switch {
        justify-content: flex-start;
    }

    .segmented .btn,
    .button-row .btn,
    .button-row button,
    .nav-pills .nav-pill {
        flex: 1 1 auto;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .entry-media {
        height: 190px;
        min-height: 190px;
        padding: 10px;
    }

    .winner-badge {
        width: 38px;
        height: 38px;
        top: 10px;
        right: 10px;
        font-size: 20px;
    }

    .entry-media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .detail-photo-frame {
        min-height: 240px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .detail-row span:last-child {
        text-align: left;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td,
    .table-wrap th {
        display: block;
        width: 100%;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tr {
        border-bottom: 1px solid var(--line);
        padding: 10px 0;
    }

    .table-wrap td {
        white-space: normal;
        padding: 10px 14px;
        border-bottom: 0;
    }

    .table-wrap td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
}

@media (min-width: 1600px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }

    .gallery.compact-search-gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
    }
}
