:root {
    --bg: #f5f7f6;
    --surface: #ffffff;
    --surface-soft: #eef3f1;
    --ink: #1e2523;
    --muted: #63706c;
    --line: #d9e1de;
    --accent: #087f68;
    --accent-strong: #066450;
    --amber: #d88618;
    --danger: #ba3f36;
    --heart: #c73866;
    --shadow: 0 18px 50px rgba(30, 37, 35, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #10231f;
    color: #fbfbf8;
    padding: 0;
    transition: background 0.16s ease, transform 0.16s ease;
}

.brand-mark:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.brand-mark:focus-visible {
    outline: 3px solid rgba(8, 127, 104, 0.22);
    outline-offset: 2px;
}

.brand-mark svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    stroke: none;
    shape-rendering: crispEdges;
}

.brand-mark svg * {
    stroke: none;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.topbar-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
}

.topbar-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 750;
}

.topbar-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.favorite-nav-button.has-favorites,
.favorite-nav-button.is-active {
    border-color: #f1b8c9;
    background: #fff3f7;
    color: var(--heart);
}

.favorite-nav-button.has-favorites svg,
.favorite-nav-button.is-active svg {
    fill: currentColor;
}

.favorite-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-soft);
    color: inherit;
    padding: 0 6px;
    font-size: 12px;
    line-height: 1;
}

.settings-button.is-busy {
    color: #7a4b0c;
    border-color: #efd099;
    background: #fff7e8;
}

.settings-button.is-error {
    color: var(--danger);
    border-color: #efc2bd;
    background: #fff0ee;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.search-panel,
.favorites-panel,
.detail-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-panel,
.favorites-panel {
    padding: 16px;
}

.detail-panel {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.detail-panel::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.photo-menu-button {
    display: inline-flex;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #7b8581;
    padding: 0;
}

.photo-menu-button:hover {
    background: #e3ebe8;
    color: var(--accent);
}

.photo-menu-button svg {
    width: 24px;
    height: 24px;
}

.search-box {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 0 6px 0 14px;
}

.search-box:focus-within {
    border-color: rgba(8, 127, 104, 0.26);
    box-shadow: 0 0 0 3px rgba(8, 127, 104, 0.13);
}

.photo-search {
    display: grid;
    gap: 10px;
    padding: 0;
}

.photo-search:has(.photo-preview:not(.hidden)) {
    padding: 12px 0 2px;
}

.photo-preview {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    padding: 8px;
}

.photo-preview img {
    width: 58px;
    height: 58px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    object-fit: cover;
}

.photo-preview strong,
.photo-preview span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-preview strong {
    color: var(--ink);
    font-size: 14px;
}

.photo-preview span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.photo-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 28;
    display: grid;
    min-width: 210px;
    transform: translate(-50%, -50%);
    place-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 54px rgba(16, 35, 31, 0.18);
    padding: 22px 26px;
    color: var(--ink);
    pointer-events: none;
}

.photo-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #dbe7e3;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.photo-loading strong {
    font-size: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.search-box svg,
button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-box input {
    width: 100%;
    min-width: 0;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

select,
.print-controls input {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 0 10px;
}

.primary-button,
.print-button,
.ghost-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    white-space: nowrap;
}

.primary-button,
.print-button {
    min-height: 46px;
    background: var(--accent);
    color: #ffffff;
    padding: 0 16px;
    font-weight: 700;
}

.primary-button:hover,
.print-button:hover {
    background: var(--accent-strong);
}

.ghost-button {
    min-height: 36px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    padding: 0 10px;
    font-size: 13px;
}

.icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.icon-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.favorite-toggle {
    color: var(--muted);
}

.favorite-toggle:hover {
    border-color: #f1b8c9;
    color: var(--heart);
}

.favorite-toggle.is-favorite {
    border-color: #f1b8c9;
    background: #fff3f7;
    color: var(--heart);
}

.favorite-toggle.is-favorite svg {
    fill: currentColor;
}

.danger-button {
    color: var(--danger);
}

.danger-button:hover {
    border-color: #efc2bd;
    background: #fff0ee;
    color: var(--danger);
}

.result-meta {
    min-height: 34px;
    padding: 14px 2px 8px;
    color: var(--muted);
    font-size: 14px;
}

.results {
    display: grid;
    gap: 10px;
}

.result-item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.result-item:hover {
    border-color: rgba(8, 127, 104, 0.45);
    background: #f7fbf9;
}

.result-item:focus-visible {
    outline: 3px solid rgba(8, 127, 104, 0.18);
    outline-offset: 2px;
}

.result-item.is-active {
    border-color: var(--accent);
    background: #f1faf7;
    box-shadow: 0 0 0 1px rgba(8, 127, 104, 0.12);
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-main {
    min-width: 0;
}

.result-thumb,
.favorite-thumb,
.detail-photo {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.result-thumb,
.favorite-thumb {
    width: 70px;
    height: 70px;
}

.result-thumb img,
.favorite-thumb img,
.detail-photo img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.result-thumb.has-image img,
.favorite-thumb.has-image img,
.detail-photo.has-image img {
    display: block;
}

.result-thumb.has-image .photo-placeholder,
.favorite-thumb.has-image .photo-placeholder,
.detail-photo.has-image .photo-placeholder {
    display: none;
}

.photo-placeholder {
    display: grid;
    place-items: center;
    color: #87938f;
}

.photo-placeholder svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.result-name {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.3;
}

.result-subline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 3px 8px;
}

.tag.warn {
    background: #fff2db;
    color: #7a4b0c;
}

.tag.danger {
    background: #fff0ee;
    color: var(--danger);
}

.load-more {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 750;
}

.load-more:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.load-more:disabled {
    cursor: wait;
    opacity: 0.7;
}

.empty-state {
    display: grid;
    min-height: 420px;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.empty-state h2 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
}

.empty-state.compact {
    min-height: 180px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fbfcfb;
}

.empty-state.compact p {
    margin: 0;
}

.empty-barcode {
    width: 180px;
    height: 90px;
    border-radius: 8px;
    background:
        repeating-linear-gradient(90deg, #1e2523 0 3px, transparent 3px 7px, #1e2523 7px 9px, transparent 9px 15px),
        #ffffff;
    border: 1px solid var(--line);
}

.detail-content {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.detail-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-head h2 {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 1.25;
}

.detail-photo {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 220px;
}

.detail-photo .photo-placeholder svg {
    width: 46px;
    height: 46px;
}

body.hide-photos .result-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

body.hide-photos .favorite-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

body.hide-photos .result-thumb,
body.hide-photos .favorite-thumb,
body.hide-photos .detail-photo {
    display: none;
}

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

.code-box {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    padding: 10px;
}

.code-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.code-box strong {
    overflow-wrap: anywhere;
    font-size: 15px;
}

.barcode-preview {
    display: grid;
    min-height: 116px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.barcode-preview svg {
    max-width: 100%;
}

.print-controls {
    display: grid;
    grid-template-columns: 1fr 88px auto;
    gap: 10px;
    align-items: end;
}

.print-controls label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.toggle-line {
    grid-template-columns: auto auto;
    align-items: center;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 10px;
}

.toggle-line input {
    width: 16px;
    height: 16px;
}

.print-button {
    width: 100%;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.panel-head h2 {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 1.25;
}

.panel-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.favorites-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px 0;
}

.select-all-line {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 0 10px;
    font-size: 13px;
    font-weight: 750;
}

.select-all-line input,
.favorite-check {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

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

.favorite-item {
    display: grid;
    grid-template-columns: auto 70px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.favorite-item:hover {
    border-color: rgba(8, 127, 104, 0.45);
    background: #f7fbf9;
}

.favorite-item:focus-visible {
    outline: 3px solid rgba(8, 127, 104, 0.18);
    outline-offset: 2px;
}

.favorite-item.is-active {
    border-color: var(--accent);
    background: #f1faf7;
    box-shadow: 0 0 0 1px rgba(8, 127, 104, 0.12);
}

.favorite-main {
    min-width: 0;
}

.facts {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
    gap: 8px 12px;
    margin: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.facts dt {
    color: var(--muted);
    font-size: 13px;
}

.facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 650;
}

.attributes {
    display: grid;
    gap: 8px;
}

.attribute-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.55fr) minmax(0, 1fr);
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
    font-size: 13px;
}

.attribute-row span {
    color: var(--muted);
}

.attribute-row strong {
    overflow-wrap: anywhere;
}

body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(16, 35, 31, 0.42);
}

.settings-modal {
    width: min(720px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(16, 35, 31, 0.22);
    padding: 18px;
}

.settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.settings-head h2 {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 1.25;
}

.settings-grid {
    display: grid;
    gap: 10px;
    padding-top: 14px;
}

.setting-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) minmax(126px, auto);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    padding: 12px;
}

.setting-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: #e8f4f0;
    color: var(--accent);
}

.setting-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.setting-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.setting-copy strong {
    font-size: 15px;
    line-height: 1.2;
}

.setting-copy small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.setting-row select {
    width: 100%;
    min-width: 126px;
}

.print-choice-modal {
    width: min(620px, 100%);
}

.print-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 14px;
}

.print-choice-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 128px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    padding: 14px;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.print-choice-card:hover {
    border-color: rgba(8, 127, 104, 0.48);
    background: #f4faf7;
    box-shadow: 0 10px 28px rgba(16, 35, 31, 0.08);
    transform: translateY(-1px);
}

.print-choice-card:focus-visible {
    outline: 3px solid rgba(8, 127, 104, 0.2);
    outline-offset: 2px;
}

.print-choice-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 8px;
    background: #e8f4f0;
    color: var(--accent);
}

.print-choice-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.print-choice-card strong,
.print-choice-card small {
    display: block;
}

.print-choice-card strong {
    font-size: 16px;
    line-height: 1.2;
}

.print-choice-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.switch-input {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 50px;
    height: 28px;
    border: 1px solid #cad5d1;
    border-radius: 999px;
    background: #dfe7e4;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.switch-input::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(30, 37, 35, 0.2);
    content: "";
    transition: transform 0.16s ease;
}

.switch-input:checked {
    border-color: var(--accent);
    background: var(--accent);
}

.switch-input:checked::before {
    transform: translateX(22px);
}

.switch-input:focus-visible {
    outline: 3px solid rgba(8, 127, 104, 0.18);
    outline-offset: 2px;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    border-radius: 8px;
    background: #10231f;
    color: #ffffff;
    padding: 12px 14px;
    box-shadow: var(--shadow);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 980px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        position: static;
        max-height: none;
        overflow: visible;
        scrollbar-width: auto;
    }
}

@media (max-width: 680px) {
    .app-shell {
        padding: 12px;
    }

    .result-item,
    .favorite-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    body.hide-photos .result-item,
    body.hide-photos .favorite-item {
        grid-template-columns: 1fr;
    }

    .result-thumb,
    .favorite-thumb {
        width: 100%;
        height: 120px;
    }

    .topbar {
        align-items: center;
        gap: 10px;
        padding-bottom: 12px;
    }

    .brand {
        flex: 1 1 auto;
    }

    .brand-mark {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .brand h1 {
        font-size: 18px;
    }

    .brand p {
        font-size: 12px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-button {
        width: 46px;
        height: 46px;
        padding: 0;
    }

    .topbar-button span {
        display: none;
    }

    .favorite-count {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
        background: #ffffff;
        box-shadow: 0 0 0 1px var(--line);
    }

    .row-actions,
    .favorites-toolbar,
    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .row-actions .ghost-button,
    .favorite-item .ghost-button,
    .favorites-toolbar .ghost-button,
    .panel-head .ghost-button {
        width: 100%;
    }

    .search-form,
    .print-controls,
    .code-grid {
        grid-template-columns: 1fr;
    }

    .photo-preview {
        grid-template-columns: 52px minmax(0, 1fr) auto;
    }

    .photo-preview img {
        width: 52px;
        height: 52px;
    }

    .primary-button {
        width: 100%;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .settings-modal {
        max-height: calc(100vh - 24px);
        padding: 14px;
    }

    .settings-head h2 {
        font-size: 18px;
    }

    .print-choice-grid {
        grid-template-columns: 1fr;
    }

    .print-choice-card {
        min-height: 104px;
    }

    .setting-row {
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
    }

    .setting-icon {
        width: 38px;
        height: 38px;
        grid-row: 1 / span 2;
    }

    .setting-row select,
    .setting-row .switch-input {
        grid-column: 2;
        justify-self: start;
    }

    .setting-row select {
        width: min(100%, 180px);
    }
}
