:root {
  color-scheme: dark;
  --navy: #111f42;
  --charcoal: #202329;
  --ink: #14161b;
  --panel: #1a1c22;
  --panel-2: #242730;
  --magenta: #d1145c;
  --magenta-hi: #ef2f78;
  --gold: #d4a72f;
  --gold-hi: #f0cf63;
  --cream: #f0ede3;
  --muted: #9ca1ad;
  --line: rgba(255,255,255,.09);
  --shadow: 0 22px 60px rgba(0,0,0,.38);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--charcoal); color: var(--cream); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
body.modal-open { overflow: hidden; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 20px; background: radial-gradient(circle at 50% 35%, #273154, var(--ink) 56%); }
.boot-screen img { width: 190px; max-height: 90px; object-fit: contain; }
.boot-screen p { color: var(--muted); }
.boot-loader { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--magenta-hi); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; inset: 0 auto 0 0; height: 100vh; padding: 24px 16px 18px; display: flex; flex-direction: column; background: linear-gradient(180deg, #101521, #121318 45%, #171318); border-right: 1px solid var(--line); z-index: 20; }
.brand-lockup { display: flex; align-items: center; gap: 12px; margin: 0 8px 34px; }
.brand-lockup img { width: 120px; height: 55px; object-fit: contain; object-position: left center; }
.brand-lockup span { color: var(--gold-hi); font-weight: 900; font-size: 11px; letter-spacing: .2em; }
.sidebar nav { display: grid; gap: 5px; }
.nav-label { margin: 18px 12px 6px; color: #666d7b; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.nav-item { border: 0; width: 100%; min-height: 44px; padding: 0 12px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; border-radius: 10px; background: transparent; color: #adb2bd; text-align: left; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(209,20,92,.28), rgba(209,20,92,.08)); box-shadow: inset 3px 0 var(--magenta-hi); }
.nav-item b { color: #707785; font-size: 12px; }
.nav-icon { text-align: center; color: var(--gold-hi); font-size: 18px; }
.sidebar-bottom { margin-top: auto; }
.sidebar-bottom p { margin: 10px 12px 0; font-size: 10px; line-height: 1.45; color: #606672; }

.main { min-width: 0; }
.topbar { min-height: 106px; padding: 22px clamp(20px, 3vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 24px; position: sticky; top: 0; background: rgba(25,28,34,.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); z-index: 12; }
.title-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.title-wrap h1 { margin: 0; font-size: clamp(23px, 2.5vw, 32px); letter-spacing: -.04em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.title-wrap p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.clear-brand { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; background: rgba(255,255,255,.04); color: var(--muted); white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search { width: min(240px, 22vw); height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; background: #13151a; border: 1px solid var(--line); color: #6c7280; }
.search input { width: 100%; border: 0; outline: 0; background: none; color: white; }
.top-actions select { height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #16181d; color: #d8d9dd; padding: 0 10px; }
.primary, .secondary, .icon-button { min-height: 42px; border-radius: 10px; border: 1px solid transparent; padding: 0 16px; font-weight: 750; transition: .18s ease; }
.primary { background: linear-gradient(135deg, var(--magenta-hi), #b6094c); color: white; box-shadow: 0 8px 24px rgba(209,20,92,.25); }
.primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.secondary, .icon-button { background: #20232a; border-color: var(--line); color: #d7d9df; }
.secondary:hover, .icon-button:hover { background: #2a2e37; }
.icon-button { width: 42px; padding: 0; font-size: 18px; }
.icon-button.selected { color: var(--gold-hi); border-color: rgba(212,167,47,.4); }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 25px; }

.content { padding: clamp(20px, 3vw, 42px); }
.figure-grid { display: grid; gap: 24px; align-items: start; }
.figure-grid.size-small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.figure-grid.size-medium { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.figure-grid.size-large { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.figure-card { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(155deg, #22252c, #17191e); overflow: hidden; box-shadow: 0 8px 26px rgba(0,0,0,.28); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; cursor: pointer; }
.figure-card:hover { transform: translateY(-4px); border-color: rgba(212,167,47,.35); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
/* The border belongs to the media frame itself, so it surrounds the entire cover on all four sides. */
.cover-frame { position: relative; aspect-ratio: 4/5; margin: 10px 10px 0; border: 3px solid var(--gold); border-radius: 11px; overflow: hidden; background: #0f1115; box-shadow: inset 0 0 0 1px rgba(255,241,160,.34), 0 0 18px rgba(212,167,47,.12); }
.cover-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.13), transparent 23%, transparent 75%, rgba(212,167,47,.12)); }
.cover-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover-placeholder { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 7px; color: #5c6370; background: radial-gradient(circle, #252a33, #101216 70%); }
.cover-placeholder span { font-size: 45px; color: #747c8b; }
.cover-placeholder small { letter-spacing: .14em; }
.photo-count, .favorite-badge { position: absolute; z-index: 2; top: 8px; border-radius: 999px; background: rgba(0,0,0,.7); backdrop-filter: blur(7px); }
.photo-count { right: 8px; padding: 5px 8px; font-size: 10px; }
.favorite-badge { left: 8px; width: 29px; height: 29px; display: grid; place-items: center; color: var(--gold-hi); }
.card-body { padding: 13px 14px 15px; }
.card-body h3 { margin: 0 0 7px; min-height: 1.25em; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 16px; }
.card-body p { margin: 8px 0 12px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body footer { display: flex; justify-content: space-between; align-items: center; color: #858b97; font-size: 11px; }
.card-body footer b { color: var(--magenta-hi); font-weight: 750; }
.stars { display: flex; gap: 1px; }
.star { width: 19px; height: 20px; padding: 0; border: 0; background: none; color: #555a64; font-size: 17px; line-height: 1; }
.star.filled { color: #ffd34e; text-shadow: 0 0 8px rgba(255,211,78,.2); }
.stars.interactive .star { width: 34px; height: 36px; font-size: 29px; transition: transform .15s ease; }
.stars.interactive .star:hover { transform: scale(1.18); }

.cabinet { max-width: 1500px; margin: 0 auto; border: 15px solid transparent; border-image: linear-gradient(90deg, #332316, #8c6332, #c28c43, #432c19) 1; background: linear-gradient(90deg, rgba(0,0,0,.32), transparent 8%, transparent 92%, rgba(0,0,0,.35)), #201b18; box-shadow: var(--shadow), inset 0 0 70px rgba(0,0,0,.65); }
.cabinet-head { min-height: 55px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(#281b11, #4a311d); color: #d5b67d; font-size: 11px; letter-spacing: .15em; }
.cabinet-head b { color: #937a52; }
.shelf-row { position: relative; display: grid; gap: 24px; align-items: end; padding: 26px 28px 42px; min-height: 360px; background: linear-gradient(100deg, rgba(0,0,0,.35), transparent 20%, transparent 78%, rgba(0,0,0,.38)); }
.shelf-row.size-small { grid-template-columns: repeat(6, minmax(0,1fr)); }
.shelf-row.size-medium { grid-template-columns: repeat(4, minmax(0,1fr)); }
.shelf-row.size-large { grid-template-columns: repeat(3, minmax(0,1fr)); }
.shelf-row::after { content: ""; position: absolute; height: 28px; inset: auto -5px 0; background: linear-gradient(#a9793b, #5b3d1f 55%, #21150d); box-shadow: 0 12px 18px rgba(0,0,0,.65), inset 0 2px #dab066; }
.shelf-row .figure-card { z-index: 1; }

.empty-state { min-height: 62vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-icon { width: 90px; height: 90px; display: grid; place-items: center; border-radius: 28px; background: #282b33; color: var(--gold); font-size: 42px; }
.empty-state h2 { margin: 22px 0 5px; }
.empty-state p, .inline-empty { color: var(--muted); }
.empty-state .primary { margin-top: 18px; }
.inline-empty { padding: 34px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }

.statistics, .temperature { max-width: 1400px; margin: 0 auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #24272f, #1b1d23); }
.metric > span, .eyebrow { color: var(--magenta-hi); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.metric strong { display: block; margin: 9px 0 5px; font-size: clamp(23px, 2.5vw, 34px); letter-spacing: -.04em; }
.metric small { color: var(--muted); }
.metric.positive strong { color: #65dba1; }
.metric.negative strong { color: #ff6b7b; }
.section-heading { margin: 34px 0 16px; display: flex; justify-content: space-between; align-items: end; }
.section-heading h2, .section-heading h3 { margin: 0; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.section-heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(209,20,92,.15); color: var(--magenta-hi); font-weight: 800; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
.brand-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 48px 1fr auto; grid-template-rows: auto auto auto; gap: 2px 13px; background: #1b1e24; text-align: left; }
.brand-card:hover { border-color: rgba(212,167,47,.4); background: #22252c; }
.brand-logo { grid-row: 1/3; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #33436a, #171e31); color: var(--gold-hi); font-weight: 900; }
.brand-name { font-weight: 750; align-self: end; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.brand-card > strong { grid-column: 3; grid-row: 1; font-size: 22px; }
.brand-card > small { color: var(--muted); }
.brand-money { grid-column: 1/4; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #858b96; font-size: 11px; }

.temperature-card { min-height: 450px; padding: clamp(28px, 5vw, 65px); display: grid; grid-template-columns: 1fr 100px 330px; align-items: center; gap: 50px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 74% 45%, #363141, transparent 27%), linear-gradient(135deg, #242836, #17191f 70%); }
.temperature-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(209,20,92,.07), transparent 45%); }
.temp-copy { position: relative; z-index: 1; }
.temp-copy h2 { margin: 10px 0 8px; font-size: clamp(68px, 10vw, 125px); letter-spacing: -.07em; }
.temp-copy h2 small { font-size: .25em; color: var(--muted); letter-spacing: 0; }
.temp-copy p { max-width: 520px; color: var(--muted); line-height: 1.6; }
.big-stars { display: flex; gap: 8px; font-size: 28px; color: #4e535e; }
.big-stars .on { color: #ffd34e; }
.thermometer { position: relative; width: 52px; height: 290px; margin: 0 auto; }
.tube { position: absolute; inset: 0 8px 28px; overflow: hidden; border: 5px solid #d8dbe3; border-radius: 999px 999px 14px 14px; background: #343842; }
.mercury { position: absolute; inset: auto 0 0; background: linear-gradient(#ff755b, #d3144c); transition: height .8s ease; }
.bulb { position: absolute; bottom: 0; left: 2px; width: 48px; height: 48px; border: 5px solid #d8dbe3; border-radius: 50%; background: #d3144c; }
.temp-character { align-self: end; max-width: 100%; max-height: 370px; object-fit: contain; filter: drop-shadow(0 18px 20px rgba(0,0,0,.4)); }
.rating-distribution { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #1a1d23; }
.rating-row { display: grid; grid-template-columns: 50px 1fr 35px; gap: 15px; align-items: center; margin: 12px 0; color: #b7bbc4; }
.rating-row > div { height: 9px; overflow: hidden; border-radius: 99px; background: #30333b; }
.rating-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--magenta), var(--gold)); }

.modal-backdrop { position: fixed; inset: 0; padding: 24px; display: grid; place-items: center; background: rgba(3,5,8,.79); backdrop-filter: blur(9px); z-index: 100; }
.modal { width: min(1040px, 96vw); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: #1c1f25; box-shadow: 0 40px 100px rgba(0,0,0,.65); transform: translateY(10px) scale(.985); opacity: 0; transition: .16s ease; }
.modal.visible, .modal-backdrop .modal { transform: none; opacity: 1; }
.modal-header, .modal-footer { flex: 0 0 auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.modal-footer { justify-content: flex-end; border: 0; border-top: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font-size: 27px; }
.close { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.06); font-size: 26px; }
.form-scroll { padding: 24px; overflow: auto; }
.form-section { margin-bottom: 29px; }
.form-section h3 { margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.form-section label, .settings-body label { display: grid; gap: 7px; color: #b9bdc6; font-size: 12px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #3a3e48; border-radius: 9px; background: #121419; color: white; padding: 10px 11px; }
textarea { resize: vertical; }
.wide { margin-top: 14px; }
.editor-rating { margin-bottom: 15px; }
.file-drop { margin-top: 16px; min-height: 94px; padding: 18px; place-content: center; justify-items: center; border: 1px dashed #4a4f5c; border-radius: 12px; background: rgba(255,255,255,.02); color: var(--cream) !important; cursor: pointer; }
.file-drop:hover { border-color: var(--gold); }
.file-drop input { display: none; }
.file-drop small { color: var(--muted); font-weight: 400; }
.pending-photos { margin-top: 15px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pending-photo { border: 2px solid transparent; border-radius: 11px; overflow: hidden; background: #121419; }
.pending-photo.cover { border-color: var(--gold); }
.pending-photo img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; }
.pending-photo div { display: flex; }
.pending-photo button { flex: 1; min-height: 34px; border: 0; border-right: 1px solid var(--line); background: transparent; color: #aeb2bd; font-size: 10px; }

.detail-modal { width: min(1200px, 97vw); }
.detail-actions { display: flex; align-items: center; gap: 9px; }
.detail-actions .favorite { color: var(--gold-hi); }
.detail-gallery .section-heading { margin-top: 0; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 240px); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.gallery button { position: relative; height: 235px; padding: 0; overflow: hidden; border: 2px solid var(--gold); border-radius: 11px; background: #111; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery span { position: absolute; inset: auto 8px 8px; padding: 6px 8px; border-radius: 99px; background: rgba(0,0,0,.72); color: var(--gold-hi); font-size: 9px; font-weight: 900; }
.detail-rating { padding: 18px; border-radius: 12px; background: #15171c; }
.info-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.info-grid > div { min-height: 75px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #17191f; }
.info-grid span { color: var(--magenta-hi); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.info-grid p { margin: 7px 0 0; color: #d0d2d8; overflow-wrap: anywhere; }
.notes { margin-top: 24px; padding: 20px; border-radius: 12px; background: #17191f; }
.notes h3 { margin-top: 0; }
.notes p { white-space: pre-wrap; color: #b8bbc3; line-height: 1.6; }
.danger-button { margin-top: 24px; min-height: 40px; padding: 0 15px; border: 1px solid rgba(255,70,85,.32); border-radius: 9px; background: rgba(255,70,85,.08); color: #ff7580; }
.video { margin-top: 24px; }
.video iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; background: black; }
.video a { color: var(--gold-hi); }

.settings-modal { width: min(620px, 95vw); }
.settings-body { padding: 28px; }
.settings-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.import-button { min-height: 42px; display: grid !important; place-items: center; cursor: pointer; }
.import-button input { display: none; }
.privacy-note { padding: 14px; margin: 22px 0 0; border-radius: 10px; background: rgba(212,167,47,.08); color: #aaa28f; font-size: 12px; line-height: 1.55; }
.photo-modal { width: auto; max-width: 94vw; max-height: 92vh; overflow: visible; background: transparent; border: 0; box-shadow: none; }
.photo-modal img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 10px; box-shadow: var(--shadow); }
.photo-close { position: fixed; top: 25px; right: 25px; z-index: 2; background: rgba(0,0,0,.7); }

.rating-overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(4,5,8,.45); z-index: 300; animation: fade-in .18s ease; }
.rating-card { width: min(650px, 90vw); min-height: 260px; padding: 22px 42px 22px 15px; display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 28px; position: relative; overflow: visible; border: 2px solid currentColor; border-radius: 20px; background: linear-gradient(145deg, #262930, #13151a); box-shadow: 0 35px 90px rgba(0,0,0,.7); }
.rating-card.danger { color: #ff4f5e; }
.rating-card.neutral { color: #ffd354; }
.rating-card.success { color: #60da92; }
.rating-card.excellent { color: #ffa748; }
.rating-card h2 { margin: 0; font-size: clamp(30px, 5vw, 46px); line-height: .98; letter-spacing: -.045em; }
.rating-card p { margin: 10px 0; color: #e3e4e7; font-weight: 800; }
.rating-card > button { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; color: #9296a0; font-size: 26px; }
.rating-character { width: 220px; height: 220px; object-fit: contain; filter: drop-shadow(0 15px 18px rgba(0,0,0,.5)); animation: character-pulse 1.44s ease-in-out infinite alternate; will-change: transform; }
/* 30% growth, slight up/left travel, smooth return; overflow remains visible. */
@keyframes character-pulse { from { transform: translate(0,0) scale(1); } to { transform: translate(-14px,-18px) scale(1.3); } }
.popup-stars { margin-top: 18px; color: #ffd34e; font-size: 24px; letter-spacing: 4px; }
@keyframes fade-in { from { opacity: 0; } }

.toast { position: fixed; z-index: 500; left: 50%; bottom: 25px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: #101217; box-shadow: var(--shadow); color: white; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 210px minmax(0,1fr); }
  .sidebar { padding-inline: 11px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .search { flex: 1; width: auto; }
  .shelf-row.size-small { grid-template-columns: repeat(4,1fr); }
  .shelf-row.size-medium { grid-template-columns: repeat(3,1fr); }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .temperature-card { grid-template-columns: 1fr 80px 220px; gap: 20px; }
  .form-grid, .info-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: fixed; width: 260px; transform: translateX(-105%); box-shadow: 20px 0 60px rgba(0,0,0,.65); transition: transform .2s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .mobile-menu { display: block; }
  .topbar { position: relative; min-height: 0; padding: 18px; gap: 16px; }
  .title-wrap { width: 100%; }
  .title-wrap h1 { font-size: 22px; }
  .top-actions select { display: none; }
  .top-actions .primary { flex: 1; }
  .content { padding: 18px; }
  .figure-grid.size-small, .figure-grid.size-medium, .figure-grid.size-large { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .cover-frame { margin: 7px 7px 0; border-width: 2px; }
  .card-body { padding: 10px; }
  .card-body h3 { font-size: 14px; }
  .cabinet { border-width: 8px; }
  .shelf-row.size-small, .shelf-row.size-medium, .shelf-row.size-large { grid-template-columns: repeat(2,1fr); padding: 18px 12px 37px; gap: 12px; }
  .metric-grid { grid-template-columns: 1fr; }
  .temperature-card { min-height: auto; grid-template-columns: 1fr 65px; padding: 28px; }
  .temp-character { display: none; }
  .form-grid, .info-grid { grid-template-columns: repeat(2,1fr); }
  .modal-backdrop { padding: 0; }
  .modal { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .modal-header { padding: 15px; }
  .modal-header h2 { font-size: 21px; }
  .form-scroll { padding: 16px; }
  .detail-actions .secondary { display: none; }
  .rating-card { grid-template-columns: 120px 1fr; gap: 14px; padding: 18px; }
  .rating-character { width: 130px; height: 130px; }
  .rating-card h2 { font-size: 27px; }
}

@media (max-width: 440px) {
  .figure-grid.size-small, .figure-grid.size-medium, .figure-grid.size-large { grid-template-columns: 1fr 1fr; }
  .card-body footer b { display: none; }
  .form-grid, .info-grid, .settings-actions { grid-template-columns: 1fr; }
  .temperature-card { grid-template-columns: 1fr; }
  .thermometer { display: none; }
  .rating-card { grid-template-columns: 1fr; text-align: center; }
  .rating-character { margin: -35px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
