/*------------------------------------------------------------------
[Yui Template CSS]

Project: Yui - ThemeForest
Version: 2.3
Author:	Xioyuna


[Table of contents]

1. Fonts
2. Root Variables
3. General
4. Navbar
5. Tab Bar
6. Custom Color Schemes
7. Buttons
8. Lists
9. Section Title
10. Post List
11. Badges
12. Checkboxes
13. Columns
14. Icons
15. Infinite Scroll
16. Notifications
17. Panel
18. Photo Browser
19. Popover
20. Popup
21. Preloader
22. Progress Bar
23. Radio
24. Range Slider
25. Toasts
26. Sheet Modal
27. Stepper
28. Swipe To Delete
29. Text Editor
30. Toggle Buttons
31. Tooltip
32. Tabs
33. Accordion
34. Cards
35. Slider
36. Forms
37. Rating
38. Ticket
39. Timeline
40. Sign Up
41. Messages List
42. Chat
43. Single
44. Create post
45. Transparent Navbar
46. Movie
47. Calendar
48. Help Center
49. Information block
50. Stocks
51. Author List
52. Categories Slider
53. Authors Slider
54. Contact
55. Settings
56. Categories Page
57. Profile
58. Search
59. Forgot Password
60. Onboarding
61. Notifications
62. Movie Slider
63. Album Grid
64. Panel
65. Album 
66. Dark Theme

-------------------------------------------------------------------*/

/* 1. Fonts */

@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik/Rubik-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

/* Reference-aligned item editor */
#item-settings-page {
  max-width: 920px;
  margin-inline: auto;
  padding-bottom: 32px;
}

.item-settings-topbar {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 72px;
  text-align: center;
}

.item-settings-topbar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
}

.item-settings-menu-button { grid-column: 3; }
.item-settings-form { max-width: none; gap: 22px; margin-top: 16px; }

.item-editor-primary {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px 24px;
}

.item-editor-main-preview {
  grid-row: span 2;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--lists-line);
  border-radius: 18px;
  color: var(--lists-muted);
  background: #fff;
}

.item-editor-main-preview img { width: 86%; height: 86%; object-fit: contain; }
.item-editor-main-preview svg { width: 54px; height: 54px; }
.item-editor-fields { display: grid; gap: 18px; }
.item-editor-amount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.item-editor-category-field, .item-editor-note-field { grid-column: 1 / -1; }

.item-settings-form .field { position: relative; }
.item-settings-form .field > span {
  position: absolute;
  z-index: 1;
  top: -8px;
  left: 16px;
  padding-inline: 6px;
  color: var(--lists-muted);
  background: #fff;
  font-size: 13px;
  font-weight: 400;
}

.item-settings-form .field input,
.item-settings-form .field select,
.item-settings-form .field textarea {
  width: 100%;
  min-height: 58px;
  margin: 0;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--lists-ink);
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.item-settings-form .field textarea { min-height: 76px; padding-block: 18px; resize: vertical; }
.item-appearance-section { padding: 20px; border-radius: 18px; }
.item-appearance-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.item-appearance-option {
  position: relative;
  min-height: 142px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  padding: 14px 8px;
  color: var(--lists-ink);
  background: #fff;
  cursor: pointer;
}

.item-appearance-option > svg { width: 32px; height: 32px; }
.item-appearance-option > span { display: grid; gap: 2px; font-size: 14px; font-weight: 400; }
.item-appearance-option small { color: inherit; font-size: 13px; font-weight: 400; }
.item-appearance-option.selected { border: 2px solid var(--lists-blue); color: var(--lists-blue); }
.item-appearance-option.selected::after {
  content: "✓";
  position: absolute;
  top: -13px;
  right: -8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--lists-blue);
}

#item-visual-actions { justify-content: flex-start; margin-top: 16px; }
.item-library-section { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 14px; border-radius: 18px; }
.item-library-section > svg { width: 26px; }
.item-library-section strong, .item-library-section small { display: block; }
.item-library-section strong { font-weight: 500; }
.item-library-section small { margin-top: 3px; color: var(--lists-muted); }
.item-library-switch input { position: absolute; opacity: 0; }
.item-library-switch span { position: relative; display: block; width: 48px; height: 28px; border-radius: 99px; background: #cbd5e1; cursor: pointer; }
.item-library-switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.item-library-switch input:checked + span { background: var(--lists-blue); }
.item-library-switch input:checked + span::after { transform: translateX(20px); }
.item-image-workflow { display: grid; gap: 0; border-radius: 18px; }
.item-image-workflow-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; min-height: 86px; border-top: 1px solid var(--lists-line); }
.item-image-workflow-row b { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--lists-blue); border-radius: 50%; color: var(--lists-blue); font-weight: 400; }
.item-image-workflow-row strong, .item-image-workflow-row small { display: block; }
.item-image-workflow-row strong { font-weight: 500; }
.item-image-workflow-row small { margin-top: 4px; color: var(--lists-muted); }
.item-image-workflow-row > svg { color: #4ca35a; }
.item-image-workflow-row .button { width: auto; min-height: 42px; margin: 0; }
.item-settings-save-button { width: 100%; min-height: 58px; margin: 0; border-radius: 14px; font-size: 18px; font-weight: 500; }

@media (max-width: 700px) {
  #item-settings-page { padding-inline: 16px; }
  .item-settings-topbar { min-height: 64px; }
  .item-settings-topbar h1 { font-size: 20px; }
  .item-settings-form { gap: 16px; }
  .item-editor-primary { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
  .item-editor-main-preview { width: 104px; height: 104px; grid-row: auto; }
  .item-editor-fields { gap: 14px; }
  .item-editor-amount-row { gap: 10px; }
  .item-editor-category-field, .item-editor-note-field { grid-column: 1 / -1; }
  .item-settings-form .field input, .item-settings-form .field select { min-height: 52px; padding-inline: 14px; }
  .item-appearance-section { padding: 14px; }
  .item-appearance-options { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .item-appearance-option { min-height: 108px; }
  .item-library-section { padding: 14px; }
  .item-library-section small { font-size: 12px; }
  .item-image-workflow-row { grid-template-columns: 38px 1fr auto; min-height: 76px; }
}

@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik/Rubik-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik/Rubik-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

/* 2. Root Variables */

:root {
  --title-color: #1e2b47;
  --text-color: #828d9c;
  --background-color: #fff;
  --light-gray: #ecf1f5;
  --f7-text-color: var(--title-color);
  --block-shadow: 0px 2px 10px 0px #555f6921;
  --f7-page-toolbar-bottom-offset: 50px;
  --f7-navbar-height: 50px;
  --f7-list-item-border-color: rgba(0, 0, 0, 0.12);
  --f7-list-outline-border-color: rgba(0, 0, 0, 0.12);
  --f7-list-chevron-icon-color: #8896b8;
  --swiper-pagination-color: var(--title-color);
}
:root .dark {
  --title-color: #fff;
  --text-color: #9aa9b2;
  --background-color: #001119;
  --light-gray: #0e232d;
}

:root {
  --lists-ink: #17202a;
  --lists-muted: #697586;
  --lists-line: #d8e0e7;
  --lists-surface: #ffffff;
  --lists-page: #f5f8f6;
  --lists-green: #25735a;
  --lists-blue: #2f5f98;
  --lists-red: #b73535;
  --lists-yellow: #f4c95d;
}

/* 3. General */

body {
  font-family: "Rubik", -apple-system, SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;
}
button,
input {
  font: inherit;
  box-sizing: border-box;
}
.page {
  background-color: var(--background-color);
}
.page-content {
  padding-left: 15px;
  padding-right: 15px;
  padding-bottom: calc(var(--f7-page-toolbar-bottom-offset, 0px) + var(--f7-safe-area-bottom) + var(--f7-page-content-extra-padding-bottom, 0px) + 20px);
}
.full-width {
  margin-left: -15px;
  margin-right: -15px;
  width: calc(100% + 30px) !important;
}
p {
  line-height: 1.8em;
  color: var(--text-color);
  font-size: 15px;
}
h1,
h2,
h3 {
  font-weight: 600;
  color: var(--title-color);
}
h1 {
  font-size: 28px;
  margin-bottom: 20px;
}
ul {
  padding-left: 20px;
}
ul li {
  padding: 4px 0;
  color: var(--text-color);
}
iframe {
  width: calc(100%);
  height: 230px;
  border-radius: 15px;
  border: none;
}
.page-content img {
  width: 100%;
}
.page-theme-transition {
  transition: background-color 0.4s;
}
.ios .router-transition-forward .page-next:before,
.ios .router-transition-backward .page-current:before,
.page-shadow-effect,
.page-opacity-effect,
.ios .router-transition-forward .page-current:after,
.ios .router-transition-backward .page-previous:after {
  background: none;
}
::-webkit-scrollbar {
  display: none;
}

/* 4. Navbar */

.navbar-bg {
  background-color: var(--background-color);
  transition: background-color 0.4s;
}
.navbar .title {
  color: var(--title-color);
}
.navbar-bg:after {
  display: none;
}
.navbar-profile img {
  border-radius: 50%;
  width: 30px;
}
.navbar-arrow {
  padding-left: 2px;
  width: 25px;
}
.arrow-back {
  font-weight: 400;
  font-size: 26px;
  padding-right: 10px;
  width: 25px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: subpixel-antialiased;
}
.navbar a i {
  color: var(--title-color);
}
.navbar .title-large {
  height: 58px;
}
.navbar .title-large-text {
  color: var(--title-color);
  padding-left: 15px;
}
.ios .navbar .left a + a,
.ios .navbar .right a + a {
  margin-left: 0;
}
.navbar .icon .badge {
  font-size: 11px;
  font-weight: 600;
}

/* 5. Tab Bar */

.toolbar {
  background-color: var(--background-color);
  transition: background-color 0.4s, transform 0.4s;
}
.tabbar a,
.tabbar-icons a {
  color: #8896b8;
}
.tabbar-icons .tabbar-label {
  font-size: 10px;
}
.toolbar-bottom:before,
.ios .toolbar-bottom-ios:before,
.md .toolbar-bottom-md:before {
  background-color: #dedede;
  transition: background-color 0.4s, transform 0.4s;
}

/* 6. Custom Color Schemes */

.color-light-gray {
  --f7-button-text-color: var(--title-color);
  --f7-text-color: var(--title-color);
  --f7-theme-color: #ecf1f5;
  --f7-theme-color-rgb: 236, 241, 245;
  --f7-theme-color-shade: #d1dde7;
  --f7-theme-color-tint: #f6f8fa;
  --f7-badge-text-color: var(--title-color);
}
.color-dark {
  --f7-theme-color: #1e2b47;
  --f7-theme-color-rgb: 30, 43, 71;
  --f7-theme-color-shade: #121a2a;
  --f7-theme-color-tint: #2a3c64;
}

/* 7. Buttons */

.button {
  width: 100%;
  height: 44px;
  text-transform: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 10px;
  margin: 10px 0;
}
.button img {
  width: 17px;
  max-width: 17px;
  max-height: 17px;
  margin-right: 7px;
}
p.row .button {
  margin-top: 0;
  margin-bottom: 0;
}
.button i {
  font-size: 18px;
  font-weight: 400;
}
.button-icon-right i {
  margin-left: 6px;
}
.button-icon-left i {
  margin-right: 6px;
}
.button-round {
  border-radius: 22px;
}

/* 8. Lists */

.list {
  margin-top: 15px;
  margin-bottom: 25px;
}
.list li {
  color: var(--title-color);
  padding-top: 0;
  padding-bottom: 0;
}
.list .item-inner {
  padding-top: 14px;
  padding-bottom: 14px;
}
.list .item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--title-color);
}
.simple-list ul li,
.links-list ul li a {
  min-height: 50px;
}
.links-list a,
.simple-list ul li {
  color: var(--title-color);
  font-size: 15px;
  font-weight: 500;
}
.colored-icons-list a {
  justify-content: flex-start;
  padding: 11px var(--f7-list-item-padding-horizontal);
  height: auto;
}
.colored-icon {
  background-color: #ebebf2;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--title-color);
}
.colored-icon .icon {
  font-size: 19px;
}
.colored-icon.yellow {
  color: #e5b32d;
  background-color: rgba(229, 179, 45, 0.2);
}
.colored-icon.blue {
  color: #0091de;
  background-color: rgba(0, 145, 222, 0.1);
}
.colored-icon.green {
  color: #19b48e;
  background-color: rgba(25, 180, 142, 0.1);
}
.colored-icon.pink {
  color: #e2206e;
  background-color: rgba(226, 32, 95, 0.1);
}
.colored-icon.orange {
  color: #ee8f30;
  background-color: rgba(255, 156, 60, 0.16);
}
.colored-icon.red {
  color: #d8422e;
  background-color: rgba(216, 66, 46, 0.13);
}
.colored-icon.purple {
  color: #9146da;
  background-color: rgba(145, 70, 218, 0.15);
}
.info-block {
  background-color: var(--light-gray);
  padding: 15px 20px;
  border-radius: 15px;
  margin-top: 20px;
  margin-bottom: 25px;
  position: relative;
}
.info-block p {
  font-size: 15px;
  color: #708197;
  margin: 0;
}
.info-block-icon {
  position: absolute;
  top: -15px;
  right: -15px;
  background-color: #ffffff;
  padding: 4px;
  border-radius: 50%;
}
.info-block-icon i {
  font-size: 25px;
}
.icon-bold {
  font-weight: 600;
}
.simple-list .item-inner::after {
  display: none;
}
.simple-list .item-inner {
  padding-right: 0;
}
.list-with-icons .item-media img {
  max-height: 35px;
  max-width: 35px;
  height: auto;
  width: auto;
  border-radius: 50%;
}
.list .item-after {
  color: var(--text-color);
}

/* 9. Section Title */

.section-title {
  margin-top: 25px;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--title-color);
  font-size: 18px;
  font-weight: 600;
}
.section-title .left i {
  font-size: 16px;
}
.section-title a {
  font-weight: 500;
  font-size: 15px;
  color: var(--f7-theme-color);
}

/* 10. Post List */

.post-list {
  margin: 10px 0 20px 0;
}
.post-list .post-horizontal {
  margin-bottom: 10px;
  align-items: normal;
}
.post-horizontal {
  box-shadow: var(--block-shadow);
  display: flex;
  padding: 15px 15px 15px 17px;
  border-radius: 15px;
  justify-content: space-between;
}
.post-horizontal .post-image {
  margin-left: 10px;
  line-height: 0;
}
.post-horizontal .post-image img {
  object-fit: cover;
  border-radius: 15px;
  min-width: 84px;
  max-width: 84px;
  height: 84px;
}
.post-horizontal .post-title {
  color: var(--title-color);
  font-weight: 500;
  line-height: 22px;
  font-size: 14px;
  margin: 2px 0 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* number of lines to show */
  -webkit-box-orient: vertical;
}
.post-horizontal .post-category,
.post-horizontal .post-date {
  color: var(--text-color);
  font-size: 14px;
}
.post-horizontal .post-date {
  line-height: 0;
}

/* 11. Badges */

.icon-list .icon {
  margin: 0 15px;
}
.badge {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}
i .badge {
  padding: 0 4px;
  font-size: 10px;
}
.badge-with-icon {
  height: 24px;
  padding: 0 10px 0 6px;
}
.badge-with-icon i {
  font-size: 17px !important;
  margin-right: 3px;
}
.badge-with-image {
  padding-left: 0;
  height: 24px;
  font-weight: 500;
  font-size: 14px;
  padding-right: 8px;
}
.badge-with-image img {
  height: 24px;
  width: auto;
  border-radius: 12px;
  margin-right: 6px;
}

/* 12. Checkboxes */

.ios .checkbox i:after,
.ios .icon-checkbox:after {
  font-size: 20px;
  font-weight: 600;
}
.checkbox.checkbox-inline {
  margin-right: 5px;
}
.icon-checkbox,
.checkbox i {
  border-radius: 5px;
}
.checkbox-rounded .icon-checkbox,
.checkbox-rounded .checkbox i {
  border-radius: 50%;
}
.icon-checkbox,
.checkbox i {
  border: 2px solid #c7c7cc;
}
.icon-checkbox:after,
.checkbox i:after {
  top: -2px;
  left: -2px;
}

/* 13. Columns */

.grid {
  margin: 10px 0;
}
.grid-demo > * {
  padding: 20px 0;
  font-weight: 500;
  color: var(--title-color);
  background-color: var(--light-gray);
  border-radius: 6px;
  text-align: center;
}
.grid-demo {
  margin: 15px 0;
}
.grid-buttons-demo {
  margin-top: 0;
  margin-bottom: 0;
}
.grid-buttons-demo .button {
  margin-bottom: 0;
  margin-top: 0;
}
.grid-no-margin {
  margin: 0;
}

/* 14. Icons */

.demo-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, 60px);
  justify-content: space-between;
  grid-gap: 1rem;
  justify-items: center;
}
.demo-icons i {
  margin: 10px;
  font-size: 30px;
}

/* 15. Infinite Scroll */

.infinite-scroll-demo .post-horizontal .post-image {
  border-radius: 15px;
  min-width: 84px;
  max-width: 84px;
  height: 84px;
  background-color: var(--title-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 30px;
}

/* 16. Notifications */

.notification-image {
  border-radius: 50%;
}

/* 17. Panel */

.panel-backdrop {
  background-color: rgba(0, 0, 0, 0.3);
}

/* 18. Photo Browser */

.photo-browser-page .navbar .title {
  color: #fff;
}
.navbar-photo-browser .right .link svg,
.navbar-photo-browser .right .link i {
  color: #fff;
}

/* 19. Popover */

.popover-inner .block {
  margin: 20px 0;
  padding: 0 20px;
}

/* 20. Popup */

.popup-demo {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.popup-demo img {
  width: 80%;
  margin-top: 40px;
}
.popup-content {
  margin-top: 10px;
  flex: 1;
  text-align: center;
}
.popup-demo .button {
  margin-bottom: 25px;
  min-height: 44px;
}
.popup-demo .swipe-down-text {
  margin-bottom: 25px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
}

/* 21. Preloader */

.preloader-big {
  height: 40px;
  width: 40px;
}
.preloader-demo > div {
  text-align: center;
}

/* 22. Progress Bar */

.progressbar-infinite,
.progressbar {
  margin: 20px 0;
  height: 8px;
  background-color: var(--light-gray);
}

/* 23. Radio */

.ios .icon-radio:after {
  font-size: 24px;
}
.radio .icon-radio {
  width: 24px;
  height: 24px;
  border: 2px solid #c7c7cc;
}
p .icon-radio {
  margin-right: 1px;
}
.ios p .icon-radio:after {
  font-size: 22px;
}

/* 24. Range Slider */

.range-slider-with-icons {
  width: 100%;
  margin: 0 16px;
}
.range-slider-title-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.range-slider-title-value .range-value {
  color: var(--title-color);
  font-weight: 500;
  font-size: 15px;
}

/* 25. Toasts */

.toast-button.button {
  width: auto;
}

/* 26. Sheet Modal */

.sheet-modal[data-swipe-to-close="true"] .sheet-modal-inner::before {
  content: "";
  width: 40px;
  height: 6px;
  position: absolute;
  left: 50%;
  top: 8px;
  margin-left: -20px;
  border-radius: 3px;
  background: #666;
  cursor: pointer;
  z-index: 15;
}
.sheet-modal {
  height: 32vh;
}
.sheet-modal[data-swipe-to-close="true"] {
  border-top-right-radius: 20px;
  border-top-left-radius: 20px;
  height: auto;
  max-height: 70vh;
}
.sheet-modal .page-content {
  padding: 0 20px 20px 20px;
}
.sheet-modal[data-swipe-to-close="true"] .page-content {
  padding-top: 20px;
}
.sheet-modal::before {
  display: none !important;
}

/* 27. Stepper */

.stepper .stepper-input-wrap input {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  color: var(--title-color);
  width: 40px;
}
.stepper-input-wrap,
.stepper-value {
  border: none;
}
.stepper-button:last-child,
.stepper-button-minus:last-child,
.stepper-button-plus:last-child,
.stepper-button:first-child,
.stepper-button-minus:first-child,
.stepper-button-plus:first-child {
  border-radius: 8px;
}
.stepper-button,
.stepper-button-minus,
.stepper-button-plus {
  width: 28px;
}
.stepper-button-plus:after,
.stepper-button-minus:after {
  width: 12px;
}
.stepper-button-plus:before {
  height: 12px;
}
.stepper.color-light-gray .stepper-button-minus::after,
.stepper.color-light-gray .stepper-button-plus::before,
.stepper.color-light-gray .stepper-button-plus::after {
  background-color: var(--title-color);
}

/* 28. Swipe To Delete */

.swipeout-actions-left > a,
.swipeout-actions-right > a,
.swipeout-actions-left > button,
.swipeout-actions-right > button,
.swipeout-actions-left > span,
.swipeout-actions-right > span,
.swipeout-actions-left > div,
.swipeout-actions-right > div {
  font-weight: 500;
  font-size: 15px;
}

/* 29. Text Editor */

.text-editor {
  margin-right: 0;
  margin-left: 0;
  border-radius: 10px;
  border: 1px solid #e0e3e6;
  margin-top: 0;
  background-color: var(--light-gray);
}
.text-editor-content .text-editor-placeholder {
  color: #93a0b1;
}
.text-editor-toolbar {
  border-bottom: 1px solid #e0e3e6;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background-color: var(--light-gray);
}
.text-editor-toolbar::after {
  display: none;
}
.input-outline {
  border: 2px solid #e0e3e6 !important;
  background: none !important;
}

/* 30. Toggle Buttons */

.ios .toggle-icon:after {
  box-shadow: none;
}
.ios .toggle-icon:before {
  background-color: #e9e9ea;
}

/* 31. Tooltip */

.icon-tooltip {
  color: var(--title-color);
}
/* 32. Tabs */

.segmented.segmented-strong .button {
  margin: 0;
  border-radius: 12px;
}
.custom-tabs .tab {
  padding-left: 10px;
  padding-right: 10px;
}
.segmented.segmented-strong {
  background-color: var(--light-gray);
  border-radius: 15px;
}
.segmented-strong .segmented-highlight {
  box-shadow: none;
  background-color: var(--title-color);
  border-radius: 12px;
}
.segmented-strong {
  --f7-segmented-strong-padding: 3px;
}
.segmented.segmented-strong .button.tab-link-active {
  color: #fff;
}

/* 33. Accordion */

.accordion-item-content {
  padding: 0 20px;
}
.accordion-item-content p {
  font-size: 15px;
  margin: 0px 0 5px;
}
.list.accordion-list .item-title {
  color: var(--title-color);
  font-weight: 500;
  font-size: 15px;
}

/* 34. Cards */

.card {
  background: none;
  border-radius: 18px;
  box-shadow: var(--block-shadow);
  overflow: hidden;
  margin: 20px 0;
  display: block;
}
.section-title + .card {
  margin-top: 10px;
}
.card-footer:before {
  display: none;
}
.card-image {
  border-radius: 0;
  display: block;
  min-height: auto;
  padding: 0;
  line-height: 0;
  position: relative;
}
.card-image:has(.card-image-footer) img {
  object-fit: cover;
  aspect-ratio: 16/10;
}
.card-image:has(~ .card-author-footer) img {
  aspect-ratio: 16/9;
}
.card-image-footer {
  position: absolute;
  bottom: 0;
  padding: 60px 18px 15px 18px;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgb(24 24 24 / 95%) 100%);
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  line-height: var(--f7-line-height);
}
.card-image-footer h2 {
  margin: 0;
  font-size: 19px;
  line-height: 24px;
  font-weight: 500;
  color: #fff;
}
.card .card-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 8px;
  margin-bottom: 10px;
  border-radius: 5px;
}
.card .card-author {
  display: flex;
  align-items: center;
}
.card .card-author span {
  opacity: 0.9;
}
.card .card-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
}
.card .card-category.bg-color-white {
  color: var(--title-color);
}
a {
  transition: opacity 0.1s ease;
}
a:active {
  opacity: 0.95;
}
swiper-slide .card {
  margin: 0;
}
swiper-slide .card.card-with-footer {
  margin-bottom: 10px;
}
.card-author-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px;
}
.card-author-footer .author-image {
  width: 35px;
  border-radius: 50%;
  height: auto;
}
.card-author-footer .card-footer-middle {
  margin-left: 12px;
}
.card-author-footer .card-author {
  color: var(--title-color);
  font-weight: 500;
  font-size: 15px;
}
.card-author-footer .card-date {
  color: var(--text-color);
}
.card-author-footer .card-footer-right {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color);
  margin-left: auto;
}
.card-author-footer .card-footer-right i {
  font-size: 22px;
}
.card-big-footer {
  display: block;
  padding: 20px;
}
.card-big-footer h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: -5px;
}
.card-big-footer .button {
  margin-bottom: 0;
  margin-top: 15px;
}
.card-big-footer .button i {
  margin-left: 5px;
  font-weight: 600;
}
img.card-big-footer-image {
  height: auto;
}

/* 35. Slider */

swiper-container {
  margin-top: 10px;
  margin-bottom: -20px;
  padding-bottom: 20px;
}

/* 36. Forms */

input[type="text"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="password"],
textarea {
  background-color: var(--light-gray);
  width: 100%;
  height: 44px;
  padding: 0 0 0 15px;
  border-radius: 10px;
  color: var(--title-color);
  font-weight: 500;
  margin-bottom: 20px;
  font-size: 15px;
}
::placeholder,
::-webkit-input-placeholder {
  color: #93a0b1;
  font-weight: 400;
}
input[type="date"],
input[type="datetime-local"] {
  padding-right: 10px;
  line-height: 42px;
}
.searchbar input[type="search"] {
  background-color: var(--light-gray);
}
label:not(.checkbox, .item-checkbox, .radio, .item-radio, .toggle) {
  font-weight: 500;
  margin-bottom: 7px;
  font-size: 15px;
  display: block;
}
form .button {
  margin: 20px 0;
}
textarea {
  padding-top: 15px;
  padding-bottom: 15px;
  min-height: 100px;
}
form h1 {
  margin-bottom: 0;
}

/* 37. Rating */

.rating-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 25px;
}
.rating-block-note {
  font-weight: 500;
  font-size: 30px;
  margin: 20px 0;
}
.rating-block-text {
  text-align: center;
  color: var(--text-color);
}
.rating-block-detailed {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}
.rating-block-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f5f9ff;
  border-radius: 50px;
  padding: 10px 15px;
}
.rating-block-total-text {
  font-weight: 500;
  margin-top: 12px;
  margin-left: 5px;
}
.rating-block-detailed .rating-block-stars i {
  font-size: 22px;
}
.rating-block-count {
  font-size: 14px;
  margin-top: 10px;
  color: var(--text-color);
  margin-bottom: 15px;
}
.rating-block-group {
  width: 100%;
}
.rating-block-individual {
  display: flex;
  align-items: center;
  margin: 15px 0;
}
.rating-block-individual:first-child {
  margin-top: 0;
}
.rating-block-star {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 500;
  width: 40px;
}
.rating-block-star i {
  font-size: 18px;
  margin-left: 3px;
}
.rating-block-bar {
  margin: 0 10px;
}
.rating-block-percentage {
  font-weight: 500;
  width: 44px;
}
.rating-bg {
  background-color: #f5f9ff;
  border-radius: 15px;
}

/* 38. Ticket */

.ticket {
  border-radius: 15px;
  position: relative;
  width: 100%;
  height: 140px;
  font-size: 15px;
  background-size: 50% 100%;
  background-repeat: no-repeat;
  background-image: radial-gradient(circle at 0 50%, rgba(0, 0, 0, 0) 0.7em, var(--light-gray) 0), radial-gradient(circle at 100% 50%, rgba(0, 0, 0, 0) 0.7em, var(--light-gray) 0);
  background-position: top left, top right;
  overflow: hidden;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.ticket-infos {
  flex: 1;
  flex-basis: 50%;
  padding-left: 5px;
}
.ticket-image {
  flex: 1;
  flex-basis: 50%;
}
.ticket-discount {
  font-size: 40px;
  font-weight: 600;
  color: var(--title-color);
}
.ticket-text {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
}
.ticket-description {
  font-weight: 500;
  font-size: 14px;
}
.ticket:active {
  opacity: 0.5;
}
.ticket-fill {
  border-radius: 15px;
  position: relative;
  width: 100%;
  height: 140px;
  font-size: 15px;
  background: linear-gradient(90deg, rgb(21, 22, 27), rgb(20, 20, 45));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 30px;
  box-sizing: border-box;
  margin-bottom: 20px;
}
.ticket-fill::before,
.ticket-fill::after {
  content: "";
  width: 22px;
  height: 11px;
  background-color: #fff;
  border-radius: 10rem 10rem 0 0;
  position: absolute;
  top: 75px;
  z-index: 10;
}
.ticket-fill::before {
  left: -6px;
  transform: rotate(90deg);
}
.ticket-fill::after {
  right: -6px;
  transform: rotate(270deg);
}
.ticket-fill .ticket-discount {
  color: #fff;
  font-weight: 500;
  z-index: 10;
}
.ticket-fill .ticket-description {
  color: #fff;
  font-weight: 500;
  z-index: 10;
}
.ticket-background-icon {
  position: absolute;
  right: 40px;
  color: rgba(255, 255, 255, 0.1);
}
.ticket-background-icon i {
  font-size: 110px;
}
.ticket-image-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  object-fit: cover;
  border-radius: 15px;
}
.ticket-image-bg + .ticket-text {
  z-index: 10;
  color: #fff;
}
.ticket-fill:active {
  opacity: 0.9;
}

/* 39. Timeline */

.timeline {
  padding: 0;
}
.timeline-item-text {
  color: var(--text-color);
  margin-top: 5px;
  line-height: 1.8em;
}
.timeline-item-date {
  font-weight: 500;
}
.timeline-item-divider:after,
.timeline-item-divider:before {
  width: 1px;
  opacity: 0.2;
  background: #41454b;
}
.timeline-item-divider {
  background: var(--title-color);
}
.timeline-item-content {
  margin-top: -4px;
  margin-bottom: 5px;
}
.timeline-item-inner {
  padding-top: 0;
}
.timeline-item-text img {
  border-radius: 10px;
}

/* 40. Sign Up */

.signup-image,
.signin-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.signup-image img {
  width: 85%;
}
.signin-image img {
  width: 90%;
}
.google-button {
  background-color: #eff7e5;
}
.login-separator {
  font-size: 14px;
}
.signup-tos {
  font-size: 13px;
}
.signup-tos a {
  color: var(--text-color);
  text-decoration: underline;
}
.signup-have-account {
  color: var(--title-color);
  font-weight: 500;
  font-size: 15px;
}
.signin-links {
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 41. Messages List */

.list-title {
  margin: 25px 0 10px 0;
}
.list-title + .list {
  margin-top: 5px;
}
.detailed-list {
  margin-top: 10px;
}
.detailed-list .item-content {
  padding-left: 15px;
}
.detailed-list .item-link .item-inner {
  padding-right: 15px;
  margin-left: 15px;
}
.detailed-list .item-media img {
  width: 50px;
  border-radius: 50%;
}
.message-list.detailed-list .item-after .badge {
  padding: 0 6px;
  min-width: 22px;
}
.detailed-list .item-footer {
  line-height: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  margin-top: 4px;
  color: var(--text-color);
  padding-right: 5px;
}
.detailed-list .item-name {
  font-size: 15px;
  color: var(--title-color);
  font-weight: 500;
}
.detailed-list .item-link .item-inner:before {
  display: none;
}
.detailed-list .item-after {
  font-size: 14px;
}
.detailed-list .item-unread {
  font-weight: 500;
  color: var(--title-color);
}
.detailed-list .item-name .badge {
  margin-left: 3px;
  padding: 0 8px;
}
.searchbar-inner {
  padding: 0 15px;
}
.searchbar-backdrop.searchbar-backdrop-in {
  opacity: 0;
}
.searchbar.searchbar-inline {
  margin-top: 10px;
  margin-bottom: -5px;
}
.searchbar.searchbar-inline .searchbar-input-wrap {
  height: 40px;
}

/* 42. Chat */

.messagebar textarea {
  min-height: auto;
  background-color: var(--light-gray);
  border: none;
  margin-bottom: 0;
  font-weight: 400;
  font-size: 15px;
}
.ios .message-received {
  margin-left: 15px;
}
.ios .message-sent {
  margin-right: 15px;
}
.messagebar .send-link i {
  transform: rotate(45deg);
  margin-left: -6px;
  margin-right: 3px;
}
.ios .message + .message:not(.message-first) {
  margin-top: 2px;
}
.messages-date {
  font-size: 14px;
  margin: 15px 0 5px;
  color: var(--text-color);
  text-align: center;
  width: 100%;
  line-height: 1;
}
.message-bubble {
  font-size: 15px;
}
.page[data-name="chat"] .page-content {
  padding-bottom: calc(var(--f7-page-toolbar-bottom-offset, 0px) + var(--f7-safe-area-bottom) + var(--f7-page-content-extra-padding-bottom, 0px));
}
.ios .message-sent .message-bubble {
  padding: 8px 20px 8px 13px;
}
.ios .message-received .message-bubble {
  padding: 8px 13px 8px 20px;
}
.messagebar .toolbar-inner {
  padding-bottom: 3px;
}

/* 43. Single */

.single-post-date {
  color: var(--text-color);
  font-size: 16px;
  margin-top: 10px;
}
.single-post-title {
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 28px;
}
.single-cover-image {
  border-radius: 8px;
}
.single-post-actions {
  font-size: 25px;
}
.single-post-category {
  padding: 4px 10px;
  font-size: 14px;
  height: auto;
  border-radius: 6px;
  color: var(--title-color);
  background-color: var(--light-gray);
  font-size: 14px;
  font-weight: 500;
  margin-right: 5px;
  display: inline-block;
  margin-top: 15px;
}
.single-post-content img {
  border-radius: 8px;
}
.single-post-author {
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  padding: 15px;
  border-radius: 15px;
  margin: 20px 0;
}
.single-post-author > img {
  width: 55px;
  border-radius: 50%;
  margin-right: 12px;
}
.single-post-author .author-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.single-post-author .author-name {
  font-weight: 500;
  font-size: 15px;
}
.single-post-author .author-description {
  color: var(--text-color);
  margin-top: 2px;
  font-size: 13px;
}
.single-post-author .author-follow {
  width: auto;
  margin-left: auto;
  padding: 0 15px 0 11px;
  height: 38px;
}
.verified-badge {
  margin-left: 2px;
  font-size: 19px;
}
.comment-list {
  margin-top: 30px;
}
.comment {
  display: flex;
  margin: 20px 0;
}
.comment-author {
  display: flex;
  align-items: center;
}
.comment > img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 13px;
}
.comment-header-left {
  display: flex;
  align-items: center;
}
.comment-date {
  margin-left: 6px;
  color: var(--text-color);
  font-size: 15px;
  opacity: 0.8;
}
.comment-infos {
  width: 100%;
}
.comment-infos .author-name {
  font-weight: 500;
  font-size: 15px;
}
.comment-text {
  line-height: 1.55em;
  color: var(--text-color);
  font-size: 15px;
  margin-top: 2px;
}
.title-bottom-line {
  position: relative;
  margin-top: 30px;
  margin-bottom: 25px;
}
.title-bottom-line::after {
  content: "";
  position: absolute;
  background-color: var(--f7-list-outline-border-color);
  display: block;
  z-index: 15;
  right: auto;
  bottom: -7px;
  left: 0;
  height: 1px;
  width: 100%;
  transform-origin: 50% 100%;
  transform: scaleY(calc(1 / var(--f7-device-pixel-ratio)));
}
.comment-count {
  margin-bottom: 2px;
  margin-left: 2px;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.comment-reply {
  margin-left: 60px;
}
.comment-header i {
  color: var(--title-color);
  font-size: 18px;
  width: 10px;
  font-weight: 600;
}

/* 44. Create post */

.create-post-cover {
  background-color: var(--light-gray);
  height: 25vh;
  border-radius: 10px;
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  position: relative;
  font-size: 14px;
  color: #93a0b1;
}
.create-post-cover i {
  margin-bottom: 5px;
}
.create-post-cover input[type="file"] {
  background-color: red;
  position: absolute;
  width: 95%;
  height: 90%;
  opacity: 0;
  z-index: 99;
  cursor: pointer;
}

/* 45. Transparent Navbar */

.stick-top {
  margin-top: -50px;
}
.navbar-transparent .navbar-inner .left a i {
  color: #fff;
  transition: color 00s;
  text-shadow: 0px 0px 11px #000;
}
.navbar-transparent.navbar-transparent-visible .navbar-inner .left a i {
  color: #000;
  transition: color 0s;
  text-shadow: none;
}

/* 46. Movie */

.movie-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}
.page-content .movie-cover {
  width: calc(70vw - 30px);
  border-radius: 25px;
  max-height: 342px;
  object-fit: cover;
}
.movie-infos {
  width: 100%;
  margin-left: 15px;
}
.movie-block {
  background-color: var(--light-gray);
  color: var(--title-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  margin-bottom: 15px;
  padding: 19px 0;
}
.movie-block:last-child {
  margin-bottom: 0;
}
.movie-block i {
  font-size: 20px;
}
.movie-block-name {
  margin: 5px 0 1px 0;
  color: #708197;
  font-weight: 400;
}
.movie-block-text {
  font-weight: 600;
}
.casting .grid > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
}
.casting .grid {
  margin-bottom: 20px;
}
img.actor-image {
  border-radius: 50%;
  width: 60px;
  margin-bottom: 10px;
}
.actor-firstname,
.actor-lastname {
  text-align: center;
  line-height: 1.4em;
  color: var(--title-color);
  font-weight: 500;
  font-size: 13px;
}
.movie-rating {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: -15px;
}
.movie-distribution .item-inner .item-after {
  font-size: 15px;
  font-weight: 500;
  color: var(--title-color);
}
.movie-distribution.list .item-title {
  font-weight: 400;
  color: var(--text-color);
}

/* 47. Calendar */

.calendar-day-number {
  font-weight: 500;
}
.calendar .toolbar .toolbar-inner .center {
  font-weight: 500;
}
.link-banner {
  padding: 15px 15px 15px 20px;
  position: relative;
  border-radius: 15px;
  margin: 15px 0;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--title-color);
  overflow: hidden;
  background-color: var(--light-gray);
}
.link-banner i {
  margin-right: 10px;
  font-size: 35px;
  font-weight: 400;
  color: var(--title-color);
}
.link-banner-text {
  display: flex;
  flex-direction: column;
  color: var(--title-color);
  margin-left: 10px;
}
.link-banner-subtitle {
  font-weight: 400;
  font-size: 14px;
  margin-top: 2px;
  color: var(--title-color);
  opacity: 0.7;
}
.link-banner img {
  margin-right: 10px;
  max-height: 40px;
  width: auto;
}
.link-chevron::before {
  font-family: "framework7-core-icons";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga";
  text-align: center;
  display: block;
  width: 100%;
  height: 100%;
  font-size: 20px;
  position: absolute;
  top: 50%;
  width: 8px;
  height: 14px;
  margin-top: -7px;
  font-size: var(--f7-list-chevron-icon-font-size);
  line-height: 14px;
  color: var(--title-color);
  pointer-events: none;
  right: calc(var(--f7-list-item-padding-horizontal) + var(--f7-safe-area-right));
  content: var(--f7-list-chevron-icon-right);
}
.link-banner.bg-color-primary,
.link-banner.bg-color-primary .link-banner-text,
.link-banner.bg-color-primary i,
.link-banner.bg-color-primary.link-chevron::before,
.link-banner.bg-color-dark,
.link-banner.bg-color-dark .link-banner-text,
.link-banner.bg-color-dark i,
.link-banner.bg-color-dark.link-chevron::before {
  color: #fff;
}
.link-banner.bg-color-dark {
  background-color: var(--title-color);
}
.link-banner.bg-color-primary .link-banner-subtitle {
  color: #fff;
  opacity: 0.8;
}
.link-banner.bg-color-dark .link-banner-subtitle {
  color: #fff;
  opacity: 0.8;
}
.detailed-list .item-media img.event-thumbnail {
  border-radius: 17px;
}
.link-banner.error-message,
.link-banner.success-message {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.link-banner.error-message {
  background-image: url("../img/images/pattern-error.png");
}
.link-banner.error-message .link-banner-title,
.link-banner.error-message .link-banner-subtitle,
.link-banner.error-message i,
.link-banner.error-message.link-chevron::before {
  color: #9b3d3d;
}
.link-banner.success-message .link-banner-title,
.link-banner.success-message .link-banner-subtitle,
.link-banner.success-message i,
.link-banner.success-message.link-chevron::before {
  color: #508d59;
}
.link-banner.success-message {
  background-image: url("../img/images/pattern-success.png");
}
.list .item-after.event-time {
  color: var(--title-color);
  font-weight: 500;
  font-size: 14px;
}
.list .item-media.event-icon i {
  font-size: 35px;
  margin: 0 5px;
}
.detailed-list .item-after .badge {
  height: 22px;
  padding: 0 9px;
  font-size: 12px;
}

/* 48. Help Center */

.help-center-banner {
  border-radius: 15px;
}
.simple-link-banner i {
  font-size: 25px;
}
.simple-link-banner .link-banner-text {
  font-size: 15px;
  margin-left: 2px;
}
.help-center-title {
  margin-top: 20px;
  margin-bottom: -5px;
  font-size: 2em;
}
.searchbar-help-center.searchbar-inline {
  margin-top: 20px;
}
.help-center-links {
  margin-bottom: 30px;
}
.light-gray-title {
  color: #99a0a7;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  margin-top: 30px;
  margin-bottom: 10px;
}
.light-gray-title .badge {
  padding: 0;
  margin-left: 3px;
  margin-bottom: 2px;
}
.faq-list .list.accordion-list .item-title {
  font-size: 15px;
}

/* 49. Information block */

.information-block {
  background-image: url("../img/images/pattern-general.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: var(--title-color);
  text-align: center;
  border-radius: 15px;
  padding: 25px 20px 20px 20px;
  margin: 20px 0;
}
.information-block.error-message {
  background-image: url("../img/images/pattern-error.png");
}
.information-block.success-message {
  background-image: url("../img/images/pattern-success.png");
}
.information-block.success-message h2,
.information-block.success-message p {
  color: #599c63;
}
.information-block.error-message h2,
.information-block.error-message p {
  color: #b14b4b;
}
.information-block img {
  width: 30%;
}
.information-block h2 {
  font-size: 30px;
  margin: 10px 0 0 0;
}
.information-block p {
  color: var(--title-color);
  margin: 10px 0 10px 0;
  font-weight: 500;
  line-height: 1.5;
}

/* 50. Stocks */

.stock-item {
  box-shadow: var(--block-shadow);
  display: flex;
  padding: 13px 15px;
  border-radius: 13px;
  margin-bottom: 8px;
}
.stock-item img {
  width: 40px;
  margin-right: 15px;
}
.stock-item-details {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.stock-item-top,
.stock-item-bottom {
  display: flex;
  justify-content: space-between;
}
.stock-item-top {
  margin-bottom: 3px;
}
.stock-item-title,
.stock-item-value {
  font-weight: 500;
  color: var(--title-color);
  font-size: 15px;
}
.stock-item-name {
  color: var(--text-color);
  font-size: 14px;
}
.stock-item-change {
  font-size: 14px;
  font-weight: 500;
}

/* 51. Author List */

.author-list .author-follow {
  height: 35px;
  margin: 0;
  color: #fff;
}

/* 52. Categories Slider */

.category-slide {
  background-color: var(--light-gray);
  color: var(--title-color);
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
  padding: 10px 16px;
  display: flex;
  border-radius: 20px;
}
.categories-slider swiper-slide {
  width: auto;
}
.categories-slider {
  margin-top: 15px;
}

/* 53. Authors Slider */

.authors-slider {
  margin-top: 20px;
}
.authors-slider swiper-slide {
  width: auto;
}
.author-slide {
  display: flex;
  flex-direction: column;
  width: 85px;
}
.author-slide img {
  width: 60px;
  border-radius: 50%;
}
.author-slide .author-name {
  text-align: center;
  color: var(--title-color);
  font-weight: 500;
  margin-top: 7px;
}

/* 54. Contact */

.contact-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  color: var(--title-color);
  font-weight: 500;
  padding: 13px 5px 10px;
  border-radius: 15px;
}
.contact-block i {
  margin: 0;
  font-size: 22px;
  padding-right: 0px;
  font-weight: 400;
}
.contact-block .contact-method {
  font-size: 14px;
  margin-top: 4px;
}
.contact-input {
  height: 150px;
}

/* 55. Settings */

.settings-header {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 25px 0 35px;
}
.settings-image {
  position: relative;
}
.edit-profile-image {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: #0091de;
  border-radius: 50%;
  border: 1px solid #fff;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edit-profile-image i {
  color: #fff;
  font-size: 15px;
}
.settings-name {
  font-weight: 500;
  font-size: 15px;
  margin-top: 20px;
  margin-bottom: 2px;
}
.settings-image img {
  width: 120px;
  border-radius: 50%;
}
.settings-email {
  color: #99a0a7;
  font-weight: 400;
}
.settings-list .colored-icon {
  border-radius: 10px;
  height: 32px;
  width: 32px;
}
.settings-list .colored-icon.yellow,
.dark .settings-list .colored-icon.yellow {
  color: #fff;
  background-color: #ffc62b;
}
.settings-list .colored-icon.blue,
.dark .settings-list .colored-icon.blue {
  color: #fff;
  background-color: #089bea;
}
.settings-list .colored-icon.green,
.dark .settings-list .colored-icon.green {
  color: #fff;
  background-color: #41d359;
}
.settings-list .colored-icon.pink,
.dark .settings-list .colored-icon.pink {
  color: #fff;
  background-color: #f20f6a;
}
.settings-list .colored-icon.orange,
.dark .settings-list .colored-icon.orange {
  color: #fff;
  background-color: #ff9925;
}
.settings-list .colored-icon.red,
.dark .settings-list .colored-icon.red {
  color: #fff;
  background-color: #ff4530;
}
.settings-list .colored-icon.purple,
.dark .settings-list .colored-icon.purple {
  color: #fff;
  background-color: #9638f3;
}
.settings-list .colored-icon.gray,
.dark .settings-list .colored-icon.gray {
  color: #fff;
  background-color: #878787;
}
.settings-list .item-after {
  padding-right: 20px;
  font-size: 15px;
}
.settings-list .item-title {
  color: var(--title-color);
  font-size: 15px;
  font-weight: 500;
}
.list .item-content.toggle-setting {
  padding-left: 0;
}
.toggle-setting .item-inner {
  padding-left: 15px;
}
.toggle-setting .item-after {
  padding-right: 0;
}
.settings-list .item-after:has(.toggle) {
  padding-right: 0;
}

/* 56. Categories Page */

.category-item {
  height: 100px;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
}
.category-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  filter: brightness(60%);
}
.category-name {
  position: absolute;
  top: 50%;
  width: 100%;
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 0;
  text-shadow: 0 0 20px #000;
}

/* 57. Profile */

.profile-header {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin: 20px 0 20px;
}
.profile-image {
  position: relative;
}
.profile-online {
  position: absolute;
  bottom: 6px;
  right: 15px;
  background-color: #0091de;
  border-radius: 50%;
  border: 2px solid #fff;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-image img {
  width: 120px;
  border-radius: 50%;
}
.profile-name {
  color: var(--title-color);
  font-weight: 500;
  font-size: 20px;
  margin-top: 15px;
}
.profile-subtitle {
  color: #99a0a7;
  font-weight: 400;
  font-size: 15px;
  margin-bottom: 5px;
}
.profile-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
.profile-buttons .contact-button {
  background-color: var(--light-gray);
  color: var(--title-color);
  border-radius: 15px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 7px;
}
.profile-buttons .contact-button i {
  padding: 0;
  font-size: 20px;
}
.profile-buttons .author-follow {
  width: auto;
  margin: 0 7px;
  padding: 0 20px 0 15px;
}
.profile-stats {
  margin-bottom: 30px;
}
.grid.grid-gap.profile-stats {
  gap: 0;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e3e5;
  text-align: center;
}
.profile-stat:last-child {
  border-right: none;
}
.profile-stat-number {
  font-weight: 600;
  font-size: 20px;
}
.profile-stat-title {
  color: var(--text-color);
  font-size: 15px;
}

/* 58. Search */

.searchbar-search-page.searchbar-inline {
  margin-top: 10px;
  margin-bottom: 20px;
}
.search-grid {
  margin-bottom: 30px;
}
.search-grid a {
  font-size: 15px;
  border-top: 1px solid #e2e3e5;
  text-align: left;
  margin-top: 12px;
  padding-top: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.search-grid a:nth-child(1),
.search-grid a:nth-child(2) {
  border-top: none;
  margin-top: 5px;
  padding-top: 0;
}
.search-grid a:nth-child(odd) {
  margin-right: 10px;
}
.search-grid a:nth-child(even) {
  margin-left: 10px;
}
.search-grid a i {
  font-size: 20px;
  margin-right: 6px;
}

/* 59. Forgot Password */

.centered-text {
  text-align: center;
}
.forgot-password-text {
  margin: 10px 0 30px;
}

/* 60. Onboarding */

.page-onboarding {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: calc(var(--f7-page-toolbar-bottom-offset, 0px) + var(--f7-safe-area-bottom) + var(--f7-page-content-extra-padding-bottom, 0px) - 20px);
}
.navbar a.link.onboarding-skip {
  font-weight: 500;
  color: var(--title-color);
  padding-right: 8px;
}
.swiper-onboarding swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.swiper-onboarding swiper-slide img {
  width: 75%;
  margin-top: 20px;
}
.swiper-onboarding swiper-slide .onboarding-title {
  font-size: 40px;
  font-weight: 600;
  color: var(--title-color);
  padding: 0 30px;
  text-align: center;
  line-height: 1.2;
  margin: 20px 0 10px;
}
.swiper-onboarding swiper-slide .onboarding-subtitle {
  font-size: 15px;
  padding: 0 30px;
  text-align: center;
  color: var(--text-color);
  margin: 10px 0 30px;
}
.onboarding-next-button i {
  margin-left: 5px;
  font-weight: 600;
}
.router-transition-f7-dive-forward,
.router-transition-f7-dive-backward {
  background: #fff;
}
@media (max-height: 885px) {
  .swiper-onboarding swiper-slide img {
    width: 70%;
  }
  .swiper-onboarding swiper-slide .onboarding-title {
    font-size: 30px;
  }
}
@media (max-height: 770px) {
  .swiper-onboarding swiper-slide img {
    width: 55%;
  }
  .swiper-onboarding swiper-slide .onboarding-title {
    font-size: 25px;
  }
  .swiper-onboarding swiper-slide .onboarding-subtitle {
    font-size: 15px;
  }
}

/* 61. Notifications */

.notification-list .item-date-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}
.notification-list .item-date {
  color: #99a0a7;
  font-size: 14px;
  font-weight: 400;
}
.notification-list .item-time {
  color: #99a0a7;
  font-size: 14px;
  font-weight: 400;
}
.notification-list .item-description {
  font-weight: 500;
  font-size: 14px;
  color: var(--title-color);
  white-space: normal;
}
.notification-list .item-description i {
  font-size: 20px;
  margin-right: 4px;
  line-height: 0.9;
}
.notification-list.detailed-list .item-media img {
  width: 50px;
}
.notification-list.list .item-inner {
  padding-top: 10px;
  padding-bottom: 10px;
}
.segmented.segmented-strong .button.active-state {
  background-color: transparent;
}

/* 62. Movie Slider */

.card-movie {
  border-radius: 15px;
}
.card-movie-rating {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background-color: #fff;
  padding: 4px 8px 2px 6px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--title-color);
}
.card-movie-rating i {
  font-size: 12px;
  margin-bottom: 3px;
}
.card-movie .card-image img {
  aspect-ratio: 9/13;
  object-fit: cover;
}

/* 63. Album Grid */

.album-grid {
  margin-top: 15px;
}
.album-grid a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: none !important;
  margin-bottom: 20px;
}
.album-grid a:nth-last-child(1),
.album-grid a:nth-last-child(2) {
  margin-bottom: 0px;
}
.album-grid img {
  width: 55px;
  border-radius: 6px;
  margin-right: 10px;
}
.album-details {
  width: calc(100% - 70px);
}
.album-grid a:nth-child(even) .album-details {
  width: calc(100% - 63px);
}
.album-title {
  font-size: 15px;
  color: var(--title-color);
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.album-author {
  line-height: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  margin-top: 4px;
  color: var(--text-color);
}

/* 64. Panel */

.panel-links a {
  justify-content: flex-start;
}
.panel-links a i {
  margin-right: 15px;
  font-size: 23px;
}
.panel .profile-header {
  margin-bottom: 40px;
  margin-top: 40px;
}
.panel .profile-header .profile-image img {
  width: 90px;
}
.panel .profile-header .profile-image .profile-online {
  bottom: 7px;
  right: 7px;
  width: 12px;
  height: 12px;
}
.panel .profile-header .profile-name {
  font-size: 19px;
  margin-top: 5px;
}
.panel .profile-header .profile-subtitle {
  font-size: 14px;
}
.panel-logout {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  font-weight: 500;
}
.panel-logout i {
  font-size: 25px;
  margin-left: 5px;
}

/* 65. Album  */

.card.card-album .card-image img {
  aspect-ratio: 1/1;
  object-fit: cover;
}
.card.card-album {
  border-radius: 8px;
}
.album-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.album-header .album-cover {
  width: 80%;
  border-radius: 10px;
}
.album-header .album-title {
  font-weight: 600;
  font-size: 26px;
  margin-top: 20px;
}
.album-header .album-artist {
  font-weight: 400;
  font-size: 16px;
  color: var(--text-color);
  margin-bottom: 20px;
}
.grid.grid-gap.album-stats {
  gap: 0;
}
.album-stats {
  margin-bottom: 40px;
}
.album-stat {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e3e5;
  text-align: center;
}
.album-stat:last-child {
  border-right: none;
}
.album-stat-number {
  font-weight: 600;
  font-size: 20px;
}
.album-stat-title {
  color: var(--text-color);
  font-size: 15px;
}
.album-tracklist .item-inner .item-title {
  font-weight: 500;
  color: var(--title-color);
}

/* 66. Dark Theme */

.dark .colored-icon.yellow {
  background-color: rgba(229, 179, 45, 0.2);
}
.dark .colored-icon.blue {
  background-color: rgba(0, 145, 222, 0.25);
}
.dark .colored-icon.green {
  background-color: rgba(25, 180, 142, 0.2);
}
.dark .colored-icon.pink {
  background-color: rgba(226, 32, 95, 0.2);
}
.dark .colored-icon.orange {
  background-color: rgba(255, 156, 60, 0.2);
}
.dark .colored-icon.red {
  background-color: rgba(216, 66, 46, 0.3);
}
.dark .colored-icon.purple {
  background-color: rgba(145, 70, 218, 0.3);
}
.dark .light-gray-title {
  color: #8191a6;
}
.dark .toolbar-bottom:before,
.ios .dark .toolbar-bottom-ios:before,
.md .dark .toolbar-bottom-md:before {
  background-color: rgba(255, 255, 255, 0.15);
}
.dark .info-block-icon {
  background-color: var(--background-color);
  color: #8191a6;
}
.dark .info-block p {
  color: #7f91a7;
}
.dark .button.color-dark {
  background-color: #0ee9b3;
  color: #181c22;
}
.dark .button.color-light-gray {
  background-color: #102733;
}
.dark .post-horizontal {
  box-shadow: none;
  background-color: var(--light-gray);
}
.dark .infinite-scroll-demo .post-horizontal .post-image {
  background-color: var(--text-color);
}
.dark .notification {
  background: var(--light-gray);
}
.dark .panel {
  background-color: var(--light-gray);
}
.dark .sheet-modal {
  background: var(--light-gray);
}
.dark .segmented.segmented-strong .button.tab-link-active {
  color: #181c22;
}
.dark .text-editor {
  border: 1px solid #363d43;
}
.dark .text-editor-toolbar {
  border-bottom: 1px solid #363d43;
}
.dark .badge.color-light-gray {
  color: var(--background-color);
}
.dark .stepper.color-light-gray .stepper-button-minus::after,
.dark .stepper.color-light-gray .stepper-button-plus::before,
.dark .stepper.color-light-gray .stepper-button-plus::after {
  background-color: var(--background-color);
}
.dark .card .card-category.bg-color-white {
  color: var(--background-color);
}
.dark .card {
  box-shadow: none;
}
.dark .card-image-footer {
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgb(24 24 24 / 80%) 100%);
}
.dark .card-author-footer {
  background-color: var(--light-gray);
}
.dark .card-big-footer {
  background-color: var(--light-gray);
}
.dark .card-movie-rating {
  background-color: var(--background-color);
  color: #fff;
}
.dark .badge.color-black {
  background-color: #ffffff;
  color: var(--background-color);
}
.dark .post-horizontal .post-category {
  color: #0ee9b3;
}
.dark .stock-item {
  background-color: var(--light-gray);
  box-shadow: none;
}
.dark .rating-bg {
  background-color: var(--light-gray);
}
.dark .rating-block-total {
  background-color: var(--light-gray);
}
.dark .ticket-fill::before,
.dark .ticket-fill::after {
  background-color: var(--background-color);
}
.dark .ticket-fill {
  background: #0ee9b3;
}
.dark .ticket-fill:not(.ticket-image) i,
.dark .ticket-fill:not(.ticket-image) .ticket-discount,
.dark .ticket-fill:not(.ticket-image) .ticket-description,
.dark .ticket-fill:not(.ticket-image) .ticket-text {
  color: #000 !important;
}
.dark .ticket {
  background-image: radial-gradient(circle at 0 50%, rgba(0, 0, 0, 0) 0.7em, var(--light-gray) 0), radial-gradient(circle at 100% 50%, rgba(0, 0, 0, 0) 0.7em, var(--light-gray) 0);
}
.dark .timeline-item-inner {
  background: transparent;
}
.dark .timeline-item-divider:after,
.dark .timeline-item-divider:before {
  background: #fff;
}
.dark .information-block:not(.success-message, .error-message) h2,
.dark .information-block:not(.success-message, .error-message) p {
  color: #1e2b47;
}
.dark .link-banner.dark-theme-green {
  background-color: #0ee9b3;
}
.dark .link-banner.dark-theme-green .link-banner-title,
.dark .link-banner.dark-theme-green i,
.dark .link-banner.dark-theme-green .link-banner-subtitle,
.dark .link-banner.dark-theme-green.link-chevron::before {
  color: #000;
}
.dark .link-banner.bg-color-dark {
  background-color: var(--light-gray) !important;
}
.dark .category-item img {
  filter: brightness(70%);
}
.dark .profile-stat {
  border-right: 1px solid #2d3d4a;
}
.dark .profile-stat:last-child {
  border-right: none;
}
.dark .album-stat {
  border-right: 1px solid #2d3d4a;
}
.dark .album-stat:last-child {
  border-right: none;
}
.dark .profile-online {
  border: 2px solid var(--background-color);
}
.dark .edit-profile-image {
  border: 1px solid var(--background-color);
}
.dark .search-grid a {
  border-top: 1px solid #2d3d4a;
}
.dark .search-grid a:nth-child(1),
.dark .search-grid a:nth-child(2) {
  border-top: none;
}
.router-transition-f7-dive-forward,
.router-transition-f7-dive-backward {
  background: var(--background-color);
}
.bg-color-primary {
  background-color: var(--f7-theme-color) !important;
}
.dark .panel .profile-header .profile-image .profile-online {
  border: 2px solid var(--light-gray);
}
.ios .dark .message-received .message-bubble {
  background-color: var(--light-gray);
}
.dark .ticket-fill.ticket-image {
  background: none;
}

/* 66. RTL Languages */

html[dir="rtl"] .album-grid img {
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .detailed-list .item-link .item-inner {
  padding-right: 0;
  padding-left: 15px;
  margin-left: 0;
}
html[dir="rtl"] .post-horizontal .post-image {
  margin-left: 0;
  margin-right: 10px;
}
html[dir="rtl"] .button-icon-left i {
  margin-right: 0;
  margin-left: 5px;
}
html[dir="rtl"] .colored-icon {
  margin-right: 0;
  margin-left: 10px;
}
html[dir="rtl"] .navbar a .arrow-back {
  transform: rotate(180deg);
  padding-right: 0;
  padding-left: 3px;
}
html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="password"] {
  padding: 0 15px 0 0px;
}
html[dir="rtl"] textarea {
  padding: 15px 15px 0 15px;
}
html[dir="rtl"] .messagebar-area textarea {
  padding: 6px 16px;
}
html[dir="rtl"] .button img {
  margin-right: 0;
  margin-left: 7px;
}
html[dir="rtl"] .single-post-author > img {
  margin-right: 0;
  margin-left: 12px;
}
html[dir="rtl"] .single-post-author .author-follow {
  margin-right: auto;
  margin-left: inherit;
}
html[dir="rtl"] .comment > img {
  margin-right: 0;
  margin-left: 15px;
}
html[dir="rtl"] .comment-date {
  margin-right: 6px;
  margin-left: 0;
}
html[dir="rtl"] .comment-reply {
  margin-right: 60px;
  margin-left: 0;
}
html[dir="rtl"] .movie-infos {
  margin-right: 15px;
  margin-left: 0;
}
html[dir="rtl"] .link-chevron::before {
  display: none;
}
html[dir="rtl"] .link-banner img,
html[dir="rtl"] .link-banner i {
  margin-right: 0;
  margin-left: 10px;
}
html[dir="rtl"] .simple-list .item-inner {
  padding-left: 0;
}
html[dir="rtl"] .rating-block-star i {
  margin-right: 3px;
  margin-left: 0;
}
html[dir="rtl"] .album-stat:first-child,
html[dir="rtl"] .profile-stat:first-child {
  border-right: none;
}
html[dir="rtl"] .album-stat:last-child,
html[dir="rtl"] .profile-stat:last-child {
  border-right: 1px solid #e2e3e5;
}
html[dir="rtl"] .settings-list .item-after {
  padding-left: 20px;
  padding-right: 0;
}
html[dir="rtl"] .settings-list .item-after:has(.toggle) {
  padding-left: 0;
}
html[dir="rtl"] .search-grid a {
  text-align: right;
}
html[dir="rtl"] .search-grid a i {
  margin-right: 0;
  margin-left: 6px;
}
html[dir="rtl"] .accordion-opposite .accordion-item > .item-content:before {
  right: 8px;
}
html[dir="rtl"] .badge-with-image img {
  margin-right: 0;
  margin-left: 6px;
}
html[dir="rtl"] .badge-with-image {
  padding-right: 0;
  padding-left: 8px;
}
html[dir="rtl"] .checkbox.checkbox-inline {
  margin-right: 0;
  margin-left: 5px;
}
html[dir="rtl"] .card-author-footer .card-footer-middle {
  margin-right: 12px;
}
html[dir="rtl"] .card-author-footer .card-footer-right {
  margin-right: auto;
  margin-left: inherit;
}
html[dir="rtl"] .badge-with-icon {
  padding: 0 6px 0 10px;
}
html[dir="rtl"] .badge-with-icon i {
  margin-right: 0;
  margin-left: 3px;
}
html[dir="rtl"] .card .card-author img {
  margin-right: 0;
  margin-left: 8px;
}
html[dir="rtl"] .detailed-list .item-content {
  padding-left: 0;
}
html[dir="rtl"] .light-gray-title .badge {
  margin-left: 0;
  margin-right: 3px;
}
html[dir="rtl"] .post-horizontal {
  padding: 15px 17px 15px 15px;
}
html[dir="rtl"] .search-grid a:nth-child(odd) {
  margin-left: 10px;
  margin-right: 0;
}
html[dir="rtl"] .search-grid a:nth-child(even) {
  margin-left: 0;
}
html[dir="rtl"] .onboarding-next-button i {
  margin-left: 0;
  margin-right: 5px;
  transform: rotate(180deg);
}
html[dir="rtl"] .segmented.segmented-strong .button {
  color: #fff;
}
html[dir="rtl"] .segmented.segmented-strong .button.tab-link-active {
  color: var(--title-color);
}
html[dir="rtl"] .dark .segmented.segmented-strong .button {
  color: #1e2b47;
}
html[dir="rtl"] .dark .segmented.segmented-strong .button.tab-link-active {
  color: #fff;
}
html[dir="rtl"] .stepper .stepper-input-wrap input {
  padding-right: 0;
}
html[dir="rtl"] .card-big-footer .button i {
  transform: rotate(180deg);
  margin-left: 0;
  margin-right: 5px;
}
html[dir="rtl"] .stock-item img {
  margin-left: 15px;
  margin-right: 0;
}
html[dir="rtl"] .rating-block-total-text {
  margin-left: 0;
  margin-right: 5px;
}
html[dir="rtl"] .panel-links a i {
  margin-left: 15px;
  margin-right: 0;
}

/* Lists app */

body {
  margin: 0;
  background: var(--lists-page);
  color: var(--lists-ink);
}

.hidden {
  display: none !important;
}

.lists-shell {
  min-height: 100vh;
}

.sync-status {
  position: fixed;
  z-index: 1200;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  min-height: 36px;
  max-width: calc(100vw - 32px);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lists-ink, #0f172a);
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--lists-border, #dbe4ee);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 500;
}

.sync-status.hidden { display: none; }
.sync-status .icon { width: 18px; font-size: 18px; }
.sync-status[data-state="offline"] .icon { color: #b45309; }
.sync-status[data-state="syncing"] .icon { color: #2563eb; animation: sync-status-spin 1s linear infinite; }
.sync-status[data-state="synced"] .icon { color: #15803d; animation: none; }
.sync-status[data-state="error"] .icon { color: #b91c1c; animation: none; }

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

.auth-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px;
}

.auth-art h1 {
  font-size: 58px;
  margin: 22px 0 12px;
  letter-spacing: 0;
}

.auth-art p {
  max-width: 520px;
  font-size: 19px;
  color: var(--lists-muted);
}

.brand-mark {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--lists-green), var(--lists-blue));
  box-shadow: 0 18px 45px rgba(47, 95, 152, 0.22);
}

.brand-mark .icon {
  font-size: 38px;
}

.demo-note,
.auth-panel,
.sidebar,
.workspace,
.share-panel {
  border: 1px solid var(--lists-line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

.demo-note {
  width: fit-content;
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 8px;
}

.demo-note span,
.eyebrow,
.field span {
  display: block;
  color: var(--lists-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.demo-note strong {
  display: block;
  margin-top: 4px;
}

.auth-panel {
  border-radius: 8px;
  padding: 24px;
}

.auth-mode {
  margin-bottom: 22px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field > span {
  margin-bottom: 8px;
}

.item-settings-form .field > span {
  margin-bottom: 0;
}

.field input,
.field select,
.field textarea,
.inline-form input,
.create-list-field input,
.create-list-field select,
.item-form input,
.set-item-form input,
.share-panel input {
  width: 100%;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--lists-ink);
}

.field input,
.field select,
.inline-form input,
.create-list-field input,
.create-list-field select,
.item-form input,
.set-item-form input,
.share-panel input {
  min-height: 46px;
}

.field textarea {
  min-height: 110px;
  padding-top: 12px;
  resize: vertical;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.auth-submit,
.item-form .button-fill {
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.form-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--lists-red);
  font-size: 14px;
}

.form-error:empty {
  display: none;
}

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.sidebar,
.workspace {
  border-radius: 8px;
}

.sidebar {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 22px;
}

.sidebar-head,
.topbar,
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sidebar h2,
.topbar h1,
.share-panel h3 {
  margin: 4px 0 0;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--lists-ink);
  background: #fff;
  cursor: pointer;
}

.icon-button.filled {
  color: white;
  border-color: var(--lists-green);
  background: var(--lists-green);
}

.icon-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.inline-form,
.item-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) 42px;
  margin: 20px 0;
}

.create-list-field {
  display: grid;
  gap: 8px;
}

.create-list-field > span {
  margin-bottom: 8px;
  color: var(--lists-muted);
  font-size: 13px;
  font-weight: 500;
}

.create-list-button {
  min-height: 44px;
  width: 100%;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.create-list-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #fff;
  color: var(--lists-ink);
  box-shadow: 0 24px 80px rgba(29, 44, 38, 0.24);
  overflow: auto;
}

.create-list-dialog::backdrop {
  background: rgba(22, 32, 28, 0.55);
}

.create-set-dialog {
  width: min(900px, calc(100% - 32px));
}

.set-import-dialog {
  width: min(760px, calc(100% - 32px));
}

.set-import-dialog .create-list-form {
  gap: 12px;
  padding: 16px;
}

.set-import-dialog .create-list-dialog-head {
  align-items: flex-start;
}

.set-import-dialog .create-list-dialog-head .eyebrow {
  font-size: 11px;
  line-height: 16px;
}

.set-import-dialog .create-list-dialog-head h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 26px;
}

.set-import-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.set-import-help-control {
  position: relative;
  flex: 0 0 auto;
}

.set-import-help-trigger {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  padding: 0;
  color: var(--lists-muted);
  background: transparent;
  cursor: help;
}

.set-import-help-trigger .icon {
  font-size: 18px;
  line-height: 18px;
}

.set-import-help-trigger:hover,
.set-import-help-trigger:focus-visible {
  color: var(--lists-ink);
  background: var(--lists-page);
}

.set-import-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 50%;
  width: min(280px, calc(100vw - 64px));
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  background: var(--lists-ink);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
  font-size: 12px;
  line-height: 17px;
  font-weight: 400;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity .14s ease, transform .14s ease;
}

.set-import-help-control:hover .set-import-tooltip,
.set-import-help-control:focus-within .set-import-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.set-import-dialog .create-list-dialog-head .icon-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 12px;
}

.set-import-help {
  margin: 0;
  color: var(--lists-muted);
  font-size: 13px;
  line-height: 19px;
}

.set-import-items {
  display: grid;
  gap: 16px;
  max-height: min(480px, 55vh);
  overflow: auto;
}

.set-import-group,
.set-import-group-items {
  display: grid;
  gap: 8px;
}

.set-import-group > h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--lists-ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.set-import-group > h3 span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding-inline: 6px;
  color: var(--lists-muted);
  background: var(--lists-page);
  font-size: 11px;
  font-weight: 500;
}

.set-import-item {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.set-import-item.conflict {
  border-color: #dfbf82;
  background: #fffaf0;
}

.set-import-item-info,
.set-import-choice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.set-import-item-info {
  min-width: 0;
}

.set-import-item-info strong,
.set-import-item-info small {
  display: block;
}

.set-import-item-info small {
  margin-top: 3px;
  color: var(--lists-muted);
}

.set-import-prediction {
  display: block;
  max-width: 460px;
  margin-top: 5px;
  color: #8a5a12;
  font-size: 13px;
  line-height: 1.35;
}

.set-import-choice {
  flex: 0 0 auto;
  gap: 4px;
  border-radius: 8px;
  padding: 3px;
  background: #eef3f0;
}

.set-import-choice button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--lists-muted);
  background: transparent;
  cursor: pointer;
}

.set-import-choice button.active {
  color: #fff;
  background: var(--lists-green);
}

.set-import-add-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.set-import-amount {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--lists-muted);
  white-space: nowrap;
}

.set-import-amount strong {
  color: var(--lists-ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.set-import-amount small {
  color: var(--lists-muted);
  font-size: 11px;
  line-height: 14px;
}

.set-import-add-button {
  position: relative;
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 0;
  color: var(--lists-ink);
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
  cursor: pointer;
}

.set-import-add-button::before,
.set-import-add-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.set-import-add-button::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.set-import-add-button.active {
  border-color: var(--lists-ink);
  color: #fff;
  background: var(--lists-ink);
}

.set-import-summary {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--lists-line);
  padding: 14px 2px 2px;
}

.set-import-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.set-import-summary strong,
.set-import-summary span {
  font-size: 13px;
  line-height: 18px;
}

.set-import-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lists-muted);
}

.set-import-summary span svg {
  width: 17px;
  height: 17px;
}

.set-import-summary p {
  margin: 0;
  color: var(--lists-muted);
  font-size: 11px;
  line-height: 16px;
}

.create-set-dialog .create-list-form {
  gap: 16px;
}

.create-set-dialog .field {
  margin-bottom: 0;
}

.optional-block-dialog .create-list-form {
  gap: 16px;
}

.optional-block-dialog .field {
  margin-bottom: 0;
}

.optional-block-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  border-radius: 20px;
  overflow: hidden;
}

.optional-block-dialog .create-list-form {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  gap: 12px;
  padding: 16px;
  scrollbar-gutter: stable;
}

.optional-block-dialog .create-list-dialog-head {
  position: sticky;
  z-index: 3;
  top: -16px;
  margin: -16px -16px 0;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--lists-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.optional-block-dialog .create-list-dialog-head h2 {
  font-size: 20px;
  line-height: 26px;
}

.optional-block-dialog .create-list-dialog-head .icon-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 12px;
}

.optional-block-dialog .field > span,
.optional-block-dialog .form-section-label {
  margin-bottom: 8px;
  color: var(--lists-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.optional-block-dialog .field input,
.optional-block-dialog .simple-add-row input {
  min-height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
}

.optional-block-dialog .optional-block-color-options {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: none;
}

.optional-block-dialog .optional-block-color-options::-webkit-scrollbar { display: none; }

.optional-block-dialog .optional-block-color-option > span {
  position: relative;
  width: 30px;
  height: 30px;
}

.optional-block-dialog .optional-block-color-option > span .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  display: block;
  font-size: 18px;
  line-height: 18px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.optional-block-dialog .simple-add-row {
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.optional-block-dialog .simple-add-row .button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border-color: var(--lists-ink);
  padding: 0;
  background: var(--lists-ink);
}

.optional-block-dialog .simple-add-row .button .icon {
  font-size: 22px;
}

.optional-block-dialog .simple-add-row .button span {
  display: none;
}

.optional-block-dialog .set-draft-items {
  gap: 0;
  max-height: 176px;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  background: #fff;
}

.optional-block-dialog .set-draft-items:has(.empty-state) {
  border-style: dashed;
}

.optional-block-dialog .compact-draft-item {
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--lists-line);
  border-radius: 0;
  padding: 4px 8px 4px 12px;
  font-size: 14px;
}

.optional-block-dialog .compact-draft-item:last-child {
  border-bottom: 0;
}

.optional-block-dialog .compact-draft-item .delete-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

.optional-block-dialog .compact-draft-item .delete-button .icon,
.optional-block-dialog .compact-draft-item .delete-button svg {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.optional-block-dialog .create-list-actions {
  position: sticky;
  z-index: 3;
  bottom: -16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 -16px -16px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--lists-line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
}

.optional-block-dialog .create-list-actions .button {
  min-height: 48px;
  margin: 0;
  border-radius: 12px;
}

.optional-block-dialog .create-list-actions .button-fill {
  border-color: var(--lists-blue);
  background: var(--lists-blue);
  color: #fff;
}

.optional-block-dialog .create-list-actions .button:not(.button-fill) {
  min-width: 104px;
  border-color: transparent;
  background: var(--lists-page);
}

.create-list-form {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.create-list-dialog-head,
.create-list-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.create-list-dialog-head h2 {
  margin: 4px 0 0;
}

.list-type-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.list-type-fieldset legend {
  margin: 0;
  color: var(--lists-muted);
  font-size: 13px;
  font-weight: 500;
}

.list-type-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.list-type-option {
  box-sizing: border-box;
  min-height: 64px;
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0 !important;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
}

.list-type-option:has(input:checked) {
  border-color: rgba(37, 115, 90, 0.55);
  background: #eaf5ef;
}

.list-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.list-type-option-control {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid var(--lists-line);
  border-radius: 50%;
  background: #fff;
  color: transparent;
  margin-top: 2px;
}

.list-type-option-control .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  font-size: 16px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.list-type-option > span:last-child {
  min-width: 0;
  flex: 1;
}

.list-type-option input:checked + .list-type-option-control {
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.list-type-option input:focus-visible + .list-type-option-control {
  outline: 3px solid rgba(37, 115, 90, 0.25);
  outline-offset: 2px;
}

.list-type-option strong,
.list-type-option small {
  display: block;
}

.list-type-option small {
  margin-top: 4px;
  color: var(--lists-muted);
  line-height: 1.35;
}

.create-list-actions {
  justify-content: flex-end;
}

.create-list-actions .button {
  min-width: 110px;
  min-height: 44px;
  margin: 0;
}

.create-list-actions .button-fill {
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.set-builder {
  display: grid;
  gap: 10px;
}

.set-builder-label {
  color: var(--lists-muted);
  font-size: 13px;
  font-weight: 500;
}

.set-item-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.set-item-form .item-name-field {
  flex: 1 1 280px;
}

.set-item-form .item-name-field input,
.set-item-form > .button {
  min-height: 56px;
}

.set-item-form > .button {
  width: auto;
  flex: 0 0 128px;
  margin: 0;
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.set-draft-items {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.set-draft-item {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.set-draft-item > div {
  min-width: 0;
  flex: 1;
}

.set-draft-item strong,
.set-draft-item small {
  display: block;
}

.set-draft-item small {
  margin-top: 3px;
  color: var(--lists-muted);
}

@media (max-width: 520px) {
  .create-list-form {
    padding: 20px;
  }

  .create-list-actions {
    flex-direction: column;
  }

  .create-list-actions .button {
    width: 100%;
  }

  .set-item-form .quantity-stepper,
  .set-item-form > .button {
    flex: 1 1 100%;
  }

  .set-import-item {
    align-items: stretch;
    flex-direction: column;
  }

  .set-import-choice {
    width: 100%;
    flex: 0 0 auto;
  }

  .set-import-choice button {
    flex: 1;
  }
}

#catalog-page.show-sets .catalog-category-order-button { display: none; }
.catalog-category-order-dialog { width: min(440px, calc(100% - 32px)); max-height: min(680px, calc(100dvh - 32px)); overflow-y: auto; border: 0; border-radius: 20px; padding: 0; color: var(--lists-ink); background: transparent; }
.catalog-category-order-dialog::backdrop { background: rgba(15, 23, 42, .56); backdrop-filter: blur(2px); }
.catalog-category-order-dialog > section { display: grid; gap: 16px; border-radius: 20px; padding: 20px; background: #fff; box-shadow: 0 24px 80px rgba(15,23,42,.22); }
.catalog-category-order-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.catalog-category-order-dialog h2 { margin: 4px 0 0; font-size: 20px; }
.catalog-category-order-dialog > section > p { margin: 0; color: var(--lists-muted); font-size: 13px; line-height: 19px; }
.catalog-category-order-list { display: grid; overflow: hidden; border: 1px solid var(--lists-line); border-radius: 14px; }
.catalog-category-order-list article { min-height: 58px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 16px 8px 14px; background: #fff; transition: opacity .16s ease, background-color .16s ease; }
.catalog-category-order-list.is-reordering { user-select: none; }
.catalog-category-order-list.is-reordering article:not(.is-dragging) { opacity: .2; }
.catalog-category-order-list article.is-dragging { position: relative; z-index: 2; opacity: 1; background: #eff6ff; }
.catalog-category-order-ghost { position: fixed; z-index: 10000; pointer-events: none; min-height: 58px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 16px 8px 14px; border: 1px solid #bfdbfe; border-radius: 14px; color: var(--lists-ink); background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.18); opacity: .96; }
.catalog-category-order-ghost > span { color: var(--lists-muted); }
.catalog-category-order-list article + article { border-top: 1px solid var(--lists-line); }
.catalog-category-order-list article > span { color: var(--lists-muted); }
.catalog-category-order-list article > span svg { width: 19px; }
.catalog-category-drag-handle { width: 24px; height: 40px; display: grid; place-items: center; cursor: grab; touch-action: none; user-select: none; }
.catalog-category-drag-handle:active { cursor: grabbing; }
/* Compact product add control: the form outline is the input outline. */
@media (max-width: 1024px) {
  .item-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px 76px 48px;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--lists-line);
    border-radius: 18px;
    background: #fff;
  }

  .item-form.checklist-item-form {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .item-name-field input,
  .item-name-field input:hover,
  .item-name-field input:focus {
    height: 44px;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
  }

  .quantity-stepper {
    display: grid;
    grid-template-columns: 34px 44px 34px;
    width: 112px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--lists-line);
    border-radius: 12px;
    background: #fff;
  }

  .quantity-stepper button,
  .quantity-stepper button:hover,
  .quantity-stepper button:focus-visible {
    width: 34px;
    height: 42px;
    min-height: 42px;
    flex-basis: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--lists-ink);
    box-shadow: none;
  }

  .quantity-stepper input {
    width: 44px;
    height: 42px;
    min-height: 42px;
    padding: 0;
  }

  .item-unit-select {
    position: relative;
    width: 76px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--lists-line);
    border-radius: 12px;
    color: var(--lists-ink);
    background: #fff;
    cursor: pointer;
  }

  .item-unit-select #item-unit-label {
    min-width: 0;
    color: inherit;
    font-weight: 700;
    line-height: 1;
  }

  .item-unit-select .icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
  }

  .item-unit-select select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  .item-form .button,
  .item-form.checklist-item-form .button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    flex-basis: 48px;
    margin: 0;
    border-radius: 13px;
  }
}

@media (max-width: 520px) {
  .item-form {
    grid-template-columns: minmax(0, 1fr) 104px 68px 48px;
    gap: 6px;
    padding: 8px;
  }

  .quantity-stepper {
    grid-template-columns: 32px 40px 32px;
    width: 104px;
  }

  .quantity-stepper button {
    width: 32px;
    flex-basis: 32px;
  }

  .quantity-stepper input {
    width: 40px;
  }

  .item-unit-select {
    width: 68px;
    gap: 5px;
  }
}

/* Styled unit picker. */
.item-form > .item-unit-select {
  position: relative;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.item-unit-trigger {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: auto 16px;
  place-content: center;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: inherit;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.item-unit-trigger #item-unit-label,
.item-unit-trigger .icon {
  display: block;
  margin: 0;
  line-height: 16px;
}

.item-unit-trigger[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.item-unit-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: 104px;
  overflow: hidden;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.item-unit-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 9px;
  padding: 0 11px;
  color: var(--lists-ink);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.item-unit-menu button:hover,
.item-unit-menu button:focus-visible {
  outline: 0;
  background: #eff6ff;
}

.item-unit-menu button[aria-selected="true"] {
  color: var(--lists-blue);
  background: #eaf2ff;
}

/* Keep the unit text and chevron optically centered inside their control. */
@media (max-width: 1024px) {
  .item-form > label.item-unit-select {
    display: grid !important;
    grid-template-columns: auto 16px;
    place-content: center;
    align-items: center;
    justify-items: center;
    column-gap: 6px;
    padding: 0 8px;
    box-sizing: border-box;
    margin: 0;
    line-height: 1;
  }

  .item-form > label.item-unit-select #item-unit-label,
  .item-form > label.item-unit-select .icon {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 16px;
  }

  .item-form .item-name-field,
  .item-form .quantity-stepper,
  .item-form > label.item-unit-select,
  .item-form #add-item-button {
    align-self: center;
  }

  .item-form .item-name-field,
  .item-form .item-name-field input {
    height: 44px;
  }

  .item-form .item-name-field input {
    line-height: 44px;
  }

  .item-form .quantity-stepper input {
    line-height: 42px;
  }

  .item-form > label.item-unit-select #item-unit-label {
    height: 16px;
    line-height: 16px;
  }

  .item-form .item-name-field,
  .item-form .item-name-field input,
  .item-form .quantity-stepper,
  .item-form > label.item-unit-select,
  .item-form #add-item-button {
    height: 44px;
    min-height: 44px;
  }

  .item-form #add-item-button {
    align-self: center;
  }
}

/* Lists design system — shared application layer */
:root {
  --lists-ink: #0f172a;
  --lists-muted: #64748b;
  --lists-line: #e2e8f0;
  --lists-border: #cbd5e1;
  --lists-surface: #ffffff;
  --lists-page: #f8fafc;
  --lists-green: #0f172a;
  --lists-blue: #3b82f6;
  --lists-red: #ef4444;
  --lists-focus: rgba(59, 130, 246, 0.18);
  --lists-shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.04);
  --lists-shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
}

body { background: var(--lists-page); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--lists-focus); outline-offset: 2px; }
.field input:focus, .field select:focus, .field textarea:focus,
.inline-form input:focus, .create-list-field input:focus, .create-list-field select:focus,
.item-name-field input:focus, .share-panel input:focus, .settings-share-form input:focus {
  border-color: var(--lists-blue); outline: 0; box-shadow: 0 0 0 3px var(--lists-focus);
}

.demo-note, .auth-panel, .sidebar, .workspace, .share-panel {
  border-color: var(--lists-line); background: #fff; box-shadow: var(--lists-shadow-sm);
}
.auth-panel, .sidebar, .workspace { border-radius: 18px; }
.auth-submit, .item-form .button-fill, .create-list-button,
.catalog-create-set-button, .compact-button, .create-list-actions .button-fill {
  border-color: var(--lists-ink); border-radius: 12px; background: var(--lists-ink); color: #fff;
}
.button { border-radius: 12px; text-transform: none; letter-spacing: 0; }
.icon-button { width: 44px; height: 44px; border-color: var(--lists-line); border-radius: 12px; }
.icon-button:hover { border-color: var(--lists-border); background: var(--lists-page); }

.app-view { grid-template-columns: 292px minmax(0, 1fr); gap: 18px; padding: 18px; }
.sidebar { top: 18px; padding: 20px; }
.sidebar-head { padding-bottom: 8px; }
.create-list-button { margin: 18px 0; min-height: 48px; }
.list-tab { min-height: 68px; border-color: transparent; border-radius: 14px; padding: 13px 14px; }
.list-tab:hover { border-color: var(--lists-line); background: var(--lists-page); }
.list-tab.active { border-color: #bfdbfe; background: #eff6ff; }
.list-tab.active span { color: #1d4ed8; }

.workspace { max-width: 1120px; width: 100%; margin-right: auto; padding: 28px; }
.topbar { align-items: center; padding-bottom: 22px; }
.topbar h1 { margin-top: 6px; color: var(--lists-ink); font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.03em; }
.eyebrow, .field span { color: var(--lists-muted); text-transform: none; letter-spacing: 0; }
.list-meta { max-width: 260px; font-size: 13px; }

.quick-add { margin: 20px 0; }
.suggestion { min-height: 40px; border-color: var(--lists-line); padding: 8px 14px; color: var(--lists-ink); background: #fff; }
.suggestion:hover { border-color: #bfdbfe; background: #eff6ff; }
.item-form { margin-top: 18px; padding: 14px; border: 1px solid var(--lists-line); border-radius: 18px; background: #fff; }
.item-name-field input, .field input, .field select, .field textarea,
.inline-form input, .create-list-field input, .create-list-field select, .set-item-form input, .share-panel input {
  border-color: var(--lists-border); border-radius: 12px;
}
.item-name-field input { height: 52px; }
.quantity-stepper { height: 52px; min-height: 52px; border: 1px solid var(--lists-line); border-radius: 12px; }
.quantity-stepper button { width: 48px; height: 48px; flex-basis: 48px; border-radius: 10px; color: var(--lists-ink); background: transparent; }
.quantity-stepper button:hover, .quantity-stepper button:focus-visible { background: var(--lists-page); }
.quantity-stepper input { height: 48px; min-height: 48px; }
.item-form .button { min-height: 52px; border-radius: 14px; }

.items-list, .active-items-list, .purchased-items, .recommendation-items { gap: 0; }
.active-items-list, .purchased-items, .recommendation-items { border: 1px solid var(--lists-line); border-radius: 16px; overflow: hidden; background: #fff; }
.active-items-list:has(.empty-state) { border-style: dashed; }
.item-row { min-height: 72px; border: 0; border-bottom: 1px solid var(--lists-line); border-radius: 0; padding: 12px 14px; }
.item-row:last-child { border-bottom: 0; }
.item-row:hover { border-color: var(--lists-line); background: var(--lists-page); }
.item-row.checklist-row { min-height: 56px; border-radius: 0; }
.product-icon { width: 46px; height: 46px; flex-basis: 46px; border-radius: 12px; background: var(--lists-page); }
.check-button { color: var(--lists-ink); }
.edit-item-button:hover { color: var(--lists-blue); background: #eff6ff; }
.purchased-accordion, .recommendations-accordion { margin-top: 16px; }
.purchased-toggle, .recommendations-toggle { min-height: 54px; border-radius: 16px; background: #fff; }
.recommendations-toggle { border-color: #bfdbfe; color: #2563eb; background: #eff6ff; }
.recommendation-row { border: 0; border-bottom: 1px solid var(--lists-line); border-radius: 0; background: #fff; }
.recommendation-row:last-child { border-bottom: 0; }

.sets-list { gap: 14px; }
.set-card, .catalog-product, .settings-section, .optional-block-card {
  border-color: var(--lists-line); border-radius: 16px; background: #fff; box-shadow: var(--lists-shadow-sm);
}
.set-card { padding: 18px; }
.set-action-button, .catalog-add-button { border-radius: 12px; }
.set-action-button.add { background: var(--lists-ink); }
.set-action-button.edit, .catalog-add-button { color: var(--lists-blue); background: #eff6ff; }
.set-items-preview span { color: var(--lists-muted); background: var(--lists-page); }
.catalog-products { gap: 12px; }
.catalog-product { min-height: 76px; padding: 12px 14px; }
.catalog-group-head small, .purchased-toggle small, .recommendations-toggle small { background: var(--lists-page); }

.settings-grid { gap: 18px; }
.settings-section { padding: 22px; }
.settings-section h3 { color: var(--lists-ink); font-size: 20px; }
.settings-grid > .settings-section:first-child { padding: 24px; background: linear-gradient(135deg, #fff, #f8fbff); }
.settings-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 18px; border: 1px solid var(--lists-line); border-radius: 14px; overflow: hidden; background: #fff; }
.settings-facts > div { padding: 16px; }
.settings-facts > div + div { border-left: 1px solid var(--lists-line); }
.settings-facts dt { color: var(--lists-muted); font-size: 12px; }
.settings-facts dd { margin: 6px 0 0; color: var(--lists-ink); font-weight: 500; }
.settings-feature-toggle { min-height: 68px; border-color: var(--lists-line); border-radius: 14px; }
.danger-section { border-color: #fecaca; background: #fffafa; }
.danger-button { border-color: #fecaca; border-radius: 12px; color: var(--lists-red); background: #fff; }
.create-list-dialog { border-radius: 20px; box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24); }
.create-list-dialog::backdrop { background: rgba(15, 23, 42, 0.56); }
.list-type-option { min-height: 76px; border-color: var(--lists-line); border-radius: 14px; }
.list-type-option:has(input:checked) { border-color: #93c5fd; background: #eff6ff; }
.list-type-option input:checked + .list-type-option-control { border-color: var(--lists-blue); background: var(--lists-blue); }
.item-settings-form { max-width: 920px; margin: 22px auto 0; }
.item-settings-section { border-radius: 18px; }
.item-settings-section-title { color: var(--lists-ink); font-size: 20px; }
.item-icon-setting { border: 1px solid var(--lists-line); border-radius: 16px; padding: 18px; background: var(--lists-page); }
.item-icon-preview { width: 88px; height: 88px; border-radius: 16px; background: #fff; }
.form-actions { position: sticky; bottom: 18px; z-index: 20; padding: 12px; border: 1px solid var(--lists-line); border-radius: 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }

.mobile-app-nav { display: none; }
.mobile-menu-button { display: none; }

.list-progress-card {
  display: grid; gap: 14px; margin-top: 22px; padding: 20px;
  border: 1px solid var(--lists-line); border-radius: 16px; background: #fff;
}
.list-progress-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; }
.list-progress-copy strong { font-size: 15px; }
.list-progress-copy span { color: var(--lists-muted); }
.list-progress-copy b { color: var(--lists-blue); font-size: 18px; font-weight: 500; }
.list-progress-track { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: #eff6ff; }
.list-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lists-blue); transition: width 0.24s ease; }
.items-section-head { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 28px 0 12px; }
.items-section-head h2 { margin: 0; color: var(--lists-ink); font-size: 20px; }
.items-section-head h2 span { margin-left: 5px; color: var(--lists-muted); font-weight: 400; }
.items-section-head > #items-view-label { grid-column: 2; justify-self: end; display: inline-flex; align-items: center; gap: 7px; margin-left: 0; border: 0; padding: 8px 0; color: var(--lists-muted); background: transparent; font-size: 14px; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.items-section-head > #items-view-label:hover,
.items-section-head > #items-view-label:focus-visible,
.items-section-head > #items-view-label[aria-pressed="true"] { color: var(--lists-blue); }
.items-section-head > #items-view-label:disabled { cursor: default; color: var(--lists-muted); }
.items-section-head > #items-view-label .icon,
.items-section-head > #items-view-label svg { width: 17px; height: 17px; flex: 0 0 17px; }

.catalog-mode-tabs { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 22px; padding: 4px; border-radius: 14px; background: var(--lists-page); }
.catalog-mode-tabs button { min-height: 44px; border: 0; border-radius: 11px; color: var(--lists-muted); background: transparent; cursor: pointer; }
.catalog-mode-tabs button.active { color: var(--lists-ink); background: #fff; box-shadow: 0 3px 12px rgba(15, 23, 42, 0.07); }
.catalog-search { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 16px; padding: 0 14px; border: 1px solid var(--lists-line); border-radius: 14px; background: #fff; }
.catalog-search .icon { color: var(--lists-muted); font-size: 20px; }
.catalog-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--lists-ink); background: transparent; }
.catalog-category-filter { display: flex; gap: 8px; margin-top: 12px; padding-block: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; }
.catalog-category-filter::-webkit-scrollbar { display: none; }
.catalog-category-filter button { width: max-content; min-width: max-content; min-height: 36px; flex: 0 0 auto; border: 1px solid var(--lists-line); border-radius: 999px; padding: 0 16px; color: var(--lists-ink); background: #f8fafc; font: inherit; font-size: 13px; font-weight: 400; white-space: nowrap; cursor: pointer; }
.catalog-category-filter button.active { border-color: var(--lists-ink); color: #fff; background: var(--lists-ink); }
#catalog-page .sets-section { display: none; }
#catalog-page.show-sets .sets-section { display: grid; }
#catalog-page.show-sets .products-catalog, #catalog-page.show-sets .catalog-search, #catalog-page.show-sets .catalog-category-filter { display: none; }
#catalog-page.show-sets .catalog-create-set-button { display: inline-flex; }
#catalog-page:not(.show-sets) .catalog-create-set-button { display: none; }
#catalog-page .products-catalog { order: 4; }
#catalog-page .sets-section { order: 4; }

@media (max-width: 820px) {
  body { background: #fff; }
  .app-view { display: block; min-height: 100dvh; padding: 0 0 calc(92px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; display: block; width: min(84vw, 330px); border: 0; border-right: 1px solid var(--lists-line); border-radius: 0; padding: 24px 18px; box-shadow: var(--lists-shadow-md); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-head { display: flex; }
  .create-list-button { display: flex; }
  .lists-nav { display: grid; gap: 8px; margin: 0; overflow: visible; }
  .list-tab { min-width: 0; min-height: 64px; padding: 11px 13px; border: 1px solid transparent; border-radius: 14px; }
  .list-tab small { display: block; }
  .list-tab.active { border-color: #bfdbfe; background: #eff6ff; }
  .list-tab.active span { color: #1d4ed8; }
  .workspace { max-width: none; min-height: calc(100dvh - 144px); margin: 0; border: 0; border-radius: 0; padding: 22px 16px 32px; box-shadow: none; }
  .topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 0; padding: 4px 0 16px; }
  .mobile-menu-button { display: grid; }
  .topbar h1 { font-size: 30px; }
  .topbar .eyebrow { margin-top: 3px; }
  .list-meta { display: none; }
  .topbar-actions { gap: 8px; }
  #list-page .topbar-actions #open-catalog-button { display: none; }
  .list-progress-card { margin-top: 4px; padding: 16px; }
  .list-progress-copy { gap: 12px; }
  .quick-add { margin: 18px 0 12px; }
  .quick-add { overflow: hidden; }
  .default-items { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .item-form { padding: 10px; }
  .item-name-field { flex-basis: 100%; }
  .quantity-stepper { flex: 1 1 auto; }
  .item-form .button { flex: 0 0 56px; width: 56px; font-size: 0; }
  .item-form .button span { display: none; }
  .item-form .button::after { content: "+"; font-size: 28px; font-weight: 400; }
  .item-row { padding-inline: 10px; }
  .item-row .edit-item-button { display: none; }
  .settings-section { padding: 18px; }
  .settings-page .topbar { grid-template-columns: 44px minmax(0, 1fr) 44px; text-align: center; }
  .settings-page .topbar > div:first-child { grid-column: 2; grid-row: 1; }
  .settings-page .topbar > .icon-button { grid-column: 1; grid-row: 1; }
  .settings-page .topbar h1 { font-size: 24px; }
  .settings-page .topbar .eyebrow { display: none; }
  .settings-grid { margin-top: 8px; }
  .settings-grid > .settings-section:first-child { padding: 18px; }
  .settings-facts { grid-template-columns: 1fr; }
  .settings-facts > div + div { border-top: 1px solid var(--lists-line); border-left: 0; }
  .settings-share-form { grid-template-columns: 1fr; }
  .settings-share-form .button { min-height: 48px; }
  .item-settings-form { margin-top: 6px; }
  .item-settings-section { padding: 18px; }
  .item-icon-setting-actions { display: grid; grid-template-columns: 88px minmax(0, 1fr); }
  .item-icon-preview { grid-row: 1 / span 3; }
  .form-actions { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .catalog-page .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-page .topbar > div:first-child { grid-column: 1; }
  .catalog-page .topbar-actions { grid-column: 2; }
  .catalog-mode-tabs { margin-top: 4px; }
  .mobile-app-nav {
    position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid;
    grid-template-columns: repeat(5, 1fr); align-items: end; min-height: 72px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--lists-line);
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(18px);
  }
  .mobile-nav-item { min-width: 0; min-height: 52px; border: 0; display: grid; place-items: center; gap: 3px; padding: 4px; color: var(--lists-muted); background: transparent; font-size: 11px; text-decoration: none; }
  .mobile-nav-item .icon { font-size: 22px; }
  .mobile-nav-item.active { color: var(--lists-blue); }
  .mobile-nav-item:disabled { opacity: 0.35; }
  .mobile-nav-create { align-self: start; width: 58px; height: 58px; justify-self: center; margin-top: -26px; border: 0; border-radius: 19px; color: #fff; background: var(--lists-ink); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24); }
  .mobile-nav-create .icon { font-size: 30px; }
}

@media (max-width: 820px) {
  .auth-view { display: block; max-width: 580px; min-height: 100dvh; padding: 48px 22px 110px; }
  .auth-art { margin-bottom: 34px; }
  .auth-art .brand-mark, .auth-art .demo-note { display: none; }
  .auth-art h1 { margin: 0 0 10px; color: var(--lists-ink); font-size: 38px; letter-spacing: -0.035em; }
  .auth-art p { margin: 0; font-size: 16px; line-height: 1.5; }
  .auth-panel { border: 0; border-radius: 0; padding: 0; box-shadow: none; }
  .auth-mode { border-bottom: 1px solid var(--lists-line); background: transparent; }
  .auth-mode .button { min-height: 52px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; }
  .auth-mode .button-active { border-bottom-color: var(--lists-blue); color: var(--lists-ink); }
  .auth-panel .field { margin-bottom: 18px; }
  .auth-panel .field input { min-height: 56px; }
  .auth-submit { min-height: 56px; margin-top: 8px; }
}

@media (max-width: 520px) {
  .topbar-actions .icon-button { width: 40px; height: 40px; }
  .catalog-create-set-button span { display: none; }
  .catalog-create-set-button { width: 44px; padding: 0; justify-content: center; }
  .sets-list, #optional-blocks-page .optional-blocks-list, .catalog-products { grid-template-columns: 1fr; }
  .item-row strong { font-size: 15px; }
  .item-row span { font-size: 13px; }
  .list-progress-copy span { font-size: 13px; }
  .list-progress-copy b { font-size: 16px; }
  .items-section-head { margin-top: 24px; }
}

.lists-nav {
  display: grid;
  gap: 10px;
}

.list-tab {
  width: 100%;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 13px 14px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.list-tab.active {
  border-color: rgba(37, 115, 90, 0.45);
  background: #eaf5ef;
}

.list-tab span {
  display: block;
  color: var(--lists-ink);
  font-weight: 600;
}

.list-tab small {
  display: block;
  margin-top: 5px;
  color: var(--lists-muted);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--lists-line);
}

.topbar h1 {
  font-size: 34px;
}

.topbar-actions {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.list-meta {
  color: var(--lists-muted);
  text-align: right;
  line-height: 1.5;
}

.quick-add {
  margin: 22px 0;
}

.default-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggestion {
  width: auto;
  flex: 0 0 auto;
  border: 1px solid #c9dcce;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--lists-green);
  background: #f4fbf6;
  cursor: pointer;
}

.item-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  column-gap: 10px;
  row-gap: 10px;
  margin-top: 22px;
}

.quick-add:not(.hidden) + .item-form {
  margin-top: 0;
}

.item-form > * {
  min-width: 0;
}

.item-name-field {
  flex: 1 1 260px;
  position: relative;
}

.item-name-field input {
  height: 56px;
  width: 100%;
}

.suggestion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.suggestion img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.quantity-stepper {
  flex: 0 0 190px;
  height: 56px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  background: transparent;
}

.quantity-stepper button {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0;
  background: #edf6f1;
  color: var(--lists-green);
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.16s, color 0.16s;
}

.quantity-stepper button .icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 22px;
}

.quantity-stepper button:hover,
.quantity-stepper button:focus-visible {
  background: #dceee6;
  outline: none;
}

.quantity-stepper input {
  flex: 0 0 24px;
  height: 56px;
  min-height: 56px;
  width: 24px;
  border: 0;
  padding: 0;
  color: var(--lists-ink);
  font-weight: 800;
  text-align: center;
  background: transparent;
}

.quantity-stepper input:focus {
  outline: none;
}

.quantity-stepper input::-webkit-outer-spin-button,
.quantity-stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

#item-unit-label,
#set-item-unit-label {
  flex: 0 0 auto;
  min-width: 18px;
  color: var(--lists-muted);
  font-weight: 800;
  line-height: 56px;
  text-align: center;
}

.item-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 34px rgba(23, 32, 42, 0.14);
}

.item-suggestion-option {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid #eef2f4;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: var(--lists-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.item-suggestion-option img,
.product-icon-placeholder {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  background: #f3f8f5;
}

.item-suggestion-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.item-suggestions .item-suggestion-option > span:not(.product-icon-placeholder) { display: block; }

.item-suggestion-option small {
  min-width: 34px;
  justify-self: end;
  color: var(--lists-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.item-suggestion-option:last-child {
  border-bottom: 0;
}

.item-suggestion-option:hover,
.item-suggestion-option:focus-visible {
  background: #f4fbf6;
  outline: none;
}

.set-editor-search .item-suggestion-option.is-selected {
  opacity: .58;
  color: var(--lists-muted);
  background: #eef3f8;
  cursor: default;
}
.set-editor-search .item-suggestion-group-label {
  padding: 8px 14px 6px;
  border-top: 1px solid var(--lists-line);
  color: var(--lists-muted);
  background: #f8fafc;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.set-editor-search .item-suggestion-option.is-selected:hover,
.set-editor-search .item-suggestion-option.is-selected:focus-visible {
  background: #eef3f8;
}
.set-editor-search .item-suggestion-option.is-selected small {
  min-width: 62px;
  color: var(--lists-blue);
  font-size: 11px;
  font-weight: 500;
}

.item-form .button {
  flex: 0 0 128px;
  min-height: 56px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.item-form .button:disabled,
.item-name-field input:disabled {
  opacity: 0.65;
  cursor: wait;
}

.button-loader {
  width: 18px;
  height: 18px;
  display: inline-block;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: button-loader-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .button-loader {
    animation-duration: 1.6s;
  }
}

#add-item-button[aria-busy="true"]::before,
#add-item-button[aria-busy="true"]::after { display: none; }

.item-form.checklist-item-form .item-name-field {
  flex: 1 1 420px;
}

.item-form.checklist-item-form .button {
  flex: 0 0 144px;
}

.items-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.active-items-list,
.purchased-items,
.recommendation-items {
  display: grid;
  gap: 10px;
}

.item-row {
  min-height: 62px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s, box-shadow 0.16s;
}

.item-row.checklist-row {
  min-height: 48px;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px;
}

.checklist-drag-handle {
  width: 24px;
  height: 32px;
  flex: 0 0 24px;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  color: #96a1ad !important;
  cursor: grab;
  touch-action: none;
}

.checklist-drag-handle:active {
  cursor: grabbing;
}

.checklist-drag-handle .icon {
  margin: 0;
  font-size: 20px;
  line-height: 1;
}

.checklist-row .check-button,
.checklist-row .edit-item-button,
.checklist-row .delete-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.checklist-row .check-button .icon,
.checklist-row .edit-item-button .icon,
.checklist-row .delete-button .icon {
  font-size: 22px;
}

.checklist-row strong {
  line-height: 1.25;
}

.checklist-row .optional-block-item-label,
.checklist-row .item-note {
  margin-top: 2px;
  line-height: 1.25;
}

.checklist-item-icon-slot {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
}

.checklist-item-icon-slot .product-icon {
  flex: none;
}

.checklist-row.dragging {
  border-color: var(--lists-green);
  background: #eef7f3;
  box-shadow: 0 8px 20px rgba(20, 64, 50, 0.12);
  opacity: 0.55;
}

.product-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  background: #f3f8f5;
}

.item-row:hover {
  border-color: rgba(37, 115, 90, 0.35);
  background: #fbfdfc;
}

.item-row:focus-visible {
  outline: 2px solid rgba(37, 115, 90, 0.32);
  outline-offset: 2px;
}

.item-row div {
  min-width: 0;
  flex: 1;
}

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

.item-row span {
  margin-top: 4px;
  color: var(--lists-muted);
  font-size: 14px;
}

.item-note {
  display: block;
  margin-top: 6px;
  color: #8d98a6;
  font-size: 13px;
  line-height: 1.4;
}

.item-row.checked strong {
  color: var(--lists-muted);
  text-decoration: line-through;
}

.item-row.purchased-item {
  border-color: #e5ebef;
  background: #f8faf9;
  opacity: 0.72;
}

.item-row.purchased-item strong,
.item-row.purchased-item span {
  color: #8792a0;
}

.item-row.purchased-item .check-button,
.item-row.purchased-item .delete-button {
  opacity: 0.72;
}

.purchased-accordion,
.recommendations-accordion {
  margin-top: 8px;
}

.purchased-toggle,
.recommendations-toggle {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--lists-muted);
  background: #f8faf9;
  cursor: pointer;
}

.purchased-toggle span,
.recommendations-toggle span {
  color: var(--lists-ink);
  font-weight: 600;
  text-align: left;
}

.purchased-toggle small,
.recommendations-toggle small {
  min-width: 26px;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--lists-muted);
  background: #eef3f0;
  text-align: center;
}

.purchased-toggle .icon,
.recommendations-toggle .icon {
  font-size: 20px;
}

.purchased-items,
.recommendation-items {
  margin-top: 10px;
}

.recommendations-accordion {
  margin-top: 14px;
}

.recommendations-toggle {
  border-color: #d8e7dc;
  color: #5e7d70;
  background: #f3faf5;
}

.recommendations-toggle small {
  color: #5e7d70;
  background: #e4f1e8;
}

.recommendation-row {
  min-height: 58px;
  border: 1px solid #dcebe0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #244238;
  background: #f7fcf8;
}

.recommendation-marker {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #4f8d71;
  background: #e6f3eb;
}

.recommendation-marker img {
  width: 30px;
  height: 30px;
}

.recommendation-row div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

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

.recommendation-row span {
  margin-top: 3px;
  color: #71857c;
  font-size: 14px;
}

.recommendation-add-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--lists-green);
  background: #e9f5ee;
  cursor: pointer;
}

.recommendation-add-button:hover,
.recommendation-add-button:focus-visible {
  background: #dbeee3;
  outline: none;
}

.catalog-page {
  align-self: start;
}

.catalog-create-set-button {
  width: auto;
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 16px;
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
  white-space: nowrap;
}

.sets-section {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.sets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.set-card {
  border: 1px solid #cfe1d5;
  border-radius: 8px;
  padding: 14px;
  background: #f7fcf8;
}

.set-card-head,
.set-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.set-card-head > div:first-child {
  min-width: 0;
}

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

.set-card small {
  margin-top: 4px;
  color: var(--lists-muted);
}

.set-card-actions {
  flex: 0 0 auto;
}

.set-action-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.set-action-button.add {
  color: #fff;
  background: var(--lists-green);
}

.set-action-button.edit {
  color: var(--lists-green);
  background: #e7f2eb;
}

.set-action-button:hover,
.set-action-button:focus-visible {
  filter: brightness(0.95);
  outline: 2px solid rgba(37, 115, 90, 0.25);
  outline-offset: 2px;
}

.set-items-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.set-items-preview span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #426559;
  background: #e7f2eb;
  font-size: 13px;
}

.products-catalog {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.catalog-group {
  display: grid;
  gap: 10px;
}

.catalog-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-group-head h3 {
  margin: 0;
  color: var(--lists-ink);
  font-size: 18px;
}

.sets-section > .catalog-group-head,
.products-catalog .catalog-group-head { justify-content: flex-start; }
.sets-section > .catalog-group-head h3,
.products-catalog .catalog-group-head h3 { display: inline-flex; align-items: baseline; gap: 6px; }
.sets-section > .catalog-group-head h3 > span,
.sets-section > .catalog-group-head h3 > small,
.products-catalog .catalog-group-head h3 > span,
.products-catalog .catalog-group-head h3 > small { color: var(--lists-muted); font-size: 16px; font-weight: 400; }
.sets-section > .catalog-group-head h3 > small,
.products-catalog .catalog-group-head h3 > small { min-width: 0; border-radius: 0; padding: 0; background: transparent; }

.catalog-group-head small {
  min-width: 28px;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--lists-muted);
  background: #eef3f0;
  text-align: center;
  font-weight: 700;
}

.catalog-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--lists-line);
  border-radius: 16px;
  background: #fff;
}

.catalog-product {
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--lists-line);
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  background: #fff;
  box-shadow: none;
}
.catalog-product:last-child { border-bottom: 0; }
.catalog-product:hover { background: var(--lists-page); }
.catalog-product .product-icon,
.catalog-product .product-icon-placeholder { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; }

.catalog-product div {
  min-width: 0;
  flex: 1;
}

.catalog-product strong,
.catalog-product div > span {
  display: block;
}

.catalog-product div > span {
  margin-top: 2px;
  color: var(--lists-muted);
  font-size: 11px;
  font-weight: 400;
}

.catalog-product-unit { flex: 0 0 auto; color: var(--lists-muted); font-size: 12px; white-space: nowrap; }
.catalog-edit-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--lists-muted);
  background: transparent;
  cursor: pointer;
}
.catalog-edit-button svg { width: 20px; height: 20px; }

.catalog-edit-button:hover,
.catalog-edit-button:focus-visible {
  color: var(--lists-blue);
  background: #eff6ff;
  outline: none;
}

.check-button,
.edit-item-button,
.delete-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.check-button {
  color: var(--lists-green);
}

.edit-item-button {
  color: var(--lists-muted);
  cursor: pointer;
}

.edit-item-button:hover {
  color: var(--lists-green);
  background: #f4fbf6;
}

.delete-button {
  color: var(--lists-red);
  cursor: pointer;
}

.empty-state {
  border: 1px dashed var(--lists-line);
  border-radius: 8px;
  padding: 28px;
  color: var(--lists-muted);
  text-align: center;
}

.settings-page {
  align-self: start;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.settings-section {
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.settings-section h3 {
  margin: 4px 0 16px;
}

.settings-feature-toggle {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  margin: 16px 0 0 !important;
  padding: 14px;
  cursor: pointer;
}

.settings-feature-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 1px 0 0;
  accent-color: var(--lists-green);
}

.settings-feature-toggle strong,
.settings-feature-toggle small {
  display: block;
}

.settings-feature-toggle small {
  margin-top: 4px;
  color: var(--lists-muted);
  font-weight: 400;
  line-height: 1.4;
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-section-head h3 {
  margin-bottom: 0;
}

.compact-button {
  width: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 16px;
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.settings-help {
  margin: 14px 0;
  color: var(--lists-muted);
  line-height: 1.45;
}

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

#optional-blocks-page .optional-blocks-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

#optional-blocks-page .optional-blocks-list > .empty-state {
  grid-column: 1 / -1;
}

.optional-block-card {
  min-height: 68px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--lists-line);
  border-left: 3px solid var(--block-color, var(--lists-green));
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
}

.optional-block-card > div:first-child {
  min-width: 0;
  flex: 1;
}

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

.optional-block-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.optional-block-color-marker {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--block-color, var(--lists-green));
}

.optional-block-card small {
  margin-top: 4px;
  color: var(--lists-muted);
}

.optional-block-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.optional-block-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.optional-block-preview span {
  border: 1px solid var(--lists-line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--lists-muted);
  background: #fff;
  font-size: 13px;
}

.optional-block-color-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.form-section-label {
  display: block;
  color: var(--lists-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.optional-block-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.optional-block-color-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.optional-block-color-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.optional-block-color-option > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: transparent;
  background: var(--option-color);
  box-shadow: 0 0 0 1px var(--lists-line);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.optional-block-color-option input:checked + span {
  color: #fff;
  box-shadow: 0 0 0 2px var(--option-color);
}

.optional-block-color-option input:focus-visible + span {
  outline: 2px solid var(--lists-ink);
  outline-offset: 3px;
}

.optional-block-color-option:hover > span {
  transform: translateY(-1px);
}

.optional-block-color-option small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.optional-block-builder {
  display: grid;
  gap: 10px;
}

.simple-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
}

.simple-add-row input,
.simple-add-row .button {
  min-height: 52px;
  margin: 0;
}

.simple-add-row input {
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
}

.simple-add-row .button {
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.compact-draft-item {
  min-height: 52px;
}

.checklist-block-choices {
  display: grid;
  gap: 10px;
}

.checklist-block-choice {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.checklist-block-choice {
  border-left: 3px solid var(--block-color, var(--lists-green));
}

.checklist-block-choice > div:first-child {
  min-width: 0;
  flex: 1;
}

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

.checklist-block-choice small {
  margin-top: 4px;
  color: var(--lists-muted);
}

.yes-no-choice {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  border-radius: 8px;
  padding: 4px;
  background: #eef3f0;
}

.yes-no-choice button {
  min-width: 58px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--lists-muted);
  background: transparent;
  cursor: pointer;
}

.yes-no-choice button.active {
  color: #fff;
  background: var(--block-color, var(--lists-green));
}

.checklist-block-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.checklist-block-actions .button {
  width: auto;
  min-width: 140px;
  min-height: 44px;
  margin: 0;
}

.checklist-block-actions .button-fill {
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.optional-block-item-label {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 7px;
  color: var(--item-block-color, var(--lists-green)) !important;
  background: color-mix(in srgb, var(--item-block-color, var(--lists-green)) 12%, #fff);
  font-size: 12px;
  line-height: 16px;
}

.checklist-optional-blocks {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--lists-line);
  border-radius: 16px;
  background: #fff;
}

.checklist-optional-blocks-heading {
  display: grid;
  gap: 3px;
}

.checklist-optional-blocks-heading strong {
  font-size: 17px;
  line-height: 22px;
}

.checklist-optional-blocks-heading small {
  color: var(--lists-muted);
  font-size: 13px;
  line-height: 18px;
}

.checklist-optional-block-list {
  display: grid;
  gap: 8px;
}

.checklist-optional-block {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--lists-line);
  border-radius: 13px;
  padding: 5px;
  color: var(--lists-ink);
  background: #fff;
}

.checklist-optional-block.without-edit {
  grid-template-columns: minmax(0, 1fr);
}

.checklist-optional-block:hover {
  border-color: color-mix(in srgb, var(--block-color) 55%, var(--lists-line));
}

.checklist-optional-block-toggle {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  padding: 4px 5px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.checklist-optional-block-toggle:focus-visible,
.checklist-optional-block-edit:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--block-color) 65%, transparent);
  outline-offset: 1px;
}

.checklist-optional-block-icon,
.checklist-optional-block-action {
  display: grid;
  place-items: center;
  color: var(--block-color);
}

.checklist-optional-block-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--block-color) 11%, #fff);
}

.checklist-optional-block-icon svg {
  width: 20px;
  height: 20px;
}

.checklist-optional-block-title strong,
.checklist-optional-block-title small {
  display: block;
}

.checklist-optional-block-title small {
  margin-top: 3px;
  color: var(--lists-muted);
  font-size: 12px;
  line-height: 16px;
}

.checklist-optional-block-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--lists-slate);
}

.checklist-optional-block-action svg {
  width: 21px;
  height: 21px;
}

.checklist-optional-block-edit {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: var(--lists-muted);
  background: transparent;
}

.checklist-optional-block-edit:hover {
  color: var(--lists-ink);
  background: var(--lists-page);
}

.checklist-optional-block-edit svg {
  width: 20px;
  height: 20px;
}

.checklist-optional-block.enabled {
  border-color: color-mix(in srgb, var(--block-color) 60%, var(--lists-line));
  background: color-mix(in srgb, var(--block-color) 5%, #fff);
}

.checklist-optional-block.enabled .checklist-optional-block-action {
  color: #fff;
  background: var(--block-color);
}

.item-settings-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.item-settings-section {
  display: grid;
  gap: 14px;
}

.item-settings-section-title {
  margin: 0;
  color: var(--lists-ink);
  font-size: 18px;
  line-height: 1.3;
}

.item-settings-section-heading {
  display: grid;
  gap: 4px;
}

.item-settings-section-heading p {
  margin: 0;
  color: var(--lists-muted);
  line-height: 1.45;
}

.item-settings-form .field {
  margin: 0;
}

.item-settings-form .checkbox-line {
  margin: 0;
}

.item-settings-field-label {
  display: block;
  color: var(--lists-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.item-icon-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--lists-line);
  padding-top: 16px;
}

.item-icon-setting > div:first-child {
  min-width: 0;
}

.item-icon-setting small {
  display: block;
  margin-top: 4px;
  color: var(--lists-muted);
}

.item-icon-setting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.item-icon-setting-actions .button {
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border-color: var(--lists-line);
  color: var(--lists-ink);
  background: #fff;
}

.item-icon-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lists-line);
  border-radius: 10px;
  color: var(--lists-green);
  background: #fff;
}

.item-icon-preview img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.item-icon-preview .custom-item-image-preview {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: cover;
}

.item-icon-preview svg {
  width: 28px;
  height: 28px;
}

.item-icon-preview .placeholder {
  color: #a8b2bc;
}

.item-row .lucide-product-icon {
  display: grid;
  place-items: center;
  align-self: center;
  margin: 0;
  color: var(--lists-green);
  line-height: 0;
}

.item-row .lucide-product-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.item-row .custom-product-image {
  display: block;
  align-self: center;
  object-fit: cover;
  overflow: hidden;
}

.item-icon-picker-dialog {
  width: min(1120px, calc(100% - 32px));
  height: min(760px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--lists-ink);
  background: #fff;
  box-shadow: 0 24px 80px rgba(29, 44, 38, 0.24);
  overflow: hidden;
}

.item-icon-picker-dialog::backdrop {
  background: rgba(22, 32, 28, 0.55);
}

.item-icon-picker-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.set-system-image-shell { grid-template-rows: auto auto minmax(0, 1fr); }
.set-system-image-shell > .item-icon-results { border-top: 1px solid var(--lists-line); }
.set-system-image-option img { width: 44px; height: 44px; object-fit: contain; }

.item-icon-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}

.item-icon-picker-header h2 {
  margin: 4px 0 0;
}

.item-icon-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  margin: 0 22px 16px;
  padding: 0 14px;
  color: var(--lists-muted);
  background: #fff;
}

.item-icon-search svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

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

.item-icon-picker-content {
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-top: 1px solid var(--lists-line);
}

.item-icon-categories {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid var(--lists-line);
  padding: 14px 12px;
  overflow-y: auto;
}

.item-icon-category {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--lists-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.item-icon-category svg {
  width: 19px;
  height: 19px;
}

.item-icon-category:hover,
.item-icon-category.active {
  color: var(--lists-green);
  background: #edf6f1;
}

.item-icon-results {
  min-width: 0;
  min-height: 0;
  padding: 16px 18px 20px;
  overflow-y: auto;
}

.item-icon-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.item-icon-results-head small {
  color: var(--lists-muted);
}

.item-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.item-icon-option {
  min-width: 0;
  min-height: 82px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 8px 6px;
  color: var(--lists-ink);
  background: #fff;
  cursor: pointer;
}

.item-icon-option:hover,
.item-icon-option:focus-visible,
.item-icon-option.selected {
  border-color: var(--lists-green);
  color: var(--lists-green);
  background: #f8fcfa;
  outline: none;
}

.item-icon-option svg {
  width: 25px;
  height: 25px;
}

.item-icon-option span {
  width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-icon-empty {
  grid-column: 1 / -1;
}

#load-more-item-icons-button {
  width: auto;
  min-width: 160px;
  min-height: 42px;
  margin: 16px auto 0;
  padding: 0 16px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--lists-ink);
}

.checkbox-line input {
  margin-top: 3px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions .button {
  min-height: 46px;
  min-width: 150px;
  margin: 0;
}

.form-actions .button-fill {
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.settings-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.settings-facts div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--lists-line);
  padding-bottom: 10px;
}

.settings-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-facts dt {
  color: var(--lists-muted);
}

.settings-facts dd {
  margin: 0;
  color: var(--lists-ink);
  font-weight: 600;
  text-align: right;
}

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

.settings-share-form input {
  min-height: 46px;
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--lists-ink);
}

.settings-share-form .button-fill {
  width: 100%;
  margin: 0;
  border-color: var(--lists-green);
  background: var(--lists-green);
  color: #fff;
}

.shared-users-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.shared-user {
  border: 1px solid var(--lists-line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8faf9;
}

.shared-user span,
.shared-user small {
  display: block;
}

.shared-user span {
  color: var(--lists-ink);
  font-weight: 600;
}

.shared-user small {
  margin-top: 3px;
  color: var(--lists-muted);
}

.empty-state.compact {
  padding: 16px;
}

.danger-section {
  border-color: rgba(183, 53, 53, 0.28);
  background: #fffafa;
}

.danger-section p {
  margin: 0 0 16px;
  color: var(--lists-muted);
  line-height: 1.5;
}

.danger-button {
  min-height: 46px;
  border-color: var(--lists-red);
  background: var(--lists-red);
  color: #fff;
}

.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .auth-view,
  .app-view {
    grid-template-columns: 1fr;
  }

  .auth-view {
    align-content: start;
    gap: 22px;
    padding: 20px;
  }

  .auth-art h1 {
    font-size: 42px;
  }

  .app-view {
    padding: 12px;
  }

  .sidebar {
    position: static;
  }

  .topbar,
  .item-row {
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-create-set-button {
    flex: 1;
    width: auto;
  }

  .sets-list {
    grid-template-columns: 1fr;
  }

  #optional-blocks-page .optional-blocks-list {
    grid-template-columns: 1fr;
  }

  .list-meta {
    text-align: left;
  }

  .item-form,
  .settings-grid,
  .settings-share-form,
  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .item-form {
    display: flex;
  }

  .item-form .button {
    flex: 1 1 100%;
  }

  .item-form.checklist-item-form .button {
    flex: 1 1 100%;
  }

  .settings-section-head,
  .checklist-block-choice {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-button,
  .yes-no-choice,
  .checklist-block-actions .button {
    width: 100%;
  }

  .yes-no-choice button {
    flex: 1;
  }

  .checklist-block-actions {
    flex-direction: column;
  }

  .item-icon-setting {
    align-items: flex-start;
    flex-direction: column;
  }

  .item-icon-setting-actions {
    width: 100%;
  }

  .item-icon-setting-actions .button {
    flex: 1;
  }

  .item-icon-picker-dialog {
    width: calc(100% - 16px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  .item-icon-picker-header {
    padding: 14px 14px 10px;
  }

  .item-icon-search {
    margin: 0 14px 12px;
  }

  .item-icon-picker-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .item-icon-categories {
    display: flex;
    gap: 8px;
    border-right: 0;
    border-bottom: 0;
    padding: 8px 14px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 14px;
    scrollbar-width: none;
  }
  .item-icon-categories::-webkit-scrollbar { display: none; }

  .item-icon-category {
    width: auto;
    min-width: max-content;
    min-height: 40px;
    display: inline-flex;
    grid-template-columns: none;
    gap: 8px;
    border-radius: 999px;
    padding: 0 14px;
    color: var(--lists-ink);
    background: #f3f6fa;
    font-size: 13px;
    font-weight: 400;
  }
  .item-icon-category svg { width: 18px; height: 18px; }
  .item-icon-category:hover,
  .item-icon-category.active {
    color: var(--lists-blue);
    background: #eaf2ff;
  }

  .item-icon-results {
    padding: 12px;
  }
}

@media (max-width: 520px) {
  .simple-add-row {
    grid-template-columns: 1fr;
  }

  .item-icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Final responsive composition: keep reference layout above legacy theme rules */
.lists-shell, .lists-shell * { box-sizing: border-box; }
.app-view { width: 100%; }
.workspace { max-width: none; width: 100%; margin: 0; }

@media (max-width: 1024px) {
  body { background: #fff; }
  .app-view { display: block; min-height: 100dvh; padding: 0 0 calc(92px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; display: block; width: min(84vw, 330px); height: 100dvh; margin: 0; border: 0; border-right: 1px solid var(--lists-line); border-radius: 0; padding: 24px 18px; overflow-y: auto; background: #fff; box-shadow: var(--lists-shadow-md); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-head { display: flex; }
  .create-list-button { display: flex; }
  .lists-nav { display: grid; gap: 8px; margin: 0; overflow: visible; }
  .list-tab { min-width: 0; min-height: 64px; padding: 11px 13px; border: 1px solid transparent; border-radius: 14px; }
  .list-tab small { display: block; }
  .list-tab.active { border-color: #bfdbfe; background: #eff6ff; }
  .list-tab.active span { color: #1d4ed8; }
  .workspace { max-width: none; width: 100%; min-height: calc(100dvh - 92px); margin: 0; border: 0; border-radius: 0; padding: 22px 16px 32px; background: #fff; box-shadow: none; }
  .topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 0; padding: 4px 0 16px; }
  .mobile-menu-button { display: grid; }
  .topbar h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.12; }
  .topbar .eyebrow { margin-top: 3px; }
  .list-meta { display: none; }
  .topbar-actions { gap: 8px; }
  #list-page .topbar-actions #open-catalog-button { display: none; }
  .list-progress-card { margin-top: 4px; padding: 16px; }
  .quick-add { margin: 18px 0 12px; overflow: hidden; }
  .default-items { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .item-form { display: flex; margin-top: 0; padding: 10px; }
  .item-form:not(.checklist-item-form) { flex-wrap: nowrap; }
  .item-name-field { flex: 1 1 140px; }
  .quantity-stepper { flex: 0 0 116px; }
  .quantity-stepper button { width: 36px; height: 48px; flex-basis: 36px; }
  .item-form .button, .item-form.checklist-item-form .button { flex: 0 0 56px; width: 56px; min-width: 56px; font-size: 0; }
  .item-form .button span { display: none; }
  .item-form .button::after { content: "+"; font-size: 28px; font-weight: 400; }
  .items-section-head { margin-top: 24px; }
  .item-row { padding-inline: 10px; }
  .item-row .edit-item-button, .item-row .delete-button { display: grid; width: 34px; height: 34px; flex: 0 0 34px; }
  .mobile-app-nav { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; min-height: 72px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--lists-line); background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
  .mobile-nav-item { min-width: 0; min-height: 52px; border: 0; display: grid; place-items: center; gap: 3px; padding: 4px; color: var(--lists-muted); background: transparent; font-size: 11px; text-decoration: none; }
  .mobile-nav-item .icon { font-size: 22px; }
  .mobile-nav-item.active { color: var(--lists-blue); }
  .mobile-nav-item:disabled { opacity: .35; }
  .mobile-nav-create { align-self: start; width: 58px; height: 58px; justify-self: center; margin-top: -26px; border: 0; border-radius: 19px; color: #fff; background: var(--lists-ink); box-shadow: 0 12px 28px rgba(15,23,42,.24); }
  .mobile-nav-create .icon { font-size: 30px; }
  .catalog-page .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-page .topbar > div:first-child { grid-column: 1; }
  .catalog-page .topbar-actions { grid-column: 2; }
  .catalog-mode-tabs { margin-top: 4px; }
  .settings-page .topbar { grid-template-columns: 44px minmax(0, 1fr) 44px; text-align: center; }
  .settings-page .topbar > div:first-child { grid-column: 2; grid-row: 1; }
  .settings-page .topbar > .icon-button { grid-column: 1; grid-row: 1; }
  .settings-page .topbar h1 { font-size: 24px; }
  .settings-page .topbar .eyebrow { display: none; }
  .settings-grid { margin-top: 8px; }
  .settings-facts { grid-template-columns: 1fr; }
  .settings-facts > div + div { border-top: 1px solid var(--lists-line); border-left: 0; }
  .settings-share-form { grid-template-columns: 1fr; }
  .settings-feature-toggle input { appearance: none; width: 48px; height: 28px; flex-basis: 48px; border: 0; border-radius: 999px; background: radial-gradient(circle at 10px 50%,#fff 0 8px,transparent 9px),#cbd5e1; transition: background .18s ease; }
  .settings-feature-toggle input:checked { background: radial-gradient(circle at 38px 50%,#fff 0 8px,transparent 9px),var(--lists-ink); }
  .item-settings-form { margin-top: 6px; }
  .form-actions { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  .topbar-actions .icon-button { width: 40px; height: 40px; }
  .catalog-create-set-button span { display: none; }
  .catalog-create-set-button { width: 44px; padding: 0; justify-content: center; }
  .sets-list, #optional-blocks-page .optional-blocks-list, .catalog-products { grid-template-columns: 1fr; }
  .list-progress-copy { gap: 10px; }
  .list-progress-copy span { font-size: 13px; }
  .list-progress-copy b { font-size: 16px; }
  .item-form { gap: 6px; padding: 8px; }
  .item-name-field input { padding-inline: 10px; }
}

/* Mobile item groups use one shared outline with simple row dividers. */
@media (max-width: 1024px) {
  .active-items-list,
  .purchased-items,
  .recommendation-items {
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--lists-line);
    border-radius: 16px;
    background: #fff;
  }

  .active-items-list .item-row,
  .purchased-items .item-row,
  .recommendation-items .item-row {
    border: 0;
    border-bottom: 1px solid var(--lists-line);
    border-radius: 0;
    box-shadow: none;
  }

  .active-items-list .item-row:last-child,
  .purchased-items .item-row:last-child,
  .recommendation-items .item-row:last-child {
    border-bottom: 0;
  }

  .active-items-list .item-row:not(.checklist-row),
  .purchased-items .item-row:not(.checklist-row) {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(56px, auto) auto;
    align-items: center;
    gap: 6px;
    min-height: 72px;
    padding: 8px 10px;
  }

  .item-row .item-copy {
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .item-row .item-copy strong {
    line-height: 1.2;
  }

  .item-row .item-category-chip {
    width: fit-content;
    margin: 0;
    border-radius: 7px;
    padding: 4px 8px;
    color: #3b82f6;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1;
  }

  .item-row .item-quantity {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    color: var(--lists-muted);
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
  }

  .item-row .item-quantity-value {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    font-weight: 400;
  }

  .item-row .item-quantity-unit {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
  }

  .item-row .item-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
  }

  .item-row .edit-item-button,
  .item-row .delete-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 10px;
  }

  .item-row .edit-item-button svg,
  .item-row .delete-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.7;
  }

  .item-row .edit-item-button,
  .item-row .delete-button {
    color: #526079;
  }

  .item-row .edit-item-button:hover,
  .item-row .edit-item-button:focus-visible {
    color: var(--lists-blue);
    background: #eff6ff;
  }

  .item-row .delete-button:hover,
  .item-row .delete-button:focus-visible {
    color: var(--lists-red);
    background: #fff1f2;
  }
}

@media (max-width: 520px) {
  .active-items-list .item-row:not(.checklist-row),
  .purchased-items .item-row:not(.checklist-row) {
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    gap: 4px;
    padding-inline: 8px;
  }

  .item-row .edit-item-button,
  .item-row .delete-button {
    width: 36px;
    height: 44px;
    flex-basis: 36px;
  }

  .item-row .item-actions {
    gap: 2px;
  }
}

/* Purchased items are one continuous accordion, matching the mobile reference. */
.product-icon {
  background: transparent;
}

@media (max-width: 1024px) {
  .purchased-accordion {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--lists-line);
    border-radius: 16px;
    background: #fff;
  }

  .purchased-toggle {
    min-height: 54px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    border: 0;
    border-radius: 0;
    padding: 0 14px;
    color: var(--lists-ink);
    background: transparent;
  }

  .purchased-accordion.is-open .purchased-toggle {
    border-bottom: 1px solid var(--lists-line);
  }

  .purchased-toggle .purchased-toggle-main,
  .purchased-toggle .purchased-toggle-action {
    display: flex;
    align-items: center;
    margin: 0;
  }

  .purchased-toggle .purchased-toggle-main {
    min-width: 0;
    gap: 8px;
  }

  .purchased-toggle .purchased-toggle-status {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    color: var(--lists-ink);
    stroke-width: 1.8;
  }

  .purchased-toggle .purchased-toggle-title {
    color: var(--lists-ink);
    font-size: 16px;
    font-weight: 500;
  }

  .purchased-toggle .purchased-toggle-dot {
    color: var(--lists-muted);
  }

  .purchased-toggle .purchased-toggle-main small {
    min-width: 0;
    margin: 0;
    border-radius: 0;
    padding: 0;
    color: var(--lists-muted);
    background: transparent;
    font-size: 15px;
    font-weight: 400;
  }

  .purchased-toggle .purchased-toggle-action {
    justify-content: flex-end;
    gap: 8px;
    color: var(--lists-muted);
    font-size: 13px;
    font-weight: 400;
  }

  .purchased-toggle .purchased-toggle-action svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
  }

  .purchased-items {
    margin-top: 0;
    border: 0;
    border-radius: 0;
  }

  .purchased-items .item-row,
  .purchased-items .item-row.purchased-item,
  .purchased-items .item-row:hover {
    border-bottom: 0;
    background: transparent;
  }
}

/* Final mobile geometry for the compact add-item control. */
@media (max-width: 1024px) {
  .item-form,
  .item-form:not(.checklist-item-form) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px 76px 48px;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--lists-line);
    border-radius: 18px;
    background: #fff;
  }

  .item-form.checklist-item-form {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .item-name-field input,
  .item-name-field input:hover,
  .item-name-field input:focus {
    height: 44px;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
  }

  .quantity-stepper {
    display: grid;
    grid-template-columns: 34px 44px 34px;
    width: 112px;
    height: 44px;
    min-height: 44px;
    flex: none;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--lists-line);
    border-radius: 12px;
    background: #fff;
  }

  .quantity-stepper button,
  .quantity-stepper button:hover,
  .quantity-stepper button:focus-visible {
    width: 34px;
    height: 42px;
    min-height: 42px;
    flex-basis: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--lists-ink);
    box-shadow: none;
  }

  .quantity-stepper input {
    width: 44px;
    height: 42px;
    min-height: 42px;
    padding: 0;
  }

  .item-unit-select {
    position: relative;
    width: 76px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--lists-line);
    border-radius: 12px;
    color: var(--lists-ink);
    background: #fff;
    cursor: pointer;
  }

  .item-unit-select #item-unit-label {
    min-width: 0;
    color: inherit;
    font-weight: 700;
    line-height: 1;
  }

  .item-unit-select .icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
  }

  .item-unit-select select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  .item-form .button,
  .item-form.checklist-item-form .button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    flex: none;
    margin: 0;
    border-radius: 13px;
  }
}

@media (max-width: 520px) {
  .item-form,
  .item-form:not(.checklist-item-form) {
    grid-template-columns: minmax(0, 1fr) 104px 68px 48px;
    gap: 6px;
    padding: 8px;
  }

  .item-form.checklist-item-form {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .quantity-stepper {
    grid-template-columns: 32px 40px 32px;
    width: 104px;
  }

  .quantity-stepper button {
    width: 32px;
    flex-basis: 32px;
  }

  .quantity-stepper input {
    width: 40px;
  }

  .item-unit-select {
    width: 68px;
    gap: 5px;
  }
}

/* The custom unit menu must render above the list instead of being clipped. */
.item-form > .item-unit-select {
  overflow: visible;
  margin: 0;
  padding: 0;
}

/* Borderless quick-add pills from the mobile product-list pattern. */
.quick-add .suggestion {
  min-height: 44px;
  gap: 9px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--lists-ink);
  background: #f3f6fa;
  box-shadow: none;
}

.quick-add .suggestion:hover,
.quick-add .suggestion:focus-visible {
  border: 0;
  outline: 0;
  color: var(--lists-ink);
  background: #eaf2ff;
}

.quick-add .suggestion img {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.quick-add .default-items {
  margin-top: 0;
}

/* Compact list-section heading used by the mobile reference. */
@media (max-width: 1024px) {
  .items-section-head {
    margin-inline: 0;
  }

  .items-section-head h2 {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
  }

  .items-section-head h2 .items-head-dot,
  .items-section-head h2 #active-items-count {
    margin: 0;
    color: var(--lists-muted);
    font-size: 16px;
    font-weight: 400;
  }

  .items-section-head > #items-view-label {
    grid-column: 2;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    padding: 8px 0;
    color: var(--lists-muted);
    background: transparent;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
  }

  .items-section-head > #items-view-label:hover,
  .items-section-head > #items-view-label:focus-visible,
  .items-section-head > #items-view-label[aria-pressed="true"] { color: var(--lists-blue); }

  .items-section-head > #items-view-label:disabled { cursor: default; color: var(--lists-muted); }

  .items-section-head > #items-view-label .icon {
    width: 15px;
    height: 15px;
    font-size: 15px;
    line-height: 15px;
  }

  .items-section-head > #items-view-label svg { width: 16px; height: 16px; flex-basis: 16px; }
}

.active-items-category-groups { display: grid; gap: 20px; }
.active-items-category-group { display: grid; gap: 10px; }
.active-items-category-group .catalog-group-head { justify-content: flex-start; }
.active-items-category-group .catalog-group-head h3 { display: inline-flex; align-items: baseline; gap: 6px; font-size: 18px; }
.active-items-category-group .catalog-group-head h3 > span,
.active-items-category-group .catalog-group-head h3 > small { min-width: 0; padding: 0; color: var(--lists-muted); background: transparent; font-size: 16px; font-weight: 400; }

.recent-page-description {
  margin: 4px 0 20px;
  color: var(--lists-muted);
  font-size: 14px;
  line-height: 20px;
}

.recent-lists {
  display: grid;
  gap: 8px;
}

.recent-list-card {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  padding: 8px 12px;
  color: var(--lists-ink);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.recent-list-card:hover,
.recent-list-card:focus-visible {
  border-color: #bfdbfe;
  background: #f8faff;
  outline: 0;
}

.recent-list-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--lists-blue);
  background: #eaf2ff;
}

.recent-list-icon .icon { font-size: 21px; }
.recent-list-copy { min-width: 0; display: grid; gap: 4px; }
.recent-list-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recent-list-copy small { color: var(--lists-muted); font-size: 12px; }
.recent-list-chevron { justify-self: end; color: var(--lists-muted); font-size: 16px; }

@media (max-width: 1024px) {
  .recent-page .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar .sidebar-other {
    display: none;
  }
}

/* Desktop sidebar uses the same structured list items as the mobile drawer. */
@media (min-width: 1025px) {
  .sidebar { display: grid; grid-template-rows: auto auto auto auto; align-content: start; }
  .lists-nav { align-content: start; }
  .list-tab { min-height: 68px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 8px 10px; }
  .list-tab-icon { width: 36px; height: 36px; display: grid !important; place-items: center; border-radius: 10px; color: var(--lists-ink); background: #f4f7fb; }
  .list-tab.active .list-tab-icon { color: var(--lists-blue); background: #eaf2ff; }
  .list-tab-icon .icon,
  .list-tab-icon svg { width: 20px; height: 20px; font-size: 20px; }
  .list-tab-copy { min-width: 0; display: grid !important; gap: 3px; }
  .list-tab-copy strong { overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .list-tab-copy small { margin: 0; font-size: 12px; line-height: 1.2; }
  .list-tab-chevron { color: var(--lists-muted); font-size: 16px; }
  .sidebar-other { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--lists-line); }
  .sidebar-other-label { display: block; margin: 0 4px 4px; color: var(--lists-muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .sidebar-other button { width: 100%; min-height: 44px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 10px; border: 0; border-radius: 12px; padding: 0 6px 0 2px; color: var(--lists-muted); background: transparent; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
  .sidebar-other button:hover,
  .sidebar-other button:focus-visible { color: var(--lists-ink); background: #f3f6fa; }
  .sidebar-other button .icon:first-child { font-size: 20px; }
  .sidebar-other button .icon:last-child { justify-self: end; font-size: 15px; }
}

/* Reference mobile drawer. */
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar {
    z-index: 90;
    width: min(88vw, 720px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    align-content: start;
    padding: 28px 26px calc(24px + env(safe-area-inset-bottom));
    overflow: hidden;
    border: 0;
    border-radius: 0 22px 22px 0;
    box-shadow: 20px 0 56px rgba(15, 23, 42, 0.14);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: block;
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(2px);
    transition: opacity 0.22s ease;
  }

  .sidebar.mobile-open + .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-head {
    align-items: flex-start;
    padding: 0;
  }

  .sidebar-head .eyebrow {
    color: var(--lists-muted);
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
  }

  .sidebar-head h2 {
    margin-top: 5px;
    font-size: 30px;
    line-height: 1.1;
  }

  .sidebar-head .icon-button {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }

  .sidebar-head .icon-button .icon {
    font-size: 27px;
  }

  .create-list-button {
    min-height: 60px;
    margin: 28px 0 24px;
    border-radius: 16px;
    gap: 14px;
    font-size: 16px;
    font-weight: 600;
  }

  .create-list-button .icon {
    font-size: 23px;
  }

  .lists-nav {
    min-height: 0;
    align-content: start;
    gap: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
  }

  .list-tab {
    min-height: 82px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 14px;
    padding: 11px 16px 11px 12px;
    border: 1px solid var(--lists-line);
    border-radius: 18px;
    background: #fff;
  }

  .list-tab:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
  }

  .list-tab.active {
    border-color: #60a5fa;
    background: #f4f8ff;
  }

  .list-tab-icon {
    width: 56px;
    height: 56px;
    display: grid !important;
    place-items: center;
    border-radius: 16px;
    color: var(--lists-ink);
    background: #f4f7fb;
  }

  .list-tab.active .list-tab-icon {
    color: var(--lists-blue);
    background: #eaf2ff;
  }

  .list-tab-icon .icon {
    font-size: 27px;
  }

  .list-tab-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .list-tab-copy {
    min-width: 0;
    display: grid !important;
    gap: 5px;
  }

  .list-tab-copy strong {
    overflow: hidden;
    color: var(--lists-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .list-tab.active .list-tab-copy strong {
    color: #2563eb;
  }

  .list-tab-copy small {
    margin: 0;
    color: var(--lists-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
  }

  .list-tab-chevron {
    color: var(--lists-muted);
    font-size: 19px;
  }

  .sidebar-other {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--lists-line);
  }

  .sidebar-other-label {
    display: block;
    margin: 0 4px 8px;
    color: var(--lists-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .sidebar-other button {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 12px;
    padding: 0 8px 0 4px;
    color: var(--lists-muted);
    background: transparent;
    font-size: 15px;
    text-align: left;
  }

  .sidebar-other button:hover,
  .sidebar-other button:focus-visible {
    color: var(--lists-ink);
    background: #f3f6fa;
  }

  .sidebar-other button .icon:first-child {
    font-size: 23px;
  }

  .sidebar-other button .icon:last-child {
    justify-self: end;
    font-size: 17px;
  }
}

@media (min-width: 600px) and (max-width: 1024px) {
  .sidebar {
    width: min(64vw, 720px);
  }
}

/* Smart Minimalist v5 master sizing specification. */
:root {
  --lists-content-padding: 20px;
  --lists-space-1: 4px;
  --lists-space-2: 8px;
  --lists-space-3: 16px;
  --lists-space-4: 24px;
  --lists-section-gap: 32px;
  --lists-radius-small: 12px;
  --lists-radius-regular: 16px;
  --lists-radius-feature: 20px;
  --lists-control-height: 56px;
  --lists-control-compact: 48px;
  --lists-row-height: 68px;
  --lists-icon-size: 24px;
  --lists-card-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

body,
button,
input,
select,
textarea {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 1024px) {
  .quick-add {
    margin-inline: calc(var(--lists-content-padding) * -1);
    overflow: visible;
  }

  .quick-add .default-items {
    padding-inline: var(--lists-content-padding);
    scroll-padding-inline: var(--lists-content-padding);
    scrollbar-width: none;
  }

  .quick-add .default-items::-webkit-scrollbar {
    display: none;
  }

  .quick-add.hidden + .item-form {
    margin-top: 16px;
  }

  .workspace {
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 106px);
    margin-inline: 0;
    padding: 8px var(--lists-content-padding) 32px;
  }

  .topbar {
    min-height: 48px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 4px 0 10px;
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar h1 {
    overflow: hidden;
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 30px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .icon-button,
  .mobile-menu-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
  }

  .topbar .icon-button .icon,
  .mobile-menu-button .icon {
    font-size: 22px;
  }

  .topbar .eyebrow {
    margin-top: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
  }

  .topbar .list-context {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--lists-muted);
  }

  .topbar .list-context > .icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 20px;
    line-height: 20px;
  }

  .list-progress-card {
    min-height: 68px;
    gap: 10px;
    margin-top: 2px;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: var(--lists-card-shadow);
  }

  .list-progress-copy {
    gap: 10px;
  }

  .list-progress-copy strong {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
  }

  .list-progress-copy span {
    font-size: 12px;
    line-height: 16px;
  }

  .list-progress-copy b {
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
  }

  .list-progress-track,
  .ui-progress,
  progress {
    height: 4px;
  }

  .quick-add .suggestion {
    min-height: 36px;
    height: 36px;
    padding-inline: 14px;
    gap: 8px;
  }

  .item-form,
  .item-form:not(.checklist-item-form) {
    grid-template-columns: minmax(0, 1fr) 104px 68px 48px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .item-form .item-name-field {
    grid-column: auto;
    width: 100%;
    height: 48px;
    min-height: 48px;
    border-bottom: 0;
  }

  .item-form .item-name-field input {
    height: 48px;
    min-height: 48px;
    padding-inline: 10px;
    font-size: 16px;
    line-height: 48px;
  }

  .item-form .quantity-stepper {
    width: 104px;
    height: 48px;
    min-height: 48px;
    grid-template-columns: 32px 40px 32px;
    border-radius: 13px;
  }

  .item-form .quantity-stepper button,
  .item-form .quantity-stepper input {
    height: 46px;
    min-height: 46px;
  }

  .item-form .quantity-stepper button {
    width: 32px;
    flex-basis: 32px;
  }

  .item-form .quantity-stepper input {
    width: 40px;
    line-height: 46px;
  }

  .item-form > .item-unit-select {
    width: 68px;
    height: 48px;
    min-height: 48px;
    border-radius: 13px;
  }

  .item-form #add-item-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    border-radius: 13px;
  }

  .items-section-head {
    margin-top: 28px;
  }

  .active-items-list .item-row:not(.checklist-row),
  .purchased-items .item-row:not(.checklist-row) {
    min-height: var(--lists-row-height);
    grid-template-columns: 40px minmax(0, 1fr) minmax(54px, auto) auto;
    gap: 8px;
    padding: 8px 14px;
  }

  .item-row .check-button {
    width: 24px;
    height: 24px;
    min-height: 24px;
  }

  .item-row .product-icon,
  .item-row .custom-product-image,
  .item-row .lucide-product-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .checklist-item-icon-slot {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .item-row .item-copy strong {
    font-size: 15px;
    line-height: 20px;
  }

  .item-row .item-category-chip {
    font-size: 12px;
    line-height: 16px;
  }

  .item-row .item-quantity-value {
    font-size: 15px;
  }

  .item-row .edit-item-button svg,
  .item-row .delete-button svg {
    width: 22px;
    height: 22px;
  }

  .purchased-toggle {
    min-height: 48px;
  }

  .checklist-row,
  .checklist-optional-block-items .checklist-row {
    min-height: 58px;
    padding-inline: 14px;
  }

  .checklist-row .check-button,
  .checklist-optional-block-items .check-button {
    display: none;
  }

  .checklist-drag-handle {
    width: 20px;
    height: 20px;
  }

  .checklist-row strong {
    font-size: 16px;
  }

  .checklist-optional-block {
    min-height: 68px;
    border-radius: 16px;
  }

  .catalog-search {
    position: relative;
    display: block;
    min-height: 52px;
    padding: 0 14px 0 44px;
    border-radius: 14px;
  }

  .catalog-mode-tabs {
    padding: 1px;
    border-radius: 14px;
  }

  .catalog-mode-tabs button {
    min-height: 44px;
    border-radius: 12px;
  }

  .catalog-mode-tabs button.active {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  }

  .catalog-search .icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    margin: 0;
    font-size: 20px;
    line-height: 20px;
    transform: translateY(-50%);
  }

  .catalog-search input {
    width: 100%;
    height: 50px;
    min-height: 50px;
    margin: 0;
    padding: 0;
    font-weight: 400;
    line-height: 50px;
  }

  .catalog-search input::placeholder {
    font-weight: 400;
  }

  .catalog-category,
  .catalog-mode-tab,
  .ui-chip {
    min-height: 36px;
    padding-inline: 14px;
  }

  .catalog-product {
    min-height: 68px;
    border-radius: 0;
  }

  .catalog-product img {
    width: 40px;
    height: 40px;
  }

  .set-card {
    min-height: 210px;
    border-radius: 20px;
    box-shadow: var(--lists-card-shadow);
  }

  .settings-section,
  .optional-block-card {
    border-radius: 16px;
    box-shadow: var(--lists-card-shadow);
  }

  .mobile-app-nav {
    min-height: 64px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }

  .mobile-nav-item {
    min-height: 44px;
    gap: 2px;
    padding: 2px;
  }

  .mobile-nav-item .icon {
    font-size: 20px;
  }

  .mobile-nav-item span {
    font-size: 10px;
    line-height: 14px;
  }

  .mobile-nav-create {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-top: -10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  }

  .mobile-nav-create .icon {
    font-size: 24px;
  }

  .app-view {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .workspace {
    min-height: calc(100dvh - 72px);
  }

  .sidebar {
    width: min(84vw, 344px);
    padding: 20px;
    border-radius: 0 20px 20px 0;
  }

  .sidebar-head {
    min-height: 72px;
  }

  .sidebar-head .icon-button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .create-list-button {
    min-height: 56px;
    margin: 20px 0;
    border-radius: 16px;
  }

  .lists-nav {
    gap: 8px;
  }

  .list-tab {
    min-height: 72px;
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 16px;
  }

  .list-tab-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .list-tab-icon .icon,
  .list-tab-icon svg {
    width: 24px;
    height: 24px;
    font-size: 24px;
  }

  .sidebar-other button {
    min-height: 48px;
  }
}

@media (max-width: 374px) {
  :root { --lists-content-padding: 16px; }

  .item-form,
  .item-form:not(.checklist-item-form) {
    grid-template-columns: minmax(0, 1fr) 96px 64px 48px;
  }

  .item-form .quantity-stepper {
    width: 96px;
    grid-template-columns: 30px 36px 30px;
  }

  .item-form .quantity-stepper button {
    width: 30px;
  }

  .item-form .quantity-stepper input {
    width: 36px;
  }

  .item-form > .item-unit-select {
    width: 64px;
  }

  .item-form #add-item-button {
    width: 48px;
    min-width: 48px;
  }
}

@media (min-width: 400px) and (max-width: 479px) {
  :root { --lists-content-padding: 24px; }
}

/* Compact mobile drawer scale. */
@media (max-width: 1024px) {
  .sidebar {
    width: min(80vw, 304px);
    padding: 16px;
    border-radius: 0 18px 18px 0;
    box-shadow: none;
  }

  .sidebar.mobile-open {
    box-shadow: 20px 0 56px rgba(15, 23, 42, 0.14);
  }

  .sidebar-head {
    min-height: 56px;
  }

  .sidebar-head .eyebrow {
    font-size: 12px;
  }

  .sidebar-head h2 {
    margin-top: 3px;
    font-size: 24px;
  }

  .sidebar-head .icon-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .sidebar-head .icon-button .icon {
    font-size: 23px;
  }

  .create-list-button {
    min-height: 48px;
    margin: 16px 0;
    gap: 10px;
    border-radius: 14px;
    font-size: 14px;
  }

  .create-list-button .icon {
    font-size: 20px;
  }

  .lists-nav {
    gap: 6px;
  }

  .list-tab {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 14px;
  }

  .list-tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .list-tab-icon .icon,
  .list-tab-icon svg {
    width: 20px;
    height: 20px;
    font-size: 20px;
  }

  .list-tab-copy {
    gap: 3px;
  }

  .list-tab-copy strong {
    font-size: 14px;
  }

  .list-tab-copy small {
    font-size: 12px;
  }

  .list-tab-chevron {
    font-size: 16px;
  }

  .sidebar-other {
    margin-top: 16px;
    padding-top: 14px;
  }

  .sidebar-other-label {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .sidebar-other button {
    min-height: 44px;
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    gap: 10px;
    padding-inline: 2px 6px;
    font-size: 14px;
  }

  .sidebar-other button .icon:first-child {
    font-size: 20px;
  }

  .sidebar-other button .icon:last-child {
    font-size: 15px;
  }

  .item-form,
  .item-form:not(.checklist-item-form) {
    grid-template-columns: minmax(0, 1fr) 74px 64px 36px;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 14px;
  }

  .item-form .item-name-field,
  .item-form .item-name-field input {
    height: 44px;
    min-height: 44px;
  }

  .item-form .item-name-field input {
    padding-inline: 8px;
    font-size: 15px;
    line-height: 44px;
  }

  .item-form .quantity-stepper {
    width: 74px;
    height: 36px;
    min-height: 36px;
    grid-template-columns: 24px 24px 24px;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 12px;
  }

  .item-form .quantity-stepper button,
  .item-form .quantity-stepper input {
    height: 34px;
    min-height: 34px;
  }

  .item-form .quantity-stepper button {
    width: 24px;
    flex-basis: 24px;
  }

  .item-form .quantity-stepper input {
    width: 24px;
    line-height: 34px;
    font-size: 14px;
    font-weight: 400;
  }

  .item-form .quantity-stepper button .icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
  }

  .item-form > .item-unit-select {
    width: 64px;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    border-radius: 12px;
  }

  .item-form > .item-unit-select .item-unit-trigger {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-block: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
  }

  .item-form > .item-unit-select #item-unit-label {
    height: 16px;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400 !important;
    line-height: 16px;
    transform: translateY(-1px);
  }

  .item-form > .item-unit-select .item-unit-trigger .icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
  }

  .item-form #add-item-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    position: relative;
    padding: 0;
    border-radius: 12px;
  }

  .item-form #add-item-button::before,
  .item-form #add-item-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
  }

  .item-form #add-item-button::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

/* Keep the item editor composition above legacy responsive rules. */
.settings-page .item-settings-topbar {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
}
.settings-page .item-settings-topbar > #back-from-item-settings-button { grid-column: 1; grid-row: 1; }
.settings-page .item-settings-topbar > h1 { grid-column: 2; grid-row: 1; }
.settings-page .item-settings-topbar > .item-settings-menu-button { grid-column: 3; grid-row: 1; }
.settings-page .item-settings-form { max-width: 920px; width: 100%; margin: 16px auto 0; }
#item-settings-page:not(.hidden) ~ .mobile-app-nav { display: none; }
.settings-page .item-icon-setting-actions { display: flex; width: auto; align-items: center; flex-direction: row; }
.settings-page .item-icon-setting-actions.hidden { display: none; }
.settings-page .item-icon-setting-actions .button { width: auto; flex: 0 0 auto; }

@media (max-width: 700px) {
  .settings-page .item-settings-topbar { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .settings-page .item-settings-form { margin-top: 8px; }
  .settings-page .item-icon-setting-actions { width: 100%; }
  .settings-page .item-icon-setting-actions .button { flex: 1 1 auto; }
}

/* Compact scale from the item editor reference. */
#item-settings-page { max-width: 680px; padding-bottom: 24px; }
.settings-page .item-settings-topbar { min-height: 56px; }
.settings-page .item-settings-topbar h1 { font-size: 18px; line-height: 24px; }
.settings-page .item-settings-form { max-width: 640px; gap: 14px; margin-top: 8px; }
.item-editor-primary { grid-template-columns: 104px minmax(0, 1fr); gap: 12px 16px; }
.item-editor-main-preview { width: 104px; height: 100px; border-radius: 14px; }
.item-editor-main-preview svg { width: 36px; height: 36px; }
.item-editor-fields { gap: 12px; }
.item-editor-amount-row { gap: 12px; }
.item-settings-form .field input,
.item-settings-form .field select { min-height: 44px; padding-inline: 14px; border-radius: 12px; font-size: 14px; }
.item-settings-form .field textarea { min-height: 56px; padding: 14px; border-radius: 12px; font-size: 14px; }
.item-settings-form .field > span { top: -7px; left: 12px; font-size: 11px; }
.item-category-trigger {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--lists-ink);
  background: #fff;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.item-category-trigger:focus-visible,
.item-category-trigger[aria-expanded="true"] { border-color: var(--lists-blue); box-shadow: 0 0 0 3px rgba(59,130,246,.12); outline: 0; }
.item-category-trigger .icon { font-size: 16px; transition: transform .18s ease; }
.item-category-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.item-category-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 232px;
  overflow-y: auto;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
}
.item-category-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--lists-ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.item-category-menu button:hover,
.item-category-menu button:focus-visible { background: #f1f5f9; outline: 0; }
.item-category-menu button[aria-selected="true"] { color: var(--lists-blue); background: #eff6ff; }
.item-category-menu button .icon { flex: 0 0 auto; font-size: 16px; }
.item-appearance-section { display: grid; gap: 16px; padding: 12px; border-radius: 14px; }
.item-appearance-section .item-settings-section-title { font-size: 14px; font-weight: 500; }
.item-appearance-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.item-appearance-option { min-width: 0; min-height: 88px; gap: 7px; padding: 8px 4px; border-radius: 12px; }
.item-appearance-option > svg { width: 24px; height: 24px; }
.item-appearance-option > span { font-size: 11px; line-height: 14px; }
.item-appearance-option small { font-size: 10px; line-height: 13px; }
.item-appearance-option.selected::after { top: -9px; right: -6px; width: 22px; height: 22px; border-width: 2px; font-size: 12px; }
.item-library-section { gap: 10px; padding: 12px 14px; border-radius: 14px; }
.item-library-section > svg { width: 22px; }
.item-library-section strong { font-size: 13px; }
.item-library-section small { font-size: 10px; }
.item-library-switch span { width: 42px; height: 24px; }
.item-library-switch span::after { width: 18px; height: 18px; top: 3px; left: 3px; }
.item-library-switch input:checked + span::after { transform: translateX(18px); }
.item-image-workflow {
  position: relative;
  margin-top: 12px;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.item-image-workflow::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 67px;
  bottom: 47px;
  left: 29px;
  width: 1.5px;
  border-radius: 999px;
  background: rgba(59,130,246,.42);
}
.item-image-workflow.stage-select::before { display: none; }
.item-image-workflow.stage-crop::before { bottom: 61px; }
.item-image-workflow.stage-optimizing::before { bottom: 44px; }
.item-image-workflow-row {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 64px;
  border-top: 0;
  border-bottom: 0;
  padding: 10px 0;
}
.item-image-workflow-row > div:first-of-type {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.item-image-workflow-row:not(.item-image-ready-row)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 56px;
  height: 1px;
  background: var(--lists-line);
}
.item-image-workflow.stage-select .item-image-select-step::after {
  display: none;
}
.item-image-workflow.stage-crop #item-image-crop-step::after,
.item-image-workflow.stage-optimizing #item-image-optimization-step::after {
  display: none;
}
.item-image-workflow-row b { position: relative; z-index: 1; width: 30px; height: 30px; background: #fff; font-size: 12px; }
.item-image-workflow-row strong { font-size: 13px; line-height: 18px; }
.item-image-workflow-row small { font-size: 11px; line-height: 16px; }
.item-image-select-step {
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  border: 0;
  border-bottom: 0;
  padding: 10px 0;
  color: var(--lists-ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.item-image-select-step:not(:disabled):hover { color: var(--lists-blue); }
.item-image-select-step:disabled { opacity: 1; cursor: default; }
.item-image-select-step > span { display: grid; place-items: center; color: var(--lists-blue); }
.item-image-select-step > span,
.item-image-step-confirm {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}
.item-image-select-step > span {
  width: 40px;
  height: 40px;
}
.item-image-select-step.has-file > span {
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  color: var(--lists-ink);
  background: #fff;
}
.item-image-select-step.has-file:not(:disabled):hover > span {
  border-color: #fecaca;
  color: #dc2626;
  background: #fff7f7;
}
.item-image-select-step svg { width: 26px; height: 26px; }
.item-image-step-confirm {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}
.item-image-step-confirm svg { width: 26px; height: 26px; }
.item-image-step-confirm:not(:disabled):hover { color: #64748b; }
.item-image-step-confirm.complete { color: #43a657; cursor: default; }
.item-image-optimization-step > div { display: grid; gap: 3px; }
.item-image-optimization-progress { width: 100%; height: 4px; overflow: hidden; border-radius: 99px; background: #e8eef7; }
.item-image-optimization-progress i { display: block; width: var(--image-progress, 0%); height: 100%; border-radius: inherit; background: var(--lists-blue); transition: width .18s ease; }
.item-crop-workflow-row { grid-template-columns: 44px minmax(0, 1fr) 104px 40px; }
.item-crop-preview-wrap { display: grid; justify-items: center; gap: 3px; }
.item-crop-preview-wrap output { color: var(--lists-muted); font-size: 10px; line-height: 12px; }
.item-crop-preview {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--lists-line);
  border-radius: 10px;
  background: #f8fafc;
  cursor: grab;
  touch-action: none;
}
.item-crop-preview:focus-visible { border-color: var(--lists-blue); box-shadow: 0 0 0 3px rgba(59,130,246,.12); outline: 0; }
.item-crop-preview.dragging { cursor: grabbing; }
.item-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.item-crop-edit-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lists-line);
  border-radius: 10px;
  padding: 0;
  color: var(--lists-blue);
  background: #f8faff;
  cursor: pointer;
}
.item-crop-edit-button svg { width: 18px; height: 18px; }
.item-crop-edit-button:hover,
.item-crop-edit-button:focus-visible { border-color: var(--lists-blue); background: #eff6ff; outline: 0; }
.item-crop-controls {
  display: grid;
  gap: 10px;
  margin: 0 0 8px 42px;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}
.item-crop-controls.hidden { display: none; }
.item-crop-controls label {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--lists-muted);
  font-size: 12px;
}
.item-crop-controls input[type="range"] { width: 100%; accent-color: var(--lists-blue); }
.item-crop-controls output { color: var(--lists-ink); text-align: right; }
.settings-page #item-visual-actions {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  gap: 10px;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 5px 8px;
}
.settings-page #item-visual-actions.hidden { display: none; }
.settings-page #item-visual-actions .item-icon-preview { width: 44px; height: 44px; }
.settings-page #item-visual-actions #upload-item-image-button,
.settings-page #item-visual-actions #open-item-icon-picker-button { width: 100%; border: 0; font-weight: 500; }
.settings-page #item-visual-actions #clear-item-icon-button { width: 40px; height: 40px; }
.settings-page #item-visual-actions.custom-image-mode { grid-template-columns: minmax(0, 1fr) 44px; }
.settings-page #item-visual-actions.custom-image-mode .item-icon-preview { display: none; }
.item-image-ready-row { grid-template-columns: 44px minmax(0, 1fr) 58px; }
.item-image-ready-row { position: relative; }
.item-image-ready-row { border-bottom: 0; }
.item-image-ready-row::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  bottom: 0;
  left: 0;
  width: 36px;
  background: #fff;
}
.item-final-image-preview {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--lists-line);
  border-radius: 10px;
  background: #f8fafc;
}
.item-final-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.item-settings-save-button {
  min-height: 48px;
  border-color: var(--lists-blue);
  background: var(--lists-blue);
  color: #fff;
  font-size: 15px;
}
.item-settings-save-button:hover,
.item-settings-save-button:focus-visible { background: #2563eb; color: #fff; }

@media (max-width: 700px) {
  #item-settings-page { padding-inline: 12px; }
  .item-editor-primary { grid-template-columns: 88px minmax(0, 1fr); gap: 10px 12px; }
  .item-editor-main-preview { width: 88px; height: 98px; }
  .item-editor-fields { gap: 10px; }
  .item-editor-amount-row { gap: 8px; }
  .item-settings-form .field input,
  .item-settings-form .field select { height: 44px; min-height: 44px; }
  .item-appearance-section { gap: 12px; padding: 10px; }
  .item-appearance-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .item-appearance-option { min-height: 82px; padding-inline: 2px; }
  .item-image-workflow-row { grid-template-columns: 44px minmax(0, 1fr) auto; padding-block: 12px; }
  .item-crop-workflow-row { grid-template-columns: 44px minmax(0, 1fr) 80px 38px; gap: 12px; }
  .item-crop-preview { width: 76px; height: 76px; }
  .item-crop-controls { margin-left: 0; }
  .item-crop-controls label { grid-template-columns: 72px minmax(0, 1fr) 38px; }
  .item-image-ready-row { grid-template-columns: 44px minmax(0, 1fr) 48px; }
  .item-final-image-preview { width: 44px; height: 44px; }
  .item-image-workflow.stage-ready::before { bottom: 47px; }
}

/* Compact list settings header and overview card. */
.settings-page .list-settings-topbar {
  min-height: 56px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.settings-page .list-settings-topbar > #back-to-list-button { grid-column: 1; grid-row: 1; }
.settings-page .list-settings-topbar > h1 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}
.settings-page .list-settings-topbar > .list-settings-menu-button { grid-column: 3; grid-row: 1; }
.settings-grid > .settings-overview-card,
.settings-grid > .settings-overview-card:first-child {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px 18px;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 18px 20px;
  background: transparent;
  box-shadow: none;
}
.settings-overview-icon {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  color: #31538b;
  background: #f7faff;
}
.settings-overview-icon::after {
  content: none;
}
.settings-overview-icon svg { width: 30px; height: 30px; }
.settings-overview-copy { min-width: 0; }
.settings-overview-card .settings-overview-copy h3 {
  overflow: hidden;
  margin: 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-overview-copy p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--lists-muted);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-list-icon-button {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  border: 0;
  border-radius: 9px;
  padding: 0 8px;
  color: var(--lists-blue);
  background: #eff6ff;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.settings-list-icon-button:hover,
.settings-list-icon-button:focus-visible { background: #dbeafe; outline: 0; }
.settings-list-icon-button:disabled { opacity: .45; cursor: not-allowed; }
.settings-list-icon-button svg { width: 14px; height: 14px; }
.settings-list-icon-error { grid-column: 1 / -1; margin: 0; }
.settings-overview-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--lists-muted);
  font-size: 11px;
  line-height: 16px;
}
.settings-overview-meta span { display: inline-flex; align-items: center; gap: 5px; }
.settings-overview-meta span > svg { width: 17px; height: 17px; }
.settings-overview-meta > i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.settings-overview-meta b { font-weight: 400; }

@media (max-width: 700px) {
  #settings-page { padding-inline: 12px; }
  .settings-page .list-settings-topbar { margin-inline: -4px; }
  .settings-grid { margin-top: 4px; }
  .settings-grid > .settings-overview-card { padding: 16px 8px 18px; }
}

/* Shared access follows the compact list-settings composition. */
.settings-grid > .settings-sharing-section {
  border: 0;
  border-radius: 0;
  padding: 0 20px 18px;
  background: transparent;
  box-shadow: none;
}
.settings-overview-card + .settings-sharing-section { margin-top: -10px; }
.settings-sharing-section > h3 {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}
.settings-sharing-section > .settings-help {
  margin: 5px 0 14px;
  font-size: 11px;
  line-height: 16px;
}
.settings-sharing-section .settings-share-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px 104px;
  gap: 0;
}
.settings-share-email {
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  display: flex !important;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--lists-line);
  border-radius: 12px 0 0 12px;
  padding: 0 12px;
  background: #fff;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
}
.settings-share-email svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--lists-muted); }
.settings-sharing-section .settings-share-email input {
  width: 100%;
  min-width: 0;
  height: 20px !important;
  min-height: 0;
  max-height: 20px;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0 !important;
  background: transparent;
  font-size: 11px;
  font-weight: 400;
  line-height: 20px;
  outline: 0;
  box-shadow: none;
}
.settings-sharing-section .settings-share-email:focus-within {
  position: relative;
  z-index: 1;
  border-color: var(--lists-blue);
  box-shadow: 0 0 0 3px var(--lists-focus);
}
.settings-share-role {
  position: relative;
  height: 44px;
}
.settings-share-role > #share-role-trigger {
  width: 100%;
  height: 44px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  max-height: 44px;
  border: 1px solid var(--lists-line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  padding: 0 30px 0 10px;
  background: #fff;
  color: var(--lists-ink);
  font-size: 11px;
  text-align: left;
}
.settings-share-role > #share-role-trigger > svg { position: absolute; right: 10px; width: 16px; height: 16px; transition: transform .18s ease; }
.settings-share-role > #share-role-trigger[aria-expanded="true"] { border-color: var(--lists-blue); box-shadow: 0 0 0 3px var(--lists-focus); }
.settings-share-role > #share-role-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
.settings-share-role-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: max-content;
  min-width: 140px;
  box-sizing: border-box;
  display: grid;
  gap: 3px;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
}
.settings-share-role-menu button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--lists-ink);
  background: transparent;
  font-size: 11px;
  text-align: left;
}
.settings-share-role-menu button span { white-space: nowrap; }
.settings-share-role-menu button:hover,
.settings-share-role-menu button:focus-visible { background: #f1f5f9; outline: 0; }
.settings-share-role-menu button[aria-selected="true"] { color: var(--lists-blue); background: #eff6ff; }
.settings-share-role-menu button svg { width: 15px; height: 15px; flex: 0 0 15px; }
.settings-sharing-section .settings-share-form .button-fill {
  width: 96px;
  height: 44px !important;
  min-height: 44px;
  max-height: 44px;
  justify-self: end;
  margin: 0 0 0 8px;
  border-color: var(--lists-ink);
  border-radius: 12px;
  background: var(--lists-ink);
  font-size: 11px;
  font-weight: 500;
}
.settings-sharing-section .form-error { margin: 8px 0 0; font-size: 10px; }
.shared-users-title { margin: 20px 0 10px; font-size: 12px; line-height: 16px; font-weight: 600; }
.settings-sharing-section .shared-users-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin-top: 0;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  background: #fff;
}
.settings-sharing-section .shared-user {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 8px 12px;
  background: #fff;
}
.settings-sharing-section .shared-user + .shared-user { border-top: 1px solid var(--lists-line); }
.shared-user-avatar {
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  color: #2563eb;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 500 !important;
}
.shared-user-avatar.tone-1 { color: #269646; background: #dcf5df; }
.shared-user-avatar.tone-2 { color: #7c3aed; background: #eee3ff; }
.shared-user-avatar.tone-3 { color: #c2410c; background: #ffead8; }
.shared-user-copy { min-width: 0; }
.settings-sharing-section .shared-user-copy strong,
.settings-sharing-section .shared-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-sharing-section .shared-user-copy strong { font-size: 11px; line-height: 16px; font-weight: 600; }
.settings-sharing-section .shared-user-copy small { margin: 1px 0 0; font-size: 10px; line-height: 14px; }
.shared-user-owner-badge {
  grid-column: 3 / -1;
  border-radius: 999px;
  padding: 3px 8px;
  color: #fff !important;
  background: #475569;
  font-size: 9px;
  font-weight: 500 !important;
}
.shared-user-role { display: inline-flex !important; align-items: center; gap: 4px; font-size: 10px; white-space: nowrap; }
.shared-user-role svg { width: 13px; height: 13px; }
.shared-user-menu { width: 28px; height: 28px; display: grid; place-items: center; border: 0; padding: 0; background: transparent; color: var(--lists-ink); }
.shared-user-menu svg { width: 16px; height: 16px; }

@media (max-width: 700px) {
  .settings-grid > .settings-sharing-section { padding-inline: 8px; }
  .settings-sharing-section .settings-share-form { grid-template-columns: minmax(0, 1fr) 88px 92px; }
  .settings-sharing-section .settings-share-form .button-fill { width: 84px; }
}

/* Smart suggestions card used in list settings. */
.settings-grid > .consumption-settings-section {
  border: 0;
  border-radius: 0;
  padding: 0 20px 18px;
  background: transparent;
  box-shadow: none;
}
.consumption-settings-section .settings-feature-toggle {
  min-height: 104px;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  border: 1px solid var(--lists-line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
}
.settings-feature-icon {
  width: 44px;
  height: 44px;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  color: #4f67f6;
  background: #eeecff;
}
.settings-feature-icon svg { width: 22px; height: 22px; }
.settings-feature-copy { min-width: 0; }
.consumption-settings-section .settings-feature-copy strong,
.consumption-settings-section .settings-feature-copy small { display: block; }
.consumption-settings-section .settings-feature-copy strong {
  color: var(--lists-ink);
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}
.consumption-settings-section .settings-feature-copy strong em { font-style: normal; font-weight: 500; }
.consumption-settings-section .settings-feature-copy small {
  margin-top: 5px;
  color: var(--lists-muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
}
.consumption-settings-section .settings-feature-toggle input {
  grid-column: 3;
  width: 48px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: radial-gradient(circle at 10px 50%,#fff 0 8px,transparent 9px),#cbd5e1;
  cursor: pointer;
  transition: background .18s ease;
}
.consumption-settings-section .settings-feature-toggle input:checked {
  background: radial-gradient(circle at 38px 50%,#fff 0 8px,transparent 9px),var(--lists-ink);
}
.consumption-settings-section .form-error { margin: 8px 0 0; }

@media (max-width: 700px) {
  .settings-grid > .consumption-settings-section { padding-inline: 8px; }
  .consumption-settings-section .settings-feature-toggle { padding: 14px; }
}

/* Destructive list action follows the reference layout. */
.settings-grid > .danger-section {
  border: 0;
  border-radius: 0;
  padding: 0 20px 24px;
  background: transparent;
  box-shadow: none;
}
.danger-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.danger-section .danger-section-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
}
.danger-section-head p {
  max-width: 480px;
  margin: 6px 0 0;
  color: var(--lists-muted);
  font-size: 12px;
  line-height: 18px;
}
.danger-section .danger-button {
  width: auto;
  min-width: 142px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  border: 1px solid #f43f5e;
  border-radius: 14px;
  padding: 0 18px;
  color: #f43f5e;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}
.danger-section .danger-button:hover,
.danger-section .danger-button:focus-visible { background: #fff1f2; }
.danger-section #delete-list-error { margin: 8px 0 0; }

@media (max-width: 700px) {
  .settings-grid > .danger-section { padding-inline: 8px; }
  .danger-section-head { gap: 12px; }
  .danger-section .danger-button { min-width: 128px; padding-inline: 14px; }
}

/* Reference-aligned set cards. */
.sets-section .sets-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.sets-section .set-card {
  --set-card-padding-x: 20px;
  position: relative;
  min-height: 0;
  border: 1px solid var(--lists-line);
  border-radius: 20px;
  padding: 18px var(--set-card-padding-x);
  background: #fff;
  box-shadow: 0 4px 16px rgba(15,23,42,.04);
}
.sets-section .set-card-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.set-card-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #52698f;
  background: #f1f5fb;
}
.set-card-icon svg { width: 38px; height: 38px; }
.set-card-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.set-card-copy { min-width: 0; }
.sets-section .set-card-copy > strong { font-size: 18px; line-height: 24px; font-weight: 600; }
.sets-section .set-card-copy > small { margin-top: 3px; font-size: 11px; line-height: 16px; }
.set-card-copy p {
  max-width: 300px;
  margin: 7px 0 0;
  color: var(--lists-muted);
  font-size: 11px;
  line-height: 16px;
}

/* Set editor: shares the item editor's sizing, fields and actions. */
.set-settings-page { padding-bottom: 96px; }
.set-settings-page .item-settings-topbar > #back-from-set-settings-button,
.set-items-page .item-settings-topbar > #back-from-set-items-button { grid-column: 1; grid-row: 1; z-index: 2; }
.set-settings-page .item-settings-topbar > h1 { grid-column: 2; grid-row: 1; }
.set-settings-page .item-settings-topbar > .set-settings-topbar-spacer { width: 44px; height: 44px; grid-column: 3; grid-row: 1; }
.set-settings-page .item-settings-topbar .icon-button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; padding: 0; }
.set-settings-page .item-settings-topbar .icon-button .icon { font-size: 22px; line-height: 1; }
.set-settings-form { gap: 16px; }
.set-settings-form .settings-section { border-radius: 16px; padding: 16px; }
.set-editor-summary { display: grid; grid-template-columns: 104px minmax(0,1fr); align-items: center; gap: 18px; }
.set-editor-summary > div { min-width: 0; }
.set-editor-summary h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; }
.set-editor-summary p { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--lists-muted); font-size: 13px; }
.set-editor-summary p svg { width: 18px; height: 18px; }
.set-editor-cover { position: relative; width: 104px; height: 104px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--lists-line); border-radius: 14px; padding: 0; color: var(--lists-muted); background: #f8fafc; }
.set-editor-cover > span { width: 100%; height: 100%; display: grid; place-items: center; }
.set-editor-cover > span img { width: 100%; height: 100%; object-fit: cover; }
.set-editor-cover > span svg { width: 38px; height: 38px; }
.set-appearance-section { display: grid; gap: 16px; }
.shared-image-editor-slot { display: contents; }
.set-editor-fields { display: grid; gap: 14px; }
.set-editor-fields .field { margin: 0; }
.set-editor-fields textarea { min-height: 88px; resize: vertical; }
.set-editor-fields label > small { justify-self: end; margin-top: -24px; padding: 0 12px 8px; color: var(--lists-muted); font-size: 11px; pointer-events: none; }
.set-category-field { position: relative; }
.set-editor-items-section { display: grid; gap: 12px; }
.set-items-page .set-settings-form { margin-top: 0; padding-top: 0; }
.set-items-page .set-editor-items-section {
  min-height: 220px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.set-editor-section-head { display: flex; align-items: flex-start; gap: 16px; }
.set-editor-section-head h2 { display: inline-flex; align-items: baseline; gap: 6px; margin: 0; font-size: 18px; line-height: 24px; }
.set-editor-section-head h2 > i,
.set-editor-section-head h2 > small { color: var(--lists-muted); font-size: 16px; font-style: normal; font-weight: 400; }
.set-editor-section-head p { max-width: 460px; margin: 4px 0 0; color: var(--lists-muted); font-size: 12px; line-height: 18px; }
.set-editor-search { position: relative; height: 48px; display: flex; align-items: center; border: 1px solid var(--lists-line); border-radius: 14px; background: #fff; }
.set-editor-search > svg { width: 19px; height: 19px; margin-left: 14px; color: var(--lists-muted); }
.set-editor-search > input { min-width: 0; height: 46px; flex: 1; border: 0; padding: 0 14px 0 10px; outline: 0; color: var(--lists-ink); background: transparent; font: inherit; font-weight: 400; }
.set-editor-search .item-suggestions { top: calc(100% + 6px); right: 0; left: 0; z-index: 70; }
.set-editor-items { display: grid; overflow: hidden; border: 1px solid var(--lists-line); border-radius: 14px; }
.set-editor-item { min-height: 68px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto 44px 44px; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: #fff; }
.set-editor-item + .set-editor-item { border-top: 1px solid var(--lists-line); }
.set-editor-item-image { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #f8fafc; }
.set-editor-item-image img { width: 100%; height: 100%; object-fit: contain; }
.set-editor-item-image svg { width: 21px; height: 21px; color: var(--lists-muted); }
.set-editor-item > div { min-width: 0; }
.set-editor-item strong,.set-editor-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-editor-item strong { font-size: 14px; font-weight: 500; }
.set-editor-item small { min-height: 15px; margin-top: 2px; color: var(--lists-muted); font-size: 10px; }
.set-editor-item-amount { color: var(--lists-muted); font-size: 12px; white-space: nowrap; }
.set-editor-item-edit,.set-editor-item-delete { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 11px; padding: 0; background: transparent; }
.set-editor-item-edit { color: var(--lists-muted); }
.set-editor-item-edit:hover { color: var(--lists-blue); background: #eff6ff; }
.set-editor-item-delete { color: #ef4444; }
.set-editor-item-delete:hover { background: #fff1f2; }
.set-editor-item-edit svg,.set-editor-item-delete svg { width: 19px; height: 19px; }
.set-editor-delete-button { min-height: 48px; border: 0; border-radius: 14px; color: #ef334d; background: transparent; font-size: 14px; font-weight: 500; }
.set-editor-delete-button:hover { background: #fff1f2; }
.editor-danger-section { display: grid; gap: 16px; margin-top: 0; padding: 4px; }
.editor-danger-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; }
.editor-danger-head h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.editor-danger-head p { max-width: 430px; margin: 5px 0 0; color: var(--lists-muted); font-size: 12px; line-height: 18px; }
.editor-danger-head > button { min-width: 144px; height: 48px; border: 1px solid #ef334d; border-radius: 14px; padding: 0 18px; color: #ef334d; background: #fff; font-size: 12px; font-weight: 500; }
.editor-danger-head > button:hover { color: #fff; background: #ef334d; }
@media (max-width: 600px) {
  .set-settings-page .topbar h1 { font-size: 18px; }
  .set-editor-summary { grid-template-columns: 88px minmax(0,1fr); gap: 14px; }
  .set-editor-cover { width: 88px; height: 88px; }
  .set-editor-summary h2 { font-size: 20px; line-height: 26px; }
  .set-editor-item { grid-template-columns: 36px minmax(0,1fr) auto 40px 40px; gap: 6px; padding-left: 10px; }
  .set-editor-item-edit,.set-editor-item-delete { width: 40px; height: 44px; }
  .set-editor-item-image { width: 36px; height: 36px; }
  .editor-danger-head { gap: 12px; }
  .editor-danger-head > button { min-width: 138px; padding-inline: 12px; }
}

/* Set import cards follow the dialog width, not the surrounding desktop shell. */
@media (max-width: 760px) {
  #set-import-dialog .set-import-item {
    box-sizing: border-box;
    height: auto;
    min-height: 68px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  #set-import-dialog .set-import-item-info {
    position: static;
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  #set-import-dialog .set-import-add-control {
    position: static;
    align-self: center;
  }

  #set-import-dialog .set-import-choice {
    position: static;
    width: 100%;
    height: 36px;
    min-height: 36px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    flex: 0 0 36px;
    align-items: stretch;
    margin-top: auto;
    padding: 0;
    background: transparent;
  }

  #set-import-dialog .set-import-choice button {
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding-inline: 10px;
    border: 1px solid var(--lists-line);
    border-radius: 10px;
    color: var(--lists-ink);
    background: #fff;
    font-size: 13px;
  }

  #set-import-dialog .set-import-choice button.active {
    border-color: var(--lists-ink);
    color: #fff;
    background: var(--lists-ink);
  }

  #set-import-dialog .create-list-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: center;
    gap: 10px;
  }

  #set-import-dialog .create-list-actions .button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
  }
}
.sets-section .set-card-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* Create set dialog uses the same compact controls as the rest of the app. */
.create-set-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 20px;
}

.create-set-dialog .create-list-form {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  gap: 12px;
  padding: 16px;
  scrollbar-gutter: stable;
}

.create-set-dialog .create-list-dialog-head {
  position: sticky;
  z-index: 3;
  top: -16px;
  align-items: flex-start;
  margin: -16px -16px 0;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--lists-line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}

.create-set-dialog .create-list-dialog-head .eyebrow,
.create-set-dialog .field > span,
.create-set-dialog .set-builder-label {
  color: var(--lists-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.create-set-dialog .create-list-dialog-head h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 26px;
}

.create-set-dialog .create-list-dialog-head .icon-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 12px;
}

.create-set-dialog .field > span {
  margin-bottom: 8px;
}

.create-set-dialog .field input,
.create-set-dialog .set-item-form input {
  min-height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
}

.create-set-dialog .set-builder {
  gap: 8px;
}

.create-set-dialog .set-item-form {
  display: grid;
  grid-template-columns: minmax(0,1fr) 74px 64px 36px;
  position: relative;
  z-index: 4;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  background: #fff;
}

.create-set-dialog .set-item-form .item-name-field {
  min-width: 0;
  position: static;
}

/* Suggestions belong to the whole compact row, not just its narrow name field. */
.create-set-dialog #set-item-suggestions {
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 10;
  max-height: 240px;
  overflow-y: auto;
}

.create-set-dialog .set-item-form .item-name-field input {
  border: 0;
  border-radius: 0;
  padding-inline: 8px;
  background: transparent;
  box-shadow: none;
}

.create-set-dialog .quantity-stepper {
  width: 74px;
  height: 36px;
  min-height: 36px;
  display: grid;
  grid-template-columns: 24px 24px 24px;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 0;
  box-sizing: border-box;
}

.create-set-dialog .quantity-stepper button {
  width: 24px;
  height: 34px;
  min-height: 34px;
  flex: none;
}

.create-set-dialog .quantity-stepper input {
  width: 24px;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  border: 0;
  padding: 0;
  text-align: center;
}

.create-set-dialog .set-item-form > .item-unit-select #set-item-unit-label {
  height: 16px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  transform: translateY(-1px);
}

.create-set-dialog .set-item-form > .item-unit-select .item-unit-menu {
  top: auto;
  bottom: calc(100% + 8px);
  z-index: 100;
  max-height: 156px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.create-set-dialog .set-item-form > .item-unit-select .item-unit-menu button {
  min-height: 36px;
}

.create-set-dialog .set-item-form > .button {
  position: relative;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  border-color: var(--lists-ink);
  border-radius: 12px;
  padding: 0;
  color: #fff;
  background: var(--lists-ink);
  font-size: 0;
}

.create-set-dialog .set-item-form > .button::before,
.create-set-dialog .set-item-form > .button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%,-50%);
}

.create-set-dialog .set-item-form > .button::after {
  transform: translate(-50%,-50%) rotate(90deg);
}

.create-set-dialog .set-draft-items {
  gap: 0;
  max-height: 224px;
  overflow-y: auto;
  border: 1px solid var(--lists-line);
  border-radius: 14px;
  background: #fff;
}

.create-set-dialog .set-draft-items:has(.empty-state) {
  border-style: dashed;
}

.create-set-dialog .set-draft-item {
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid var(--lists-line);
  border-radius: 0;
  padding: 6px 8px 6px 10px;
}

.create-set-dialog .set-draft-item:last-child { border-bottom: 0; }
.create-set-dialog .set-draft-item .product-icon,
.create-set-dialog .set-draft-item .product-icon-placeholder { width: 36px; height: 36px; flex-basis: 36px; }
.create-set-dialog .set-draft-item strong { font-size: 14px; }
.create-set-dialog .set-draft-item small { font-size: 11px; }
.create-set-dialog .set-draft-item .delete-button { width: 36px; height: 36px; min-height: 36px; }
.create-set-dialog .set-draft-item .delete-button .icon { font-size: 20px; }

.create-set-dialog .create-list-actions {
  position: sticky;
  z-index: 3;
  bottom: -16px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 104px;
  gap: 10px;
  margin: 0 -16px -16px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--lists-line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}

.create-set-dialog .create-list-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border-radius: 12px;
}

@media (max-width: 430px) {
  .create-set-dialog .set-item-form {
    grid-template-columns: minmax(0,1fr) 74px 64px 36px;
    gap: 6px;
  }
}
.sets-section .set-action-button.add {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: #fff;
  background: var(--lists-ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.sets-section .set-action-button.add svg { width: 20px; height: 20px; }
.set-manage-trigger {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  padding: 0;
  color: var(--lists-muted);
  background: transparent;
}
.set-manage-trigger:hover,
.set-manage-trigger[aria-expanded="true"] { color: var(--lists-ink); background: #f1f5f9; }
.set-manage-trigger svg { width: 18px; height: 18px; }
.set-manage-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  right: 0;
  width: 196px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
}
.set-manage-menu button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--lists-ink);
  background: transparent;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}
.set-manage-menu button:hover { background: #f1f5f9; }
.set-manage-menu svg { width: 16px; height: 16px; }
.sets-section .set-items-preview {
  width: calc(100% + (var(--set-card-padding-x) * 2));
  overflow-x: auto;
  overflow-y: hidden;
  margin: 16px calc(var(--set-card-padding-x) * -1) 0;
  padding: 0 0 2px;
  cursor: grab;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  user-select: none;
}
.sets-section .set-items-preview.dragging {
  cursor: grabbing;
}
.sets-section .set-items-preview::-webkit-scrollbar { display: none; }
.sets-section .set-items-preview-track {
  width: max-content;
  min-width: calc(100% + var(--set-card-padding-x));
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 10px;
  box-sizing: border-box;
  padding: 0 0 0 var(--set-card-padding-x);
}
.sets-section .set-items-preview-track::after {
  content: "";
  flex: 0 0 calc(var(--set-card-padding-x) - 10px);
}
.sets-section .set-items-preview img { -webkit-user-drag: none; }
.set-preview-item {
  width: 56px;
  flex: 0 0 56px;
  min-width: 0;
}
.set-preview-image {
  width: 56px;
  height: 56px;
  display: grid !important;
  place-items: center;
  justify-self: start;
  overflow: hidden;
  border: 1px solid var(--lists-line);
  border-radius: 12px !important;
  padding: 6px !important;
  color: var(--lists-muted) !important;
  background: #f8fafc !important;
}
.set-preview-image img { width: 100%; height: 100%; object-fit: contain; }
.set-preview-image svg { width: 24px; height: 24px; }
.set-preview-item > strong {
  overflow: hidden;
  margin-top: 6px;
  font-size: 10px;
  line-height: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-preview-item > small { margin-top: 1px; font-size: 9px; line-height: 13px; }
.set-preview-item.more {
  width: 56px;
  height: auto;
  min-height: 0;
  flex-basis: 56px;
  align-self: stretch;
  display: grid;
  place-content: center;
  justify-items: center;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  color: var(--lists-muted);
  background: #fbfcfe;
  font: inherit;
  cursor: pointer;
}
.set-preview-item.more:hover,
.set-preview-item.more:focus-visible {
  border-color: #93b4ff;
  color: var(--lists-blue);
  background: #f3f7ff;
  outline: none;
}
.set-preview-item.more b { color: var(--lists-ink); font-size: 16px; font-weight: 500; }
.set-preview-item.more small { font-size: 10px; }

@media (max-width: 600px) {
  .sets-section .set-card { --set-card-padding-x: 16px; padding: 16px; }
  .sets-section .set-card-head { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
  .set-card-icon { width: 64px; height: 64px; border-radius: 16px; }
  .set-card-icon svg { width: 32px; height: 32px; }
  .sets-section .set-card-copy > strong { font-size: 16px; line-height: 21px; }
  .set-preview-item { width: 56px; flex-basis: 56px; }
}

/* Unified confirmation for destructive and state-reset actions. */
.confirmation-dialog {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  border: 0;
  padding: 0;
  overflow: visible;
  border-radius: 20px;
  color: var(--lists-ink);
  background: transparent;
}
.confirmation-dialog::backdrop {
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(2px);
}
.confirmation-dialog-card {
  position: relative;
  display: grid;
  gap: 18px;
  box-sizing: border-box;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 20px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
}
.confirmation-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lists-line);
  border-radius: 12px;
  padding: 0;
  color: var(--lists-ink);
  background: #fff;
  cursor: pointer;
}
.confirmation-dialog-close svg { width: 20px; height: 20px; }
.confirmation-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ef334d;
  background: #fff1f2;
}
.confirmation-dialog-icon svg { width: 24px; height: 24px; }
.confirmation-dialog-copy { display: grid; gap: 7px; padding-right: 36px; }
.confirmation-dialog-copy .eyebrow { color: #ef334d; }
.confirmation-dialog-copy h2 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; }
.confirmation-dialog-copy p { margin: 0; color: var(--lists-muted); font-size: 14px; line-height: 21px; }
.confirmation-dialog-warning {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 14px;
  color: #ef334d;
  background: #fff7f7;
  font-size: 13px;
  line-height: 18px;
}
.confirmation-dialog-warning svg { width: 21px; height: 21px; flex: 0 0 21px; }
.confirmation-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.confirmation-dialog-actions button {
  min-height: 48px;
  border-radius: 14px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.confirmation-dialog-cancel { border: 1px solid var(--lists-line); color: var(--lists-ink); background: #fff; }
.confirmation-dialog-submit { border: 1px solid #ef334d; color: #fff; background: #ef334d; }
.confirmation-dialog-actions button:hover { filter: brightness(.97); }
.confirmation-dialog-actions button:focus-visible,
.confirmation-dialog-close:focus-visible { outline: 3px solid rgba(59, 130, 246, .2); outline-offset: 2px; }
.confirmation-dialog-neutral .confirmation-dialog-icon { color: var(--lists-blue); background: #eff6ff; }
.confirmation-dialog-neutral .confirmation-dialog-copy .eyebrow { color: var(--lists-blue); }
.confirmation-dialog-neutral .confirmation-dialog-warning { border-color: #bfdbfe; color: #31538b; background: #f7faff; }
.confirmation-dialog-neutral .confirmation-dialog-submit { border-color: var(--lists-ink); background: var(--lists-ink); }

@media (max-width: 430px) {
  .confirmation-dialog { width: calc(100vw - 32px); }
  .confirmation-dialog-card { gap: 16px; padding: 20px; }
  .confirmation-dialog-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  .confirmation-dialog[open] .confirmation-dialog-card { animation: confirmation-dialog-in .18s ease-out; }
  @keyframes confirmation-dialog-in {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
}

/* Product rows do not reserve a column for the removed completion control. */
.active-items-list .item-row:not(.checklist-row),
.purchased-items .item-row:not(.checklist-row) {
  grid-template-columns: 40px minmax(0, 1fr) minmax(54px, auto) auto;
  column-gap: 8px;
}

.active-items-list .item-row:not(.checklist-row) > .check-button,
.purchased-items .item-row:not(.checklist-row) > .check-button {
  display: none;
}

@media (max-width: 520px) {
  .active-items-list .item-row:not(.checklist-row),
  .purchased-items .item-row:not(.checklist-row) {
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    column-gap: 6px;
  }
}

/* Optional blocks management follows the shared compact page and card patterns. */
#optional-blocks-page .optional-blocks-topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  text-align: center;
}

#optional-blocks-page .optional-blocks-topbar > #back-from-optional-blocks-button {
  grid-column: 1;
  grid-row: 1;
}

.optional-blocks-title {
  min-width: 0;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  justify-items: center;
  gap: 3px;
}

#optional-blocks-page .optional-blocks-title h1 {
  overflow: hidden;
  max-width: 100%;
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.optional-blocks-title > span {
  overflow: hidden;
  max-width: 100%;
  color: var(--lists-muted);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#optional-blocks-page .optional-blocks-create-button {
  grid-column: 3;
  grid-row: 1;
  color: var(--lists-ink);
  border-color: var(--lists-line);
  background: #fff;
}

#optional-blocks-page .optional-blocks-create-button:hover,
#optional-blocks-page .optional-blocks-create-button:focus-visible {
  border-color: var(--lists-border);
  color: var(--lists-ink);
  background: var(--lists-page);
}

#optional-blocks-page .optional-blocks-section {
  gap: 14px;
  margin-top: 18px;
}

#optional-blocks-page .optional-blocks-section > .catalog-group-head {
  min-height: 28px;
}

#optional-blocks-page .optional-blocks-section > .settings-help {
  max-width: 620px;
  margin: 0;
  color: var(--lists-muted);
  font-size: 14px;
  line-height: 21px;
}

#optional-blocks-page .optional-blocks-list {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

#optional-blocks-page .optional-block-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--lists-line);
  border-radius: 16px;
  padding: 12px 10px 12px 12px;
  background: #fff;
  box-shadow: var(--lists-card-shadow);
}

.optional-block-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--block-color, var(--lists-blue));
  background: color-mix(in srgb, var(--block-color, var(--lists-blue)) 11%, #fff);
}

.optional-block-card-icon .icon {
  font-size: 22px;
}

#optional-blocks-page .optional-block-card-copy {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 3px;
}

#optional-blocks-page .optional-block-card-copy strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--lists-ink);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#optional-blocks-page .optional-block-card-copy small {
  margin: 0;
  color: var(--lists-muted);
  font-size: 12px;
  line-height: 16px;
}

#optional-blocks-page .optional-block-preview {
  margin-top: 5px;
  gap: 5px;
}

#optional-blocks-page .optional-block-preview span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 14px;
}

#optional-blocks-page .optional-block-card-actions {
  align-items: center;
  gap: 2px;
}

#optional-blocks-page .optional-block-card-actions .edit-item-button,
#optional-blocks-page .optional-block-card-actions .delete-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

#optional-blocks-page .optional-block-card-actions .edit-item-button {
  color: var(--lists-muted);
}

#optional-blocks-page .optional-block-card-actions .delete-button {
  color: var(--lists-red);
}

#optional-blocks-page .optional-blocks-list > .empty-state {
  min-height: 148px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  padding: 24px;
  background: #fbfcfe;
}

#optional-blocks-page .optional-block-manage-row {
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  border-radius: 13px;
  padding: 5px;
  box-shadow: none;
}

#optional-blocks-page .optional-block-manage-row .checklist-optional-block-toggle {
  grid-template-columns: 38px minmax(0, 1fr);
}

#optional-blocks-page .optional-block-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

#optional-blocks-page .optional-block-card-actions .optional-block-delete {
  color: var(--lists-red);
}

#optional-blocks-page .optional-block-card-actions .optional-block-delete:hover,
#optional-blocks-page .optional-block-card-actions .optional-block-delete:focus-visible {
  color: var(--lists-red);
  background: #fff1f2;
}

#optional-blocks-page .optional-block-items-preview {
  grid-column: 1 / -1;
  width: calc(100% + 10px);
  margin: 0 -5px -1px;
  padding-top: 4px;
  border-top: 0;
}

#optional-blocks-page .optional-block-items-preview .set-items-preview-track {
  min-width: calc(100% + 10px);
  padding-left: 10px;
}

#optional-blocks-page .optional-block-items-preview .set-items-preview-track::after {
  flex-basis: 0;
}

.optional-block-preview-item {
  width: 78px;
  min-height: 36px;
  flex: 0 0 78px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lists-line);
  border-radius: 10px;
  padding: 5px 7px;
  color: var(--lists-ink);
  background: #f8fafc;
  text-align: center;
}

.optional-block-preview-item > strong {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 10px;
  line-height: 13px;
  font-weight: 500;
  white-space: normal;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 600px) {
  #optional-blocks-page .optional-blocks-topbar {
    min-height: 68px;
    margin-inline: 0;
    padding: 4px 0 12px;
  }

  #optional-blocks-page .optional-blocks-title h1 {
    font-size: 18px;
    line-height: 24px;
  }

  .optional-blocks-title > span {
    max-width: 220px;
    font-size: 11px;
  }

  #optional-blocks-page .optional-blocks-section {
    margin-top: 16px;
  }

  #optional-blocks-page .optional-blocks-section > .settings-help {
    font-size: 13px;
    line-height: 19px;
  }

  #optional-blocks-page .optional-blocks-list {
    grid-template-columns: 1fr;
  }

  #optional-blocks-page .optional-block-card {
    min-height: 84px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding-inline: 10px;
  }

  .optional-block-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  #optional-blocks-page .optional-block-card-actions .edit-item-button,
  #optional-blocks-page .optional-block-card-actions .delete-button {
    width: 36px;
  }
}
