/* Базовые стили */
:root {
    --red: #e90016;
    --red-dark: #c90013;
    --black: #111111;
    --muted: #686868;
    --line: #e7e7e7;
    --surface: #ffffff;
    --page: #f8f8f9;
    --shadow: 0 12px 36px rgba(18, 18, 22, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body,
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    min-width: 1100px;
    background: var(--page);
    color: var(--black);
    font-family: "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: calc(100% - 96px);
    max-width: 1320px;
    margin-right: auto;
    margin-left: auto;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Шапка */
.site-header {
    height: 72px;
    position: relative;
    z-index: 20;
    border-bottom: 1px solid #eeeeee;
    background: rgba(255, 255, 255, 0.98);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
}

.brand {
    width: 148px;
    height: 52px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.brand img {
    width: 144px;
    height: auto;
    display: block;
}

/* Выбор местоположения */
.location-selector {
    margin-left: 14px;
    position: relative;
    flex: 0 0 auto;
}

.location-button {
    height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: #383838;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.location-button:hover {
    border-color: #d2d2d2;
    background: #f7f7f7;
}

.location-pin {
    width: 14px;
    height: 14px;
    position: relative;
    display: inline-block;
    border: 2px solid var(--red);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.location-pin::after {
    width: 4px;
    height: 4px;
    position: absolute;
    top: 3px;
    left: 3px;
    content: "";
    border-radius: 50%;
    background: var(--red);
}

.location-chevron {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    display: inline-block;
    border-right: 1.5px solid #777777;
    border-bottom: 1.5px solid #777777;
    transform: rotate(45deg);
}

.location-modal {
    width: 360px;
    padding: 22px;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 30;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(18, 18, 22, 0.14);
}

.location-modal[hidden] {
    display: none;
}

.location-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.location-modal-header h2 {
    font-size: 19px;
    line-height: 1.3;
}

.location-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777777;
    font-size: 23px;
    line-height: 1;
}

.location-close:hover {
    background: #f4f4f4;
    color: var(--black);
}

.location-form {
    margin-top: 20px;
    display: grid;
    gap: 15px;
}

.location-field {
    display: grid;
    gap: 7px;
}

.location-field > span {
    color: #4d4d4d;
    font-size: 12px;
    font-weight: 700;
}

.location-field input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.location-field input::placeholder {
    color: #9e9e9e;
}

.location-field input:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.location-value-input {
    display: none !important;
}

.location-select {
    width: 100%;
    position: relative;
}

.location-select-button {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.location-select-button:hover:not(:disabled) {
    border-color: #cfcfcf;
}

.location-select-button:focus,
.location-select-button[aria-expanded="true"] {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.location-select-button:disabled {
    cursor: not-allowed;
    background: #f7f7f7;
    color: #a0a0a0;
}

.location-select-button.is-placeholder {
    color: #9e9e9e;
}

.location-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-select-chevron {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    flex: 0 0 auto;
    border-right: 1.5px solid #777777;
    border-bottom: 1.5px solid #777777;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.location-select-button[aria-expanded="true"] .location-select-chevron {
    margin-top: 4px;
    transform: rotate(225deg);
}

.location-select-button:disabled .location-select-chevron {
    border-color: #b9b9b9;
}

.location-select-menu {
    width: 100%;
    padding: 8px;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(18, 18, 22, 0.14);
}

.location-select-menu[hidden] {
    display: none;
}

.location-select-search {
    height: 38px !important;
    padding: 0 11px !important;
    font-size: 13px !important;
}

.location-option-list {
    max-height: 190px;
    margin-top: 7px;
    overflow-y: auto;
}

.location-option {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    display: block;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--black);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}

.location-option:hover,
.location-option:focus-visible {
    outline: none;
    background: #f7f7f7;
}

.location-option.is-selected {
    background: #fff1f2;
    color: var(--red);
    font-weight: 700;
}

.location-no-results {
    margin: 0;
    padding: 12px 10px;
    color: #858585;
    font-size: 13px;
    text-align: center;
}

.location-save {
    height: 46px;
    margin-top: 3px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.location-save:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.main-navigation {
    margin-left: 28px;
    display: flex;
    align-items: center;
    gap: 38px;
}

.main-navigation a {
    position: relative;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-navigation a::after {
    width: 0;
    height: 2px;
    position: absolute;
    right: 0;
    bottom: -9px;
    content: "";
    background: var(--red);
    transition: width 0.2s ease;
}

.main-navigation a:hover {
    color: var(--red);
}

.main-navigation a:hover::after {
    width: 100%;
    left: 0;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 9px;
}

.public-landing-page .main-navigation {
    margin-left: auto;
}

.public-landing-page .header-actions {
    margin-left: 24px;
}

.dimon-button {
    height: 38px;
    padding: 0 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--black);
    font-size: 13px;
    font-weight: 700;
}

.icon-button {
    width: 40px;
    height: 40px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.favorite-button {
    font-family: Arial, sans-serif;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
}

.notification-button img {
    width: 22px;
    height: 22px;
    display: block;
}

.notification-count {
    display: none;
    width: 7px;
    height: 7px;
    position: absolute;
    top: 6px;
    right: 6px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--red);
}

.login-button {
    height: 38px;
    margin-left: 5px;
    padding: 0 22px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 7px 18px rgba(233, 0, 22, 0.17);
}

.dimon-button,
.icon-button,
.login-button {
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.dimon-button:hover,
.icon-button:hover {
    border-color: #d5d5d5;
    background: #f4f4f4;
}

.login-button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.site-header a.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hero */
.hero {
    min-height: 570px;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    background-image: url("assets/hero/japan_background.png");
    background-position: center 42%;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.18) 20%, rgba(255, 255, 255, 0.72) 47%, rgba(255, 255, 255, 0.66) 72%, rgba(255, 255, 255, 0.38) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 68%, #ffffff 100%);
}

.hero-inner {
    min-height: 570px;
    position: relative;
}

.hero-content {
    width: 650px;
    padding-top: 37px;
    position: relative;
    left: 43%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    text-align: center;
}

.hero-logo {
    width: 390px;
    height: 142px;
    display: block;
    object-fit: contain;
}

/* Главный заголовок */
.hero-title {
    font-size: 38px;
    line-height: 1.15;
    font-weight: 800;
    text-align: center;
}

.hero-title span {
    color: #e60012;
}

.hero h1 .red-text {
    color: var(--red);
}

.hero-subtitle {
    margin-top: 11px;
    color: #555555;
    font-size: 16px;
    line-height: 1.5;
}

.public-landing-page .hero-title {
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.public-landing-page .hero-subtitle {
    margin-top: 14px;
    font-size: 19px;
}

.hero-car {
    width: min(49vw, 720px);
    height: auto;
    position: absolute;
    right: -160px;
    bottom: -13px;
    z-index: 2;
    display: block;
    filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.12));
}

/* Поиск */
.main-search {
    width: 100%;
    max-width: 610px;
    height: 62px;
    margin-top: 24px;
    padding: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(222, 222, 222, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
}

.main-search::before {
    width: 16px;
    height: 16px;
    margin-left: 12px;
    flex: 0 0 auto;
    content: "";
    border: 2px solid #737373;
    border-radius: 50%;
    box-shadow: 8px 8px 0 -6px #737373;
}

.main-search input {
    min-width: 0;
    height: 46px;
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--black);
    font-size: 15px;
}

.main-search input::placeholder,
.vin-form input::placeholder {
    color: #9e9e9e;
}

.main-search button,
.vin-form button,
.master-button {
    border: 1px solid var(--red);
    background: var(--red);
    color: #ffffff;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.main-search button {
    min-width: 112px;
    height: 46px;
    padding: 0 25px;
    border-radius: 8px;
}

.main-search:focus-within,
.vin-form input:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.main-search button:hover,
.vin-form button:hover,
.master-button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

/* VIN */
.vin-section {
    position: relative;
    z-index: 8;
}

.vin-card {
    min-height: 108px;
    margin-top: 20px;
    padding: 23px 29px;
    display: flex;
    align-items: center;
    gap: 44px;
    border: 1px solid rgba(224, 224, 224, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.vin-copy {
    min-width: 370px;
    flex: 1 1 44%;
}

.vin-copy h2 {
    font-size: 18px;
    line-height: 1.3;
}

.vin-copy p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.vin-form {
    flex: 1 1 52%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vin-form input {
    min-width: 260px;
    height: 50px;
    padding: 0 16px;
    flex: 1;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vin-form button {
    height: 50px;
    padding: 0 25px;
    flex: 0 0 auto;
    border-radius: 8px;
}

/* Мастера */
.masters-section {
    padding-top: 54px;
}

.masters-heading h2,
.how-section > h2 {
    margin-bottom: 17px;
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.masters-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.masters-all-link {
    margin-bottom: 17px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--red);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.masters-all-link:hover {
    color: var(--red-dark);
}

.masters-empty {
    min-height: 178px;
    padding: 34px 38px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.masters-empty h3 {
    font-size: 22px;
    line-height: 1.3;
}

.masters-empty p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

/* Как это работает */
.how-section {
    padding-top: 48px;
}

.steps-list {
    padding: 30px 24px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.step {
    min-height: 136px;
    padding: 0 23px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    border-right: 1px solid #eeeeee;
}

.step:first-child {
    padding-left: 5px;
}

.step:last-child {
    padding-right: 5px;
    border-right: 0;
}

.step-number {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff0f2;
    color: var(--red);
    font-size: 14px;
    font-weight: 800;
}

.step h3 {
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.3;
}

.step p {
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* Вы мастер? */
.master-cta {
    min-height: 230px;
    margin-top: 48px;
    margin-bottom: 54px;
    padding: 38px 42px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    border: 1px solid #f0dddd;
    border-radius: 12px;
    background:
        radial-gradient(circle at 88% 0%, rgba(233, 0, 22, 0.10), transparent 34%),
        linear-gradient(100deg, #ffffff 0%, #ffffff 56%, #fff4f5 100%);
    box-shadow: 0 10px 32px rgba(18, 18, 22, 0.055);
}

.master-cta::after {
    width: 250px;
    height: 250px;
    position: absolute;
    right: 115px;
    bottom: -190px;
    content: "";
    border: 44px solid rgba(233, 0, 22, 0.065);
    border-radius: 50%;
}

.master-copy {
    position: relative;
    z-index: 1;
}

.master-copy h2 {
    font-size: 27px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.master-copy > p {
    margin-top: 8px;
    color: #4f4f4f;
    font-size: 15px;
}

.benefits-list {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 14px 34px;
    list-style: none;
}

.benefits-list li {
    position: relative;
    padding-left: 26px;
    color: #333333;
    font-size: 14px;
}

.benefits-list li::before {
    width: 17px;
    height: 17px;
    position: absolute;
    top: 0;
    left: 0;
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    border-radius: 50%;
    color: var(--red);
    font-size: 10px;
    font-weight: 800;
}

.master-button {
    min-width: 250px;
    height: 52px;
    padding: 0 30px;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    border-radius: 8px;
    box-shadow: 0 9px 22px rgba(233, 0, 22, 0.20);
    white-space: nowrap;
}

/* Каталог мастеров */
body.masters-page {
    min-width: 0;
}

.catalog-main {
    min-height: calc(100vh - 72px);
    padding: 36px 0 56px;
}

.catalog-title {
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.vin-results-heading p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.vin-results-heading strong {
    color: var(--black);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.catalog-controls {
    margin-top: 18px;
}

.catalog-search {
    height: 54px;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(18, 18, 22, 0.04);
}

.catalog-search::before {
    width: 15px;
    height: 15px;
    margin-left: 18px;
    flex: 0 0 auto;
    content: "";
    border: 2px solid #777777;
    border-radius: 50%;
    box-shadow: 7px 7px 0 -6px #777777;
}

.catalog-search input {
    width: 100%;
    height: 100%;
    padding: 0 17px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--black);
    font-size: 15px;
}

.catalog-search input::placeholder {
    color: #9e9e9e;
}

.catalog-search:focus-within {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.catalog-filters {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.filter-chip,
.advanced-filters {
    height: 38px;
    padding: 0 14px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    color: #383838;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.filter-chip::after {
    width: 6px;
    height: 6px;
    margin-top: -3px;
    content: "";
    border-right: 1px solid #777777;
    border-bottom: 1px solid #777777;
    transform: rotate(45deg);
}

.advanced-filters {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.filter-chip:hover,
.advanced-filters:hover {
    border-color: #cdcdcd;
    background: #f5f5f5;
}

.filter-chip.is-active,
.advanced-filters.is-active {
    border-color: rgba(233, 0, 22, 0.42);
    background: #fff0f2;
    color: var(--red);
}

.filter-lines {
    width: 17px;
    display: grid;
    gap: 3px;
}

.filter-lines i {
    height: 1px;
    display: block;
    background: currentColor;
}

.filter-lines i:nth-child(1) {
    width: 17px;
}

.filter-lines i:nth-child(2) {
    width: 11px;
}

.filter-lines i:nth-child(3) {
    width: 14px;
}

.catalog-results {
    margin-top: 24px;
}

.catalog-results > h2 {
    margin-bottom: 14px;
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.master-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.catalog-empty-state {
    min-height: 230px;
    padding: 40px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.catalog-empty-state[hidden] {
    display: none;
}

.catalog-empty-state h3 {
    font-size: 22px;
    line-height: 1.3;
}

.catalog-empty-state p {
    max-width: 520px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.catalog-reset {
    min-height: 38px;
    margin-top: 18px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
}

.catalog-reset:hover {
    border-color: rgba(233, 0, 22, 0.38);
    background: #fff7f8;
}

.search-results-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.search-filters {
    padding: 20px;
    position: sticky;
    top: 100px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.search-filters h2 {
    margin-bottom: 18px;
    font-size: 20px;
    line-height: 1.25;
}

/* Mobile app shell for the existing mechanic cabinet. */
.master-mobile-nav,
.master-mobile-more-layer,
.master-mobile-dashboard-header {
    display: none;
}

@media (max-width: 760px) {
    body.master-account-page {
        min-width: 0;
        overflow-x: clip;
        background: #fafafa;
    }

    body.master-account-page.master-mobile-more-open {
        overflow: hidden;
    }

    .master-account-page .marketplace-header,
    .master-account-page .profile-mobile-bottom-nav,
    .master-account-page .master-sidebar {
        display: none !important;
    }

    .master-account-page .master-account-layout.container {
        width: 100%;
        max-width: none;
        padding: 18px 12px calc(84px + env(safe-area-inset-bottom));
        display: block;
    }

    .master-account-page .master-account-main {
        width: 100%;
        min-width: 0;
    }

    .master-account-page .master-page-heading {
        margin: 0 0 16px;
    }

    .master-account-page .master-page-heading h1 {
        font-size: 24px;
        line-height: 1.2;
        letter-spacing: -0.025em;
    }

    .master-account-page .master-page-heading p {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.45;
    }

    .master-account-page[data-master-page="dashboard"] .master-account-main > .master-page-heading {
        display: none;
    }

    .master-mobile-dashboard-header {
        margin-bottom: 16px;
        display: block;
    }

    .master-mobile-dashboard-header h1 {
        font-size: 24px;
        line-height: 1.2;
        letter-spacing: -0.025em;
    }

    .master-mobile-profile-summary {
        min-width: 0;
        margin-top: 16px;
        padding: 14px;
        display: flex;
        align-items: center;
        gap: 13px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 6px 22px rgba(18, 18, 22, 0.035);
    }

    .master-mobile-profile-avatar {
        width: 58px;
        height: 58px;
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        overflow: hidden;
        border: 1px solid #e4e4e4;
        border-radius: 50%;
        background: #f1f1f2;
        color: var(--red);
        font-size: 20px;
        font-weight: 800;
    }

    .master-mobile-profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .master-mobile-profile-copy {
        min-width: 0;
        display: grid;
        gap: 3px;
    }

    .master-mobile-profile-copy strong {
        overflow: hidden;
        font-size: 15px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .master-mobile-profile-copy small {
        color: var(--muted);
        font-size: 12px;
    }

    .master-mobile-profile-copy em {
        width: max-content;
        margin-top: 2px;
        padding: 3px 7px;
        border-radius: 5px;
        background: #f1f1f2;
        color: #737373;
        font-size: 10px;
        font-style: normal;
    }

    .master-account-page .master-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .master-account-page .master-stat-card {
        min-width: 0;
        min-height: 82px;
        padding: 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .master-account-page .master-stat-icon,
    .master-account-page .master-rating-star {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .master-account-page .master-rating-star svg {
        width: 21px;
        height: 21px;
    }

    .master-account-page .master-stat-card strong {
        font-size: 18px;
    }

    .master-account-page .master-stat-card small {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.25;
    }

    .master-account-page .master-rating.is-empty [data-rating-value] {
        font-size: 13px;
        line-height: 1.25;
    }

    .master-account-page .master-panel,
    .master-account-page .master-demo-section {
        margin-top: 14px;
        border-radius: 11px;
    }

    .master-account-page .master-panel-heading {
        min-height: 52px;
        padding: 0 14px;
        gap: 12px;
    }

    .master-account-page .master-panel-heading h2,
    .master-account-page .master-demo-heading h2,
    .master-account-page .master-detail-card h2,
    .master-account-page .master-offer-form h2,
    .master-account-page .master-profile-section h2 {
        font-size: 16px;
    }

    .master-account-page .master-empty-state {
        min-height: 190px;
        padding: 28px 18px;
    }

    .master-account-page .master-empty-icon {
        width: 50px;
        height: 50px;
        border-radius: 11px;
    }

    .master-account-page .master-empty-icon svg {
        width: 25px;
        height: 25px;
    }

    .master-account-page .master-empty-state h2,
    .master-account-page .master-empty-state h3 {
        margin-top: 13px;
        font-size: 17px;
    }

    .master-account-page .master-empty-state p {
        margin-top: 7px;
        font-size: 12px;
        line-height: 1.5;
    }

    .master-account-page .master-secondary-action {
        min-height: 40px;
        margin-top: 15px;
    }

    .master-account-page .master-demo-heading {
        padding: 15px 14px;
        gap: 8px;
    }

    .master-account-page .master-request-row {
        min-width: 0;
        min-height: 0;
        padding: 14px 12px;
        grid-template-columns: 42px minmax(0, 1fr) 14px;
        align-items: start;
        gap: 10px;
    }

    .master-account-page .master-request-car {
        width: 42px;
        height: 42px;
        border-radius: 9px;
    }

    .master-account-page .master-request-car svg {
        width: 23px;
        height: 23px;
    }

    .master-account-page .master-request-copy strong {
        font-size: 13px;
        line-height: 1.35;
    }

    .master-account-page .master-request-copy small,
    .master-account-page .master-request-meta small {
        font-size: 10px;
        line-height: 1.45;
    }

    .master-account-page .master-request-meta {
        grid-column: 2;
        justify-items: start;
    }

    .master-account-page .master-request-meta b {
        font-size: 12px;
    }

    .master-account-page .master-request-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
        font-size: 21px;
    }

    .master-account-page .master-request-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 10px;
    }

    .master-account-page .master-request-heading h1 {
        margin-top: 5px;
    }

    .master-account-page .master-request-heading .master-status-badge {
        max-width: 136px;
        margin-top: 2px;
        text-align: center;
        white-space: normal;
    }

    .master-account-page .master-request-layout,
    .master-account-page .master-request-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .master-account-page .master-detail-card,
    .master-account-page .master-offer-form,
    .master-account-page .master-profile-section {
        padding: 16px;
    }

    .master-account-page .master-detail-card > p,
    .master-account-page .master-offer-form > p,
    .master-account-page .master-profile-section > p {
        font-size: 12px;
        line-height: 1.55;
    }

    .master-account-page .master-detail-card dl div {
        min-width: 0;
        gap: 12px;
    }

    .master-account-page .master-detail-card dt,
    .master-account-page .master-detail-card dd {
        min-width: 0;
        overflow-wrap: anywhere;
        font-size: 11px;
    }

    .master-account-page .master-offer-form {
        position: static;
    }

    .master-account-page .master-offer-form fieldset {
        margin-top: 16px;
    }

    .master-account-page .master-form-field {
        margin-top: 13px;
    }

    .master-account-page .master-form-field textarea {
        min-height: 104px;
    }

    .master-account-page .master-profile-form {
        gap: 12px;
    }

    .master-account-page .master-profile-grid {
        margin-top: 17px;
        grid-template-columns: minmax(0, 1fr);
    }

    .master-account-page .master-form-wide {
        grid-column: auto;
    }

    .master-account-page .master-profile-avatar-row {
        margin-top: 16px;
        padding-bottom: 18px;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .master-account-page .master-profile-avatar-row > div {
        justify-items: center;
    }

    .master-account-page .master-profile-avatar-row > div > div {
        justify-content: center;
        flex-wrap: wrap;
    }

    .master-account-page .master-profile-avatar {
        width: 76px;
        height: 76px;
    }

    .master-account-page .master-work-upload {
        min-height: 106px;
        margin-top: 14px;
    }

    .master-account-page .master-work-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .master-account-page .master-profile-save {
        width: 100%;
    }

    .master-account-page .master-reviews-rating {
        min-height: 58px;
        margin-top: 12px;
        padding: 13px 15px;
    }

    .master-account-page .master-review-card {
        min-height: 0;
        padding: 15px 13px;
        grid-template-columns: 36px minmax(0, 1fr) 14px;
        gap: 10px;
    }

    .master-account-page .master-review-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .master-account-page .master-review-content {
        grid-column: 2;
    }

    .master-account-page .master-review-meta {
        grid-column: 2;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .master-account-page .master-review-chevron {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .master-account-page .master-saved-offer {
        min-height: 0;
        padding: 16px;
        align-items: stretch;
        gap: 14px;
    }

    .master-account-page .master-saved-offer > div:last-child {
        justify-items: start;
    }

    .master-account-page .master-work-report-form {
        gap: 15px;
    }

    .master-account-page .client-request-previews {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .master-account-page .request-dialog-list {
        gap: 10px;
    }

    .master-account-page .request-dialog-link {
        padding: 16px;
        border-radius: 11px;
    }

    .master-account-page .request-chat {
        height: calc(100dvh - 122px - env(safe-area-inset-bottom));
        max-height: none;
        min-height: 400px;
        border-radius: 11px;
    }

    .master-mobile-nav {
        height: calc(64px + env(safe-area-inset-bottom));
        padding: 5px max(6px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-right));
        position: fixed;
        z-index: 150;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        border-top: 1px solid #e7e7e8;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -7px 24px rgba(18, 18, 22, 0.07);
        backdrop-filter: blur(14px);
    }

    .master-mobile-nav-item {
        min-width: 0;
        padding: 3px 1px 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #666a70;
        font: inherit;
        cursor: pointer;
    }

    .master-mobile-nav-item svg {
        width: 20px;
        height: 20px;
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .master-mobile-nav-item span {
        max-width: 100%;
        overflow: hidden;
        font-size: 9px;
        font-weight: 650;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .master-mobile-nav-item.is-active {
        color: var(--red);
    }

    .master-mobile-more-layer {
        padding: 18px 12px;
        position: fixed;
        z-index: 145;
        inset: 0 0 calc(64px + env(safe-area-inset-bottom));
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }

    .master-mobile-more-layer[hidden] {
        display: none;
    }

    .master-mobile-more-backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        background: rgba(17, 17, 17, 0.38);
    }

    .master-mobile-more-sheet {
        width: min(100%, 430px);
        max-height: min(72dvh, 560px);
        padding: 8px 16px 14px;
        position: relative;
        z-index: 1;
        overflow-y: auto;
        border: 1px solid #e5e5e6;
        border-radius: 18px 18px 14px 14px;
        background: #ffffff;
        box-shadow: 0 18px 48px rgba(18, 18, 22, 0.2);
    }

    .master-mobile-more-handle {
        width: 38px;
        height: 4px;
        margin: 0 auto 5px;
        display: block;
        border-radius: 999px;
        background: #d8d8da;
    }

    .master-mobile-more-sheet header {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .master-mobile-more-sheet h2 {
        font-size: 20px;
    }

    .master-mobile-more-sheet header button {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 9px;
        background: #f4f4f5;
        color: #454549;
        font-size: 24px;
        line-height: 1;
    }

    .master-mobile-more-sheet nav {
        margin-top: 4px;
        display: grid;
    }

    .master-mobile-more-sheet nav a {
        min-height: 47px;
        padding: 0 3px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border-top: 1px solid var(--line);
        color: var(--black);
        font-size: 13px;
        font-weight: 650;
    }

    .master-mobile-more-sheet nav b {
        color: #8f9298;
        font-size: 22px;
        font-weight: 300;
    }

    .master-mobile-more-sheet .master-mobile-more-logout {
        color: var(--red);
    }
}

.search-filter-groups {
    display: contents;
}

.mobile-filter-trigger,
.mobile-filter-backdrop,
.mobile-filter-handle,
.mobile-filter-close,
.mobile-filter-actions,
.mobile-filter-options,
.filter-label-mobile {
    display: none;
}

.search-filter-group + .search-filter-group {
    margin-top: 16px;
}

.search-filter-group > span {
    margin-bottom: 7px;
    display: block;
    color: #4f4f53;
    font-size: 12px;
    font-weight: 700;
}

.search-filters .filter-chip {
    width: 100%;
    height: 42px;
    justify-content: space-between;
    border-radius: 8px;
    background: #ffffff;
    text-align: left;
}

.search-filters .catalog-reset {
    width: 100%;
}

.search-results-panel {
    min-width: 0;
}

.search-results-panel > h1 {
    margin-bottom: 18px;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.search-results-panel .master-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .search-results-layout {
        grid-template-columns: 1fr;
    }

    .search-filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .search-filters-heading,
    .search-filters .catalog-reset {
        grid-column: 1 / -1;
    }

    .search-filters-heading h2,
    .search-filter-group + .search-filter-group,
    .search-filters .catalog-reset {
        margin-top: 0;
    }

    .search-results-panel .master-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .search-results-panel .master-cards-grid {
        grid-template-columns: 1fr;
    }

    .search-results-panel > h1 {
        font-size: 27px;
    }
}

.master-card {
    min-height: 212px;
    padding: 16px;
    position: relative;
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 17px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.master-card-photo {
    min-height: 178px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(145deg, #eeeeef, #dddddf);
    background-position: center;
    background-size: cover;
}

.master-photo-placeholder {
    width: 88px;
    height: 88px;
    position: relative;
    display: block;
    border-radius: 50% 50% 12px 12px;
    background: #b9b9bd;
    transform: translateY(24px);
}

.master-photo-placeholder::before {
    width: 42px;
    height: 42px;
    position: absolute;
    top: -40px;
    left: 23px;
    content: "";
    border-radius: 50%;
    background: #b9b9bd;
}

.master-card-content {
    min-width: 0;
    position: relative;
    padding: 3px 42px 3px 0;
    display: flex;
    flex-direction: column;
}

.master-card-favorite {
    width: 34px;
    height: 34px;
    position: absolute;
    top: -2px;
    right: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: Arial, sans-serif;
    font-size: 25px;
}

.master-card-name {
    font-size: 19px;
    line-height: 1.3;
}

.master-card-specialization,
.master-card-location {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.master-card-rating {
    margin-top: 13px;
    display: flex;
    gap: 8px;
    color: #4c4c4c;
    font-size: 12px;
}

.rating-value {
    color: #ee9610;
    font-weight: 700;
}

.master-card-price {
    font-size: 16px;
    font-weight: 800;
}

.master-card-footer {
    margin-top: auto;
    padding-top: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.master-card-message {
    height: 42px;
    padding: 0 22px;
    flex: 0 0 auto;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-weight: 700;
}

.masters-grid,
.profile-favorites-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.profile-favorites-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-favorites-list[hidden] {
    display: none;
}

.demo-master-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.demo-master-card[hidden] {
    display: none;
}

.demo-master-card:hover {
    border-color: #e2c4c7;
    box-shadow: 0 13px 32px rgba(18, 18, 22, 0.09);
    transform: translateY(-2px);
}

.demo-master-card:focus-visible {
    outline: 3px solid rgba(233, 0, 22, 0.18);
    outline-offset: 3px;
}

.demo-master-photo {
    height: 176px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f1f1f2, #e2e2e4);
}

.demo-master-photo-placeholder {
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(80, 80, 85, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.52);
    color: #8a8a90;
}

.demo-master-photo-placeholder svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-master-photo-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.demo-master-icon-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(30, 30, 34, 0.1);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.88);
    color: #222226;
    pointer-events: auto;
    box-shadow: 0 4px 14px rgba(18, 18, 22, 0.06);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.demo-master-icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-master-icon-button:hover {
    border-color: rgba(233, 0, 22, 0.28);
    background: #ffffff;
    color: var(--red);
    transform: translateY(-1px);
}

.demo-master-icon-button:focus-visible {
    outline: 3px solid rgba(233, 0, 22, 0.18);
    outline-offset: 2px;
}

.demo-master-favorite.is-active {
    border-color: rgba(233, 0, 22, 0.22);
    color: var(--red);
}

.demo-master-favorite.is-active svg {
    fill: currentColor;
}

.demo-master-content {
    min-height: 250px;
    padding: 17px 18px 18px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.demo-master-content h3 {
    font-size: 19px;
    line-height: 1.25;
}

.demo-master-specialization {
    min-height: 38px;
    margin-top: 4px;
    color: #3e3e43;
    font-size: 13px;
    line-height: 1.45;
}

.demo-master-rating {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.demo-master-rating strong {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #dc8700;
}

.demo-master-rating svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.demo-master-location,
.demo-master-experience {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.demo-master-experience {
    margin-top: 4px;
}

.demo-master-description {
    margin-top: 11px;
    display: -webkit-box;
    overflow: hidden;
    color: #4c4c51;
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.demo-master-price {
    margin-top: auto;
    padding-top: 15px;
    color: var(--black);
    font-size: 16px;
    font-weight: 800;
}

.public-master-profile {
    padding-top: 32px;
    padding-bottom: 56px;
}

.public-master-profile[hidden] {
    display: none;
}

.public-master-card {
    display: grid;
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(18, 18, 22, 0.06);
}

.public-master-gallery {
    min-width: 0;
    padding: 14px;
    grid-row: span 2;
    background: #ffffff;
}

.public-master-photo {
    min-height: 390px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #f1f1f2, #e2e2e4);
}

.public-master-active-photo {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
}

.public-master-active-photo:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.92);
    outline-offset: -6px;
}

.public-master-photo-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    left: 14px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-master-photo-count {
    padding: 6px 9px;
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    border-radius: 7px;
    background: rgba(20, 20, 22, 0.72);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.public-master-thumbnails {
    margin-top: 10px;
    display: flex;
    gap: 9px;
    overflow-x: auto;
    scrollbar-width: none;
}

.public-master-thumbnails::-webkit-scrollbar {
    display: none;
}

.public-master-thumbnail {
    width: 74px;
    height: 62px;
    padding: 0;
    overflow: hidden;
    flex: 0 0 auto;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #f0f0f1;
}

.public-master-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.public-master-thumbnail:hover {
    border-color: #e4aeb3;
}

.public-master-thumbnail.is-active {
    border-color: var(--red);
}

.public-master-thumbnail:focus-visible {
    outline: 3px solid rgba(233, 0, 22, 0.18);
    outline-offset: 2px;
}

body.public-master-lightbox-open {
    overflow: hidden;
}

.public-master-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    padding: 28px;
    background: rgba(8, 8, 10, 0.9);
}

.public-master-lightbox[hidden] {
    display: none;
}

.public-master-lightbox-dialog {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    place-items: center;
}

.public-master-lightbox-stage {
    width: min(1380px, calc(100vw - 56px));
    height: min(880px, calc(100vh - 56px));
    position: relative;
    display: grid;
    place-items: center;
}

.public-master-lightbox-stage > img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    user-select: none;
}

.public-master-lightbox-close,
.public-master-lightbox-arrow {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.public-master-lightbox-close {
    width: 46px;
    height: 46px;
    top: 0;
    right: 0;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.public-master-lightbox-arrow {
    width: 54px;
    height: 68px;
    top: 50%;
    border-radius: 999px;
    transform: translateY(-50%);
}

.public-master-lightbox-arrow.is-previous {
    left: 18px;
}

.public-master-lightbox-arrow.is-next {
    right: 18px;
}

.public-master-lightbox-arrow svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.public-master-lightbox-close:hover,
.public-master-lightbox-arrow:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.3);
}

.public-master-lightbox-close:focus-visible,
.public-master-lightbox-arrow:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.public-master-lightbox-count {
    padding: 7px 12px;
    position: absolute;
    bottom: 16px;
    left: 50%;
    border-radius: 999px;
    background: rgba(20, 20, 22, 0.62);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.public-master-photo .demo-master-photo-placeholder {
    width: 92px;
    height: 92px;
}

.public-master-photo .demo-master-photo-placeholder svg {
    width: 48px;
    height: 48px;
}

.public-master-summary,
.public-master-details {
    padding: 34px 38px;
}

.public-master-summary h1 {
    margin-top: 12px;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.1;
}

.public-master-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #278744;
    font-size: 13px;
    font-weight: 700;
}

.public-master-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.public-master-specialization {
    margin-top: 8px;
    color: #3e3e43;
    font-size: 18px;
}

.public-master-summary .demo-master-rating {
    margin-top: 16px;
    font-size: 14px;
}

.public-master-meta {
    margin-top: 11px;
    color: var(--muted);
    font-size: 14px;
}

.public-master-price {
    margin-top: 22px;
    font-size: 22px;
    font-weight: 800;
}

.public-master-details {
    padding-top: 0;
}

.public-master-details section {
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.public-master-details section + section {
    margin-top: 24px;
}

.public-master-details h2 {
    font-size: 18px;
}

.public-master-details p {
    margin-top: 10px;
    color: #4c4c51;
    font-size: 14px;
    line-height: 1.65;
}

.public-master-services {
    margin-top: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-master-services span {
    padding: 8px 11px;
    border-radius: 8px;
    background: #f5f5f6;
    color: #3e3e43;
    font-size: 13px;
}

.public-master-message {
    min-height: 48px;
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    border-radius: 9px;
    background: var(--red);
    color: #ffffff;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.public-master-message:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.public-master-message:focus-visible {
    outline: 3px solid rgba(233, 0, 22, 0.18);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .public-master-profile {
        padding-top: 20px;
        padding-bottom: 34px;
    }

    .public-master-card {
        grid-template-columns: 1fr;
    }

    .public-master-gallery {
        grid-row: auto;
    }

    .public-master-photo {
        min-height: 240px;
    }

    .public-master-summary,
    .public-master-details {
        padding: 24px 20px;
    }

    .public-master-details {
        padding-top: 0;
    }

    .public-master-lightbox {
        padding: 14px;
    }

    .public-master-lightbox-stage {
        width: calc(100vw - 28px);
        height: calc(100vh - 28px);
    }

    .public-master-lightbox-close {
        width: 42px;
        height: 42px;
    }

    .public-master-lightbox-arrow {
        width: 44px;
        height: 58px;
    }

    .public-master-lightbox-arrow.is-previous {
        left: 8px;
    }

    .public-master-lightbox-arrow.is-next {
        right: 8px;
    }
}

.masters-grid .demo-master-description,
.home-master-grid .demo-master-description {
    display: none;
}

.demo-feedback {
    max-width: min(420px, calc(100vw - 40px));
    padding: 12px 18px;
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 1200;
    border-radius: 9px;
    background: #1d1d21;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.demo-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 760px) {
    .masters-page .container {
        width: calc(100% - 32px);
    }

    .masters-page .site-header {
        height: 64px;
    }

    .masters-page .brand {
        width: 106px;
    }

    .masters-page .brand img {
        width: 104px;
    }

    .masters-page .location-selector {
        margin-left: 5px;
    }

    .masters-page .location-button {
        padding: 0 9px;
    }

    .masters-page .main-navigation,
    .masters-page .dimon-button,
    .masters-page .favorite-button,
    .masters-page .notification-button {
        display: none;
    }

    .masters-page .login-button {
        padding: 0 14px;
    }

    .masters-page .location-modal {
        width: min(360px, calc(100vw - 32px));
        right: 0;
        left: auto;
    }

    .catalog-main {
        padding: 30px 0 44px;
    }

    .catalog-title {
        font-size: 30px;
    }

    .vin-results-page .marketplace-header {
        height: auto;
    }

    .vin-results-page .catalog-main {
        padding-top: 28px;
    }

    .vin-results-page .catalog-title {
        max-width: 100%;
        font-size: 25px;
        font-weight: 800;
        line-height: 1.2;
        text-wrap: balance;
    }

    .vin-results-page .vin-results-heading p {
        margin-top: 10px;
        overflow-wrap: break-word;
    }

    .catalog-filters {
        padding-bottom: 4px;
        overflow-x: auto;
    }

    .advanced-filters {
        margin-left: 0;
    }

    .master-cards-grid {
        grid-template-columns: 1fr;
    }

    .vin-results-page .master-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .vin-results-page .demo-master-photo {
        height: 118px;
    }

    .vin-results-page .demo-master-photo-actions {
        top: 8px;
        right: 8px;
        left: 8px;
    }

    .vin-results-page .demo-master-icon-button {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .vin-results-page .demo-master-icon-button svg {
        width: 16px;
        height: 16px;
    }

    .vin-results-page .demo-master-photo-placeholder {
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }

    .vin-results-page .demo-master-photo-placeholder svg {
        width: 28px;
        height: 28px;
    }

    .vin-results-page .demo-master-content {
        min-height: 210px;
        padding: 12px 11px 13px;
    }

    .vin-results-page .demo-master-content h3 {
        font-size: 16px;
        line-height: 1.25;
        overflow-wrap: normal;
        word-break: normal;
    }

    .vin-results-page .demo-master-specialization {
        min-height: 32px;
        margin-top: 3px;
        font-size: 11px;
        line-height: 1.35;
        overflow-wrap: normal;
        word-break: normal;
    }

    .vin-results-page .demo-master-rating {
        margin-top: 7px;
        gap: 4px;
        flex-wrap: wrap;
        font-size: 10px;
    }

    .vin-results-page .demo-master-rating svg {
        width: 12px;
        height: 12px;
    }

    .vin-results-page .demo-master-location,
    .vin-results-page .demo-master-experience {
        margin-top: 6px;
        font-size: 10px;
        line-height: 1.4;
        overflow-wrap: normal;
        word-break: normal;
    }

    .vin-results-page .demo-master-experience {
        margin-top: 3px;
    }

    .vin-results-page .demo-master-price {
        padding-top: 11px;
        font-size: 14px;
        line-height: 1.25;
    }

    .catalog-empty-state {
        min-height: 200px;
        padding: 28px 20px;
    }

    .master-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 13px;
    }

    .master-card-photo {
        min-height: 132px;
    }

    .master-card-content {
        padding-right: 34px;
    }

    .master-card-message {
        min-width: 108px;
        padding: 0 14px;
    }
}

/* Вход и регистрация */
body.auth-page {
    min-width: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.90)),
        url("assets/hero/japan_background.png") center / cover fixed no-repeat;
}

.auth-shell {
    min-height: 100vh;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(430px, 100%);
    position: relative;
    overflow: hidden;
    border: 1px solid #e1e1e1;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 14px 42px rgba(18, 18, 22, 0.10);
}

.auth-close {
    width: 34px;
    height: 34px;
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #777777;
    font-size: 25px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.auth-close:hover {
    background: #f2f2f2;
    color: var(--black);
}

.auth-brand {
    min-height: 112px;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--line);
}

.auth-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand img {
    width: 190px;
    max-width: 100%;
    height: auto;
    max-height: 76px;
    display: block;
    object-fit: contain;
}

.auth-card-body {
    padding: 29px 32px 34px;
}

.auth-card-body h1 {
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.auth-form {
    margin-top: 23px;
    display: grid;
    gap: 19px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field > span:first-child {
    font-size: 14px;
    font-weight: 600;
}

.auth-input-control {
    height: 52px;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 9px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-control:focus-within {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.auth-field-icon {
    width: 20px;
    height: 20px;
    margin-left: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: #707070;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-input-control input {
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--black);
    font-size: 14px;
}

.auth-input-control input::placeholder {
    color: #9d9d9d;
}

.auth-password-control input {
    padding-right: 4px;
}

.auth-password-toggle {
    width: 46px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #707070;
}

.auth-password-toggle svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-password-toggle[aria-pressed="true"] .auth-eye-slash {
    display: none;
}

.auth-primary-button {
    height: 52px;
    margin-top: 7px;
    border: 1px solid var(--red);
    border-radius: 9px;
    background: var(--red);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(233, 0, 22, 0.16);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-primary-button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.auth-divider {
    margin-top: 27px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #777777;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    content: "";
    background: var(--line);
}

.auth-switch {
    margin-top: 27px;
    text-align: center;
}

.auth-switch p {
    font-size: 15px;
}

.auth-switch a {
    margin-top: 8px;
    display: inline-block;
    color: var(--red);
    font-size: 15px;
    font-weight: 600;
}

.auth-switch a:hover {
    color: var(--red-dark);
}

@media (max-width: 600px) {
    .auth-shell {
        min-height: 100dvh;
        padding: 12px 16px;
        align-items: center;
    }

    .auth-card {
        width: calc(100vw - 32px);
        max-height: 88vh;
        max-height: 88dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .auth-brand {
        min-height: 78px;
        padding: 10px 20px;
        flex: 0 0 auto;
    }

    .auth-brand img {
        width: 150px;
        max-height: 58px;
    }

    .auth-card-body {
        min-height: 0;
        padding: 18px 20px 22px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .auth-card-body h1 {
        font-size: 22px;
    }

    .auth-form {
        margin-top: 16px;
        gap: 14px;
    }

    .auth-input-control,
    .auth-primary-button {
        height: 48px;
    }

    .auth-divider,
    .auth-switch {
        margin-top: 20px;
    }
}

@media (max-width: 760px) {
    body.mobile-filters-open {
        overflow: hidden;
    }

    .mobile-filter-trigger {
        width: fit-content;
        min-height: 42px;
        margin: 42px 0 16px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: #ffffff;
        color: #303034;
        font-size: 13px;
        font-weight: 700;
        box-shadow: 0 6px 18px rgba(18, 18, 22, 0.045);
    }

    .mobile-filter-trigger svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .mobile-filter-trigger b {
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: var(--red);
        color: #ffffff;
        font-size: 11px;
        line-height: 1;
    }

    .mobile-filter-trigger b[hidden] {
        display: none;
    }

    .mobile-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 135;
        display: block;
        background: rgba(17, 17, 17, 0.42);
        backdrop-filter: blur(2px);
    }

    .mobile-filter-backdrop[hidden] {
        display: none;
    }

    .search-filters {
        width: 100%;
        max-height: 82vh;
        max-height: 82dvh;
        padding: 8px 16px calc(12px + env(safe-area-inset-bottom));
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 136;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow: hidden;
        visibility: hidden;
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
        transition: transform 0.24s ease, visibility 0s linear 0.24s;
        box-shadow: 0 -16px 44px rgba(18, 18, 22, 0.18);
        pointer-events: none;
    }

    .search-filters[data-open="true"] {
        visibility: visible;
        transform: translateY(0);
        transition-delay: 0s;
        pointer-events: auto;
    }

    .mobile-filter-handle {
        width: 42px;
        height: 4px;
        margin: 0 auto 7px;
        display: block;
        flex: 0 0 auto;
        border-radius: 2px;
        background: #d7d7da;
    }

    .search-filters-heading {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex: 0 0 auto;
    }

    .search-filters-heading h2 {
        margin: 0;
        font-size: 21px;
    }

    .mobile-filter-close {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        border: 0;
        border-radius: 8px;
        background: #f4f4f5;
        color: #55555a;
        font-size: 24px;
        line-height: 1;
    }

    .search-filter-groups {
        min-height: 0;
        padding: 8px 0 14px;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .search-filter-group[data-mobile-filter-group="district"] {
        order: 1;
    }

    .search-filter-group[data-mobile-filter-group="service"] {
        order: 2;
    }

    .search-filter-group[data-mobile-filter-group="rating"] {
        order: 3;
    }

    .search-filter-group[data-mobile-filter-group="experience"] {
        order: 4;
    }

    .search-filter-group + .search-filter-group {
        margin-top: 17px;
    }

    .search-filter-group > span {
        margin-bottom: 9px;
        color: #2f2f33;
        font-size: 13px;
    }

    .filter-label-desktop {
        display: none;
    }

    .filter-label-mobile {
        display: inline;
    }

    .search-filters .filter-chip,
    .search-filters > .catalog-reset {
        display: none;
    }

    .mobile-filter-options {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-filter-option {
        min-height: 36px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #ffffff;
        color: #3f3f43;
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-filter-option.is-selected {
        border-color: rgba(233, 0, 22, 0.42);
        background: #fff0f2;
        color: var(--red);
    }

    .mobile-filter-actions {
        padding-top: 12px;
        display: grid;
        grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
        gap: 10px;
        flex: 0 0 auto;
        border-top: 1px solid var(--line);
        background: #ffffff;
    }

    .mobile-filter-reset,
    .mobile-filter-apply {
        min-height: 46px;
        border-radius: 9px;
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-filter-reset {
        border: 1px solid #dedede;
        background: #ffffff;
        color: #4a4a4f;
    }

    .mobile-filter-reset:disabled {
        opacity: 0.48;
        cursor: default;
    }

    .mobile-filter-apply {
        border: 1px solid var(--red);
        background: var(--red);
        color: #ffffff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .search-filters {
        transition: none;
    }
}

/* Модальное окно авторизации на главной странице */
body.auth-modal-open {
    overflow: hidden;
}

.auth-modal[hidden],
.auth-view[hidden] {
    display: none;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.44);
    backdrop-filter: blur(2px);
}

.auth-modal-card {
    width: min(430px, calc(100vw - 40px));
    max-height: calc(100vh - 56px);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-modal .auth-close {
    border: 0;
    background: transparent;
}

.auth-modal .auth-brand {
    min-height: 102px;
    padding: 16px 32px;
}

.auth-modal .auth-brand img {
    width: 184px;
    max-width: 100%;
    height: auto;
    max-height: 72px;
    display: block;
    object-fit: contain;
}

.auth-modal .auth-card-body {
    padding: 27px 32px 31px;
}

.auth-modal .auth-form {
    margin-top: 21px;
    gap: 17px;
}

.auth-modal .auth-switch {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.auth-switch-button {
    border: 0;
    background: transparent;
    color: var(--red);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-switch-button:hover {
    color: var(--red-dark);
}

@media (max-width: 600px) {
    .auth-modal {
        padding: 12px 16px;
    }

    .auth-modal-card {
        width: calc(100vw - 32px);
        max-height: 88vh;
        max-height: 88dvh;
    }

    .auth-modal .auth-brand {
        min-height: 78px;
        padding: 10px 20px;
    }

    .auth-modal .auth-brand img {
        width: 150px;
        max-height: 58px;
    }

    .auth-modal .auth-card-body {
        padding: 18px 20px 22px;
    }
}

/* Анкета «Стать мастером» */
body.master-application-page {
    min-width: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.90)),
        url("assets/hero/japan_background.png") center / cover fixed no-repeat;
}

.master-application-shell {
    min-height: 100vh;
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.master-application-card {
    width: min(650px, 100%);
    max-height: calc(100vh - 56px);
    overflow-x: hidden;
    overflow-y: auto;
}

.master-application-brand {
    min-height: 102px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.master-application-brand img {
    width: 184px;
    max-height: 72px;
}

.master-application-body {
    padding: 28px 38px 36px;
}

.master-application-intro {
    text-align: center;
}

.master-application-intro h1 {
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.master-application-intro p {
    max-width: 470px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.master-application-form {
    margin-top: 30px;
    gap: 20px;
}

.master-field-hint {
    color: #858585;
    font-size: 12px;
    line-height: 1.4;
}

.master-application-textarea {
    width: 100%;
    min-height: 118px;
    padding: 14px 16px;
    resize: vertical;
    border: 1px solid #dddddd;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.master-application-textarea::placeholder {
    color: #9d9d9d;
}

.master-application-textarea:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.master-photos-field > span:first-child {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.master-photos-field > span:first-child small {
    color: #878787;
    font-size: 12px;
    font-weight: 400;
}

.master-upload-area {
    min-height: 164px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #bfc0c4;
    border-radius: 10px;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.master-upload-area:hover {
    border-color: var(--red);
    background: #fff8f8;
}

.master-upload-area svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #777a80;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-upload-area strong {
    max-width: 360px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.master-upload-area span,
.master-upload-area small {
    margin-top: 7px;
    color: #88898e;
    font-size: 12px;
}

.master-application-submit {
    width: min(320px, 100%);
    margin: 6px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .master-application-shell {
        min-height: 100dvh;
        padding: 12px 16px;
        align-items: center;
    }

    .master-application-card {
        width: calc(100vw - 32px);
        max-height: 88vh;
        max-height: 88dvh;
        overflow: hidden;
    }

    .master-application-brand {
        min-height: 78px;
        padding: 10px 20px;
    }

    .master-application-brand img {
        width: 150px;
        max-height: 58px;
    }

    .master-application-body {
        padding: 18px 20px 22px;
    }

    .master-application-intro h1 {
        font-size: 22px;
    }

    .master-application-intro p {
        font-size: 14px;
    }

    .master-application-form {
        margin-top: 18px;
        gap: 14px;
    }

    .master-upload-area {
        min-height: 128px;
        padding: 17px 14px;
    }
}

/* Временный DEV-переключатель тестовой авторизации */
.dev-auth-switch {
    padding: 6px;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    background: #202024;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 17, 17, 0.18);
}

.dev-auth-label {
    padding-left: 5px;
    color: #b9b9bd;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dev-auth-options {
    padding: 2px;
    display: flex;
    gap: 2px;
    border-radius: 6px;
    background: #303034;
}

.dev-auth-button {
    height: 26px;
    padding: 0 9px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #cfcfd2;
    font-size: 10px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.dev-auth-button:hover {
    color: #ffffff;
}

.dev-auth-button.is-active {
    background: #ffffff;
    color: #111111;
}

.dev-auth-button[data-dev-auth-state="user"].is-active {
    background: var(--red);
    color: #ffffff;
}

/* Главная marketplace для авторизованного пользователя */
body.marketplace-home-page {
    min-width: 0;
    overflow-x: hidden;
    background: var(--page);
}

.marketplace-header {
    height: 84px;
}

.marketplace-header-inner {
    height: 100%;
    display: grid;
    grid-template-columns: 148px auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.marketplace-brand {
    width: 148px;
}

.marketplace-location-selector {
    margin-left: 0;
}

.marketplace-location-button {
    max-width: 150px;
}

.marketplace-location-button > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketplace-search {
    min-width: 0;
    height: 46px;
    display: flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 7px 22px rgba(18, 18, 22, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.marketplace-search:focus-within {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.marketplace-search > svg {
    width: 19px;
    height: 19px;
    margin-left: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: #707070;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.marketplace-search input {
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--black);
    font-size: 14px;
}

.marketplace-search input::placeholder {
    color: #959595;
}

.marketplace-search button {
    min-width: 88px;
    height: 34px;
    margin-right: 5px;
    padding: 0 18px;
    flex: 0 0 auto;
    border: 1px solid var(--red);
    border-radius: 7px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.marketplace-search button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.marketplace-tools {
    display: flex;
    align-items: stretch;
    gap: 3px;
}

.marketplace-tool.marketplace-home-tool,
.marketplace-assistant-label-mobile {
    display: none;
}

.marketplace-tool {
    min-width: 64px;
    height: 62px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4d4d4d;
    font-size: 10px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.marketplace-tool:hover {
    background: #f4f4f4;
    color: var(--black);
}

.marketplace-tool-icon,
.marketplace-user-avatar,
.marketplace-assistant-avatar {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.marketplace-tool-icon svg,
.marketplace-assistant-avatar svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.marketplace-user-avatar,
.marketplace-assistant-avatar {
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.marketplace-user-avatar {
    background: #eeeeef;
    color: #3d3d3d;
}

.marketplace-assistant-avatar {
    background: var(--red);
    color: #ffffff;
}

.marketplace-assistant-avatar svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
}

.marketplace-assistant-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    object-fit: cover;
}

.marketplace-main {
    min-height: calc(100vh - 84px);
    padding-bottom: 64px;
}

.marketplace-vin-section {
    padding-top: 24px;
}

.marketplace-vin-card {
    margin-top: 0;
}

.marketplace-vin-card .vin-copy h1 {
    font-size: 18px;
    line-height: 1.3;
}

.home-vin-result {
    margin-top: 12px;
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid #ead5d7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.home-vin-result[hidden] {
    display: none;
}

.home-vin-result strong,
.home-vin-result p,
.home-vin-result small {
    display: block;
}

.home-vin-result strong {
    color: var(--red);
    font-size: 16px;
}

.home-vin-result p {
    margin-top: 4px;
    color: #4f4f53;
    font-size: 13px;
}

.home-vin-result small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.home-vin-result.is-error {
    border-color: #e2e2e2;
}

.home-vin-result.is-error strong {
    color: #313136;
}

.home-vin-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.home-vin-actions button {
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.home-vin-actions button + button {
    background: #ffffff;
    color: var(--red);
}

.home-vin-actions button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
    color: #ffffff;
}

.marketplace-content {
    padding-top: 36px;
}

.marketplace-section + .marketplace-section {
    margin-top: 42px;
}

.marketplace-section-heading {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.marketplace-section-heading h2 {
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.marketplace-section-heading p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.marketplace-section-heading a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--red);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.marketplace-section-heading a:hover {
    color: var(--red-dark);
}

.home-master-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.master-feed-sentinel {
    width: 100%;
    height: 2px;
    margin-top: 12px;
}

.marketplace-empty-state {
    min-height: 154px;
    padding: 32px 36px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.marketplace-empty-state h3 {
    font-size: 20px;
    line-height: 1.3;
}

.marketplace-empty-state p {
    max-width: 620px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.service-card {
    min-height: 104px;
    padding: 19px 18px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    border-color: #e2c4c7;
    box-shadow: 0 12px 30px rgba(18, 18, 22, 0.07);
    transform: translateY(-2px);
}

.service-card-number {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #fff0f2;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
}

.service-card strong,
.service-card small {
    display: block;
}

.service-card strong {
    font-size: 15px;
    line-height: 1.35;
}

.service-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.service-card-arrow {
    color: var(--red);
    font-size: 20px;
    transition: transform 0.2s ease;
}

.service-card:hover .service-card-arrow {
    transform: translateX(3px);
}

/* Frontend-чат ассистента */
body.assistant-chat-open {
    overflow: hidden;
}

.assistant-chat-layer[hidden] {
    display: none;
}

.assistant-chat-layer {
    position: fixed;
    inset: 0;
    z-index: 120;
}

.assistant-chat-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.34);
    backdrop-filter: blur(2px);
}

.assistant-chat-panel {
    width: min(390px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 32px));
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(18, 18, 22, 0.19);
}

.assistant-chat-header {
    min-height: 76px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--line);
}

.assistant-chat-avatar {
    width: 40px;
    height: 40px;
}

.assistant-chat-avatar svg {
    width: 24px;
    height: 24px;
}

.assistant-chat-header h2 {
    font-size: 17px;
    line-height: 1.2;
}

.assistant-chat-header p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.assistant-chat-close {
    width: 34px;
    height: 34px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #777777;
    font-size: 24px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.assistant-chat-close:hover {
    background: #f3f3f3;
    color: var(--black);
}

.assistant-chat-body {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
    background: #fafafa;
}

.assistant-message {
    max-width: 88%;
    padding: 14px 15px;
    border: 1px solid #ececec;
    border-radius: 4px 12px 12px 12px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(18, 18, 22, 0.04);
}

.assistant-message strong {
    font-size: 14px;
}

.assistant-message p {
    margin-top: 6px;
    color: #535353;
    font-size: 13px;
    line-height: 1.5;
}

.assistant-message + .assistant-message {
    margin-top: 10px;
}

.assistant-message-user {
    margin-left: auto;
    border-color: #f2d5d8;
    border-radius: 12px 4px 12px 12px;
    background: #fff0f2;
}

.assistant-message-user p {
    margin-top: 0;
    color: #28282b;
}

.assistant-chat-disclaimer {
    margin: 0;
    padding: 9px 16px 0;
    background: #ffffff;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.assistant-chat-disclaimer + .assistant-chat-composer {
    border-top: 0;
}

.assistant-chat-composer {
    min-height: 70px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.assistant-chat-composer input {
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    flex: 1;
    border: 1px solid #dddddd;
    border-radius: 9px;
    outline: none;
    color: var(--black);
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.assistant-chat-composer input:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.assistant-chat-composer button {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    border-radius: 50%;
    background: var(--red);
    color: #ffffff;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.assistant-send-icon {
    width: 19px;
    height: 19px;
    display: block;
    object-fit: contain;
}

.assistant-chat-composer button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

@media (max-width: 1180px) {
    .marketplace-header {
        height: auto;
    }

    .marketplace-header-inner {
        min-height: 84px;
        padding-top: 10px;
        padding-bottom: 10px;
        grid-template-columns: 140px auto minmax(240px, 1fr);
        row-gap: 8px;
    }

    .marketplace-brand {
        width: 140px;
    }

    .marketplace-brand img {
        width: 136px;
    }

    .marketplace-tools {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .marketplace-main {
        min-height: calc(100vh - 150px);
    }
}

@media (max-width: 760px) {
    body:has(.marketplace-header) {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .marketplace-home-page .container {
        width: calc(100% - 32px);
    }

    .marketplace-header-inner {
        min-height: 0;
        padding-top: 10px;
        padding-bottom: 10px;
        grid-template-columns: minmax(120px, 1fr) auto;
        gap: 8px 12px;
    }

    .marketplace-brand {
        width: 132px;
    }

    .marketplace-brand img {
        width: 128px;
    }

    .marketplace-location-button {
        max-width: 138px;
    }

    .marketplace-location-selector .location-modal {
        width: min(360px, calc(100vw - 32px));
        right: 0;
        left: auto;
    }

    .marketplace-search {
        grid-column: 1 / -1;
    }

    .marketplace-tools {
        width: 100%;
        min-height: calc(64px + env(safe-area-inset-bottom));
        padding: 4px 8px env(safe-area-inset-bottom);
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 110;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        gap: 0;
        border-top: 1px solid #e5e5e5;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -8px 24px rgba(18, 18, 22, 0.08);
        backdrop-filter: blur(14px);
    }

    .marketplace-tool {
        min-width: 0;
        height: 60px;
        padding: 5px 2px 4px;
        gap: 2px;
        border-radius: 8px;
        color: #64646a;
        font-size: 10px;
        line-height: 1.1;
    }

    .marketplace-tool.marketplace-home-tool {
        display: flex;
        order: 1;
    }

    .marketplace-favorites-tool {
        order: 2;
    }

    .marketplace-assistant-tool {
        order: 3;
    }

    .marketplace-messages-tool {
        order: 4;
    }

    .marketplace-profile-tool {
        order: 5;
    }

    .marketplace-assistant-label-desktop {
        display: none;
    }

    .marketplace-assistant-label-mobile {
        display: inline;
    }

    .marketplace-tool.is-active,
    .marketplace-assistant-tool[aria-expanded="true"] {
        background: #fff1f2;
        color: var(--red);
    }

    .marketplace-tool-icon,
    .marketplace-user-avatar,
    .marketplace-assistant-avatar {
        width: 27px;
        height: 27px;
    }

    .marketplace-main {
        padding-bottom: calc(34px + env(safe-area-inset-bottom));
    }

    .marketplace-vin-section {
        padding-top: 18px;
    }

    .marketplace-vin-card {
        padding: 22px;
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .marketplace-vin-card .vin-copy {
        min-width: 0;
    }

    .marketplace-vin-card .vin-form {
        width: 100%;
        min-width: 0;
    }

    .marketplace-vin-card .vin-form input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .marketplace-content {
        padding-top: 30px;
    }

    .marketplace-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .home-master-grid[data-master-list="recommended"] {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .home-master-grid[data-master-list="recommended"]::-webkit-scrollbar {
        display: none;
    }

    .home-master-grid[data-master-list="recommended"] .demo-master-card {
        width: calc((100% - 10px) / 2);
        flex: 0 0 calc((100% - 10px) / 2);
        scroll-snap-align: start;
    }

    .home-master-grid[data-master-list="all"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-master-grid .demo-master-photo {
        height: 118px;
    }

    .home-master-grid .demo-master-photo-actions {
        top: 8px;
        right: 8px;
        left: 8px;
    }

    .home-master-grid .demo-master-icon-button {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .home-master-grid .demo-master-icon-button svg {
        width: 16px;
        height: 16px;
    }

    .home-master-grid .demo-master-photo-placeholder {
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }

    .home-master-grid .demo-master-photo-placeholder svg {
        width: 28px;
        height: 28px;
    }

    .home-master-grid .demo-master-content {
        min-height: 210px;
        padding: 12px 11px 13px;
    }

    .home-master-grid .demo-master-content h3 {
        font-size: 16px;
        line-height: 1.25;
    }

    .home-master-grid .demo-master-specialization {
        min-height: 32px;
        margin-top: 3px;
        font-size: 11px;
        line-height: 1.35;
    }

    .home-master-grid .demo-master-rating {
        margin-top: 7px;
        gap: 4px;
        font-size: 10px;
    }

    .home-master-grid .demo-master-rating svg {
        width: 12px;
        height: 12px;
    }

    .home-master-grid .demo-master-location,
    .home-master-grid .demo-master-experience {
        margin-top: 6px;
        font-size: 10px;
        line-height: 1.4;
        overflow-wrap: break-word;
    }

    .home-master-grid .demo-master-experience {
        margin-top: 3px;
    }

    .home-master-grid .demo-master-description {
        margin-top: 8px;
        font-size: 10px;
        line-height: 1.4;
    }

    .home-master-grid .demo-master-price {
        padding-top: 11px;
        font-size: 14px;
        line-height: 1.25;
    }

    .service-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .marketplace-tool {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 9px;
    }

    .marketplace-vin-card .vin-form {
        align-items: stretch;
        flex-direction: column;
    }

    .marketplace-vin-card .vin-form input {
        flex: 0 0 50px;
    }

    .marketplace-vin-card .vin-form button {
        width: 100%;
    }

    .marketplace-section-heading h2 {
        font-size: 22px;
    }

    .marketplace-empty-state {
        min-height: 144px;
        padding: 26px 22px;
    }

    .service-cards-grid {
        grid-template-columns: 1fr;
    }

    .assistant-chat-panel {
        width: 100%;
        height: 100%;
        inset: 0;
        border: 0;
        border-radius: 0;
    }
}

/* Кабинет мастера */
.master-account-page {
    min-width: 0;
}

.master-account-layout {
    padding-top: 28px;
    padding-bottom: 64px;
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}

.master-sidebar {
    padding: 20px 14px 16px;
    position: sticky;
    top: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.master-sidebar-profile {
    padding: 0 8px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.master-sidebar-avatar {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #e4e4e4;
    border-radius: 50%;
    background: #f1f1f2;
    color: var(--red);
    font-size: 20px;
    font-weight: 800;
}

.master-sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-sidebar-profile > div {
    min-width: 0;
    display: grid;
}

.master-sidebar-profile strong {
    overflow: hidden;
    font-size: 14px;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.master-sidebar-profile span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.master-sidebar-profile small {
    width: max-content;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 5px;
    background: #f1f1f2;
    color: #737373;
    font-size: 10px;
}

.master-sidebar-nav {
    margin-top: 12px;
    display: grid;
    gap: 3px;
}

.master-sidebar-link,
.master-sidebar-logout {
    min-height: 42px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    color: #353535;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.master-sidebar-link svg,
.master-sidebar-logout svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-sidebar-link:hover {
    background: #f7f7f7;
}

.master-sidebar-link.is-active {
    background: #fff0f2;
    color: var(--red);
}

.master-sidebar-divider {
    height: 1px;
    margin: 10px 8px;
    background: var(--line);
}

.master-sidebar-logout {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    color: var(--red);
}

.master-sidebar-logout:hover {
    background: #fff7f8;
}

.master-account-main {
    min-width: 0;
}

.master-page-heading {
    margin: 4px 0 22px;
}

.master-page-heading h1 {
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.master-page-heading p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.master-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.master-stat-card {
    min-height: 92px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 7px 24px rgba(18, 18, 22, 0.04);
}

.master-stat-icon,
.master-rating-star {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: #f5f5f6;
    color: #77777d;
    font-size: 0;
}

.master-stat-icon::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
}

.master-stat-card strong {
    display: block;
    font-size: 21px;
    line-height: 1.1;
}

.master-stat-card small {
    margin-top: 5px;
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.master-rating-star svg {
    width: 25px;
    height: 25px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-rating.is-empty .master-rating-star {
    color: #a7a7ab;
}

.master-rating.is-empty [data-rating-value] {
    font-size: 16px;
}

.master-rating.is-active .master-rating-star {
    background: #fff8e7;
    color: #efa900;
}

.master-rating.is-active .master-rating-slash {
    display: none;
}

a.master-rating { color: var(--black); }
a.master-rating:hover { border-color: #e7b8bd; box-shadow: 0 9px 28px rgba(18, 18, 22, 0.07); }
a.master-rating:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.master-panel,
.master-demo-section {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.04);
}

.master-panel-heading {
    min-height: 58px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.master-panel-heading h2,
.master-demo-heading h2,
.master-detail-card h2,
.master-offer-form h2,
.master-profile-section h2 {
    font-size: 17px;
    line-height: 1.35;
}

.master-panel-heading a {
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
}

.master-empty-state {
    min-height: 260px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.master-empty-state[hidden] {
    display: none;
}

.master-empty-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f4f4f5;
    color: #717176;
}

.master-empty-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-empty-state h2,
.master-empty-state h3 {
    margin-top: 16px;
    font-size: 19px;
    line-height: 1.3;
}

.master-empty-state p {
    max-width: 520px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.master-secondary-action {
    min-height: 40px;
    margin-top: 18px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e3b9bd;
    border-radius: 8px;
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
}

.master-secondary-action:hover {
    border-color: var(--red);
    background: #fff7f8;
}

.master-incoming-empty .master-empty-state {
    min-height: 230px;
}

.master-demo-section {
    overflow: hidden;
}

.master-demo-heading {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.master-demo-heading span,
.master-demo-badge {
    display: inline-flex;
    color: var(--red);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.master-demo-heading h2 {
    margin-top: 4px;
}

.master-demo-heading small {
    color: #909095;
    font-size: 11px;
}

.master-request-row {
    min-height: 96px;
    padding: 17px 20px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 16px;
    transition: background 0.2s ease;
}

.master-request-row:hover {
    background: #fafafa;
}

.master-request-car {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--red);
}

.master-request-car svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-request-copy,
.master-request-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.master-request-copy strong {
    font-size: 14px;
}

.master-request-copy small,
.master-request-meta small {
    color: var(--muted);
    font-size: 11px;
}

.master-request-meta {
    justify-items: end;
}

.master-request-meta b {
    font-size: 13px;
}

.master-request-meta em,
.master-status-badge {
    padding: 3px 7px;
    border: 1px solid #f1a9b0;
    border-radius: 5px;
    color: var(--red);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
}

.master-request-arrow {
    color: #111111;
    font-size: 24px;
}
.master-request-meta em[data-status-tone="active"],
.master-status-badge[data-status-tone="active"] { border-color: #f1a9b0; background: #fff0f2; color: var(--red); }
.master-request-meta em[data-status-tone="progress"],
.master-status-badge[data-status-tone="progress"] { border-color: #ead28a; background: #fff7dc; color: #946200; }
.master-request-meta em[data-status-tone="success"],
.master-status-badge[data-status-tone="success"] { border-color: #a8d9b9; background: #eaf8ef; color: #16713a; }

.master-request-heading {
    margin-top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.master-request-heading h1 {
    margin-top: 7px;
}

.master-status-badge {
    margin-top: 7px;
}

.master-request-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
    gap: 18px;
}

.master-request-details {
    display: grid;
    gap: 14px;
}

.master-detail-card,
.master-offer-form,
.master-profile-section {
    margin-top: 0;
    padding: 24px;
}

.master-detail-card > p,
.master-offer-form > p,
.master-profile-section > p {
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.master-detail-card dl {
    margin-top: 15px;
    display: grid;
}

.master-detail-card dl div {
    min-height: 40px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #f0f0f0;
}

.master-detail-card dt {
    color: var(--muted);
    font-size: 12px;
}

.master-detail-card dd {
    font-size: 12px;
    font-weight: 700;
}

.master-no-photos {
    min-height: 86px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d8d8d8;
    border-radius: 9px;
    background: #fafafa;
    color: #8b8b90;
    font-size: 12px;
}

.master-offer-form {
    position: sticky;
    top: 20px;
}

.master-offer-form fieldset {
    margin-top: 20px;
    border: 0;
}

.master-offer-form legend,
.master-form-field > span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
}

.master-price-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.master-price-fields label {
    position: relative;
}

.master-price-fields label span {
    position: absolute;
    top: 14px;
    left: 12px;
    color: #999999;
    font-size: 12px;
}

.master-price-fields input {
    padding-left: 36px;
}

.master-form-field {
    margin-top: 16px;
    display: block;
}

.master-price-fields input,
.master-form-field input,
.master-form-field select,
.master-form-field textarea {
    width: 100%;
    border: 1px solid #dddddd;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    font: inherit;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.master-price-fields input,
.master-form-field input,
.master-form-field select {
    height: 44px;
    padding-right: 12px;
}

.master-form-field input,
.master-form-field select {
    padding-left: 12px;
}

.master-form-field textarea {
    min-height: 118px;
    padding: 12px;
    resize: vertical;
}

.master-price-fields input:focus,
.master-form-field input:focus,
.master-form-field select:focus,
.master-form-field textarea:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.master-form-field small {
    margin-top: 6px;
    display: block;
    color: #8a8a8f;
    font-size: 11px;
}

.master-form-status {
    min-height: 18px;
    margin-top: 12px;
    color: var(--red-dark);
    font-size: 11px;
    line-height: 1.45;
}

.master-primary-action {
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.master-primary-action:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.master-reviews-list {
    display: block;
}

.master-reviews-rating {
    min-height: 68px;
    margin-top: 16px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 7px 24px rgba(18, 18, 22, .035);
}

.master-reviews-rating p { font-size: 18px; font-weight: 700; }
.master-rating-summary-star { margin-right: 3px; color: #efa900; font-size: 25px; vertical-align: -1px; }
.master-reviews-section { overflow: hidden; }
.master-review-card {
    min-height: 116px;
    padding: 20px 22px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--black);
    cursor: pointer;
    transition: background .16s ease;
}

.master-review-card:last-child { border-bottom: 0; }
.master-review-card:hover { background: #fffafb; }
.master-review-card:focus-visible { position: relative; outline: 2px solid var(--red); outline-offset: -2px; }
.master-review-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #f2f3f5; color: #74777d; font-size: 16px; font-weight: 700; }
.master-review-content { min-width: 0; display: block; }
.master-review-request-number { display: block; color: var(--muted); font-size: 12px; }
.master-review-client { margin-top: 5px; display: block; font-size: 15px; }
.master-review-stars { display: block; color: #efa900; letter-spacing: 1px; white-space: nowrap; }
.master-review-meta { align-self: start; display: grid; justify-items: end; gap: 8px; }
.master-review-card time { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; }
.master-review-card p { margin-top: 7px; white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.master-review-chevron { color: #8f9298; font-size: 25px; font-weight: 300; line-height: 1; }
.master-request-review-heading { margin-top: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.master-request-review-heading > div { display: grid; gap: 6px; }
.master-request-review-heading time { color: var(--muted); font-size: 11px; }

@media (max-width: 700px) {
    .master-reviews-rating { min-height: 62px; padding: 14px 16px; }
    .master-review-card { padding: 17px 15px; grid-template-columns: 38px minmax(0, 1fr) 16px; align-items: start; gap: 12px; }
    .master-review-avatar { width: 38px; height: 38px; }
    .master-review-content { grid-column: 2; }
    .master-review-meta { grid-column: 2; display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
    .master-review-chevron { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}

.master-primary-action.is-sent,
.master-primary-action.is-sent:hover {
    border-color: var(--red);
    background: #ffffff;
    color: var(--red);
    cursor: default;
    opacity: 1;
}

.master-form-note {
    margin-top: 10px;
    display: block;
    color: #929297;
    font-size: 10px;
    line-height: 1.45;
    text-align: center;
}

.master-saved-offer {
    min-height: 100px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.master-saved-offer[hidden] {
    display: none;
}

.master-saved-offer h2 {
    margin-top: 7px;
    font-size: 16px;
}

.master-saved-offer p,
.master-saved-offer small {
    margin-top: 5px;
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.master-saved-offer > div:last-child {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.master-saved-offer em {
    color: #24824b;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.master-profile-form {
    display: grid;
    gap: 16px;
}

.master-profile-avatar-row {
    margin-top: 18px;
    padding-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}

.master-profile-avatar {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 50%;
    background: #f1f1f2;
    color: var(--red);
    font-size: 23px;
    font-weight: 800;
}

.master-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-profile-avatar img[hidden],
.master-profile-avatar span[hidden] {
    display: none;
}

.master-profile-avatar-row > div {
    display: grid;
    gap: 8px;
}

.master-profile-avatar-row > div > strong {
    font-size: 14px;
}

.master-profile-avatar-row > div > div {
    display: flex;
    gap: 9px;
}

.master-profile-upload,
.master-profile-avatar-row button {
    min-height: 36px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.master-profile-upload {
    background: var(--red);
    color: #ffffff;
}

.master-profile-avatar-row button {
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #555555;
}

.master-profile-avatar-row small {
    color: #8c8c91;
    font-size: 10px;
}

.master-profile-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.master-form-wide {
    grid-column: 1 / -1;
}

.master-work-upload {
    min-height: 120px;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed #ceced2;
    border-radius: 9px;
    background: #fafafa;
    color: var(--muted);
    cursor: pointer;
}

.master-work-upload svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.master-work-upload strong {
    color: var(--black);
    font-size: 12px;
}

.master-work-upload span {
    font-size: 10px;
}

.master-work-list {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.master-work-photo {
    aspect-ratio: 1.35;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #eeeeee;
}

.master-work-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-work-photo button {
    width: 25px;
    height: 25px;
    position: absolute;
    top: 6px;
    right: 6px;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.72);
    color: #ffffff;
    line-height: 1;
}

.master-profile-save {
    width: 220px;
    justify-self: end;
}

@media (max-width: 1180px) {
    .master-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .master-request-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
    }
}

@media (max-width: 980px) {
    .master-account-page .container {
        width: calc(100% - 32px);
    }

    .master-account-layout {
        grid-template-columns: 1fr;
    }

    .master-sidebar {
        position: static;
    }

    .master-sidebar-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .master-sidebar-divider {
        grid-column: 1 / -1;
    }

    .master-sidebar-logout {
        width: max-content;
    }

    .master-request-layout {
        grid-template-columns: 1fr;
    }

    .master-offer-form {
        position: static;
    }
}

@media (max-width: 720px) {
    .master-account-layout {
        padding-top: 18px;
        gap: 18px;
    }

    .master-sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .master-stats,
    .master-profile-grid {
        grid-template-columns: 1fr;
    }

    .master-form-wide {
        grid-column: auto;
    }

    .master-request-row {
        grid-template-columns: 44px minmax(0, 1fr) 16px;
    }

    .master-request-meta {
        grid-column: 2;
        justify-items: start;
    }

    .master-request-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .master-demo-heading,
    .master-request-heading,
    .master-saved-offer {
        align-items: flex-start;
        flex-direction: column;
    }

    .master-profile-save {
        width: 100%;
    }

    .master-work-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Профиль обычного пользователя marketplace */
.profile-main {
    min-height: calc(100vh - 84px);
    padding: 48px 0 72px;
}

.profile-container {
    max-width: 1120px;
}

.profile-mobile-title {
    display: none;
}

.profile-master-title-mobile,
.profile-master-button-mobile {
    display: none;
}

.profile-identity {
    padding: 10px 0 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar-placeholder {
    width: 116px;
    height: 116px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background: linear-gradient(145deg, #f3f3f4, #e4e4e6);
    color: #919196;
    overflow: hidden;
}

.profile-avatar-placeholder img,
.profile-photo-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-avatar-placeholder img[hidden],
.profile-photo-preview img[hidden] {
    display: none;
}

.profile-avatar-placeholder svg {
    width: 60px;
    height: 60px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-identity h1 {
    margin-top: 20px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.profile-edit-button {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.profile-edit-button:hover {
    color: var(--black);
}

.profile-edit-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.profile-edit-open {
    overflow: hidden;
}

.profile-edit-layer {
    position: fixed;
    inset: 0;
    z-index: 80;
    padding: 32px;
    display: grid;
    place-items: center;
}

.profile-edit-layer[hidden] {
    display: none;
}

.profile-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.52);
    backdrop-filter: blur(3px);
}

.profile-edit-dialog {
    width: min(620px, 100%);
    max-height: calc(100vh - 64px);
    padding: 28px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    border: 1px solid #e3e3e3;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(17, 17, 17, 0.2);
}

.profile-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.profile-edit-header h2 {
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-edit-header p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.profile-edit-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: #f5f5f5;
    color: #555555;
    font-size: 24px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.profile-edit-close:hover {
    background: #eeeeee;
    color: var(--black);
}

.profile-edit-form {
    margin-top: 26px;
}

.profile-photo-editor {
    padding-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}

.profile-photo-preview {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 50%;
    background: linear-gradient(145deg, #f3f3f4, #e4e4e6);
    color: #919196;
}

.profile-photo-preview svg {
    width: 44px;
    height: 44px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-photo-controls {
    display: grid;
    gap: 9px;
}

.profile-photo-controls strong {
    font-size: 14px;
}

.profile-photo-controls > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-photo-change,
.profile-photo-remove {
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.profile-photo-change {
    border: 1px solid var(--red);
    background: var(--red);
    color: #ffffff;
}

.profile-photo-change:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.profile-photo-remove {
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #5f5f5f;
}

.profile-photo-remove:hover {
    border-color: #cfcfcf;
    background: #f7f7f7;
    color: var(--black);
}

.profile-photo-controls small {
    color: #8a8a8a;
    font-size: 12px;
}

.profile-edit-fields {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-edit-field {
    display: grid;
    gap: 8px;
}

.profile-edit-field span {
    font-size: 13px;
    font-weight: 700;
}

.profile-edit-field input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-edit-field input:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.profile-edit-display-field {
    grid-column: 1 / -1;
}

.profile-edit-status {
    min-height: 18px;
    margin-top: 12px;
    color: var(--red-dark);
    font-size: 12px;
    line-height: 1.4;
}

.profile-edit-save {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-edit-save:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.profile-card-list {
    display: grid;
    gap: 14px;
}

.profile-card {
    min-height: 112px;
    padding: 22px 26px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.profile-card:hover {
    border-color: #dedede;
    box-shadow: 0 12px 32px rgba(18, 18, 22, 0.075);
    transform: translateY(-1px);
}

.profile-card-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f4f4f5;
    color: var(--black);
}

.profile-card-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-card-icon-accent {
    background: #fff0f2;
    color: var(--red);
}

.profile-card-copy {
    min-width: 0;
}

.profile-card-copy strong,
.profile-card-copy small {
    display: block;
}

.profile-card-copy strong {
    font-size: 19px;
    line-height: 1.3;
}

.profile-card-copy small {
    max-width: 520px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.profile-card-action {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--black);
    font-size: 13px;
    font-weight: 700;
}

.profile-card-action b {
    color: var(--red);
    font-size: 19px;
    font-weight: 500;
}

.profile-master-card {
    border-color: #eadbdd;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 68%, #fff8f9 100%);
}

.profile-master-button {
    min-width: 172px;
    min-height: 44px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-master-button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.profile-internal-main {
    padding-top: 42px;
}

.profile-section-header {
    margin-bottom: 22px;
}

.profile-section-header h1 {
    margin-top: 0;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-empty-state,
.profile-form-card,
.settings-action-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.profile-cars-list {
    display: grid;
    gap: 12px;
}

.profile-cars-list[hidden],
.profile-empty-state[hidden] {
    display: none;
}

.profile-car-card {
    min-height: 92px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(18, 18, 22, 0.045);
}

.profile-car-copy strong,
.profile-car-copy span {
    display: block;
}

.profile-car-copy strong {
    font-size: 17px;
}

.profile-car-copy span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.profile-car-remove {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
}

.profile-car-remove:hover {
    border-color: rgba(233, 0, 22, 0.4);
    background: #fff7f8;
}

.profile-empty-state {
    min-height: 240px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.profile-empty-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f4f4f5;
    color: #55555a;
}

.profile-empty-icon svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-empty-state h2 {
    margin-top: 18px;
    font-size: 21px;
    line-height: 1.3;
}

.profile-empty-state p {
    max-width: 560px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.profile-form-card {
    margin-top: 18px;
    padding: 30px 32px;
}

.profile-form-heading h2,
.settings-action-card h2 {
    font-size: 20px;
    line-height: 1.3;
}

.profile-form-heading p,
.settings-action-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.profile-vin-form {
    margin-top: 22px;
}

.profile-vin-form > label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.profile-vin-form > div {
    display: flex;
    gap: 10px;
}

.profile-vin-form input,
.settings-field input {
    height: 46px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: var(--black);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-vin-form input {
    min-width: 0;
    padding: 0 14px;
    flex: 1;
}

.profile-vin-form input:focus,
.settings-field input:focus {
    border-color: rgba(233, 0, 22, 0.65);
    box-shadow: 0 0 0 3px rgba(233, 0, 22, 0.08);
}

.profile-vin-form button {
    min-width: 184px;
    padding: 0 20px;
    border: 1px solid var(--red);
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-vin-form button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.profile-vin-status {
    min-height: 18px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.settings-personal-card {
    margin-top: 0;
}

.settings-fields {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.settings-field span {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.settings-field input {
    width: 100%;
    padding: 0 13px;
}

.settings-action-card {
    margin-top: 18px;
    padding: 26px 30px;
}

.settings-logout {
    min-height: 46px;
    margin-top: 18px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2b9be;
    border-radius: 8px;
    background: #ffffff;
    color: var(--red);
    font-size: 14px;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.settings-logout:hover {
    border-color: var(--red);
    background: #fff7f8;
}

@media (max-width: 760px) {
    .user-profile-page .marketplace-header {
        height: 0;
        min-height: 0;
        border-bottom: 0;
    }

    .user-profile-page .marketplace-header-inner {
        width: 0;
        min-height: 0;
        height: 0;
        padding: 0;
        display: block;
    }

    .user-profile-page .marketplace-brand,
    .user-profile-page .marketplace-location-selector,
    .user-profile-page .marketplace-search {
        display: none;
    }

    .profile-main {
        min-height: 100vh;
        padding-top: 18px;
        padding-bottom: 28px;
    }

    .profile-mobile-title {
        display: block;
        margin-bottom: 18px;
        font-size: 24px;
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: -0.02em;
    }

    .profile-identity {
        padding: 0 0 22px;
    }

    .profile-avatar-placeholder {
        width: 82px;
        height: 82px;
    }

    .profile-avatar-placeholder svg {
        width: 43px;
        height: 43px;
    }

    .profile-identity h1 {
        margin-top: 12px;
    }

    .profile-edit-button {
        min-height: 36px;
        margin-top: 6px;
        padding: 0 8px;
    }

    .profile-edit-layer {
        padding: 18px;
    }

    .user-profile-page .profile-edit-layer {
        z-index: 130;
    }

    .profile-edit-dialog {
        max-height: calc(100vh - 36px);
        padding: 24px;
    }

    .user-profile-page .profile-photo-editor {
        padding-bottom: 20px;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .user-profile-page .profile-photo-controls {
        width: 100%;
        justify-items: center;
        gap: 10px;
    }

    .user-profile-page .profile-photo-controls > div {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .user-profile-page .profile-photo-controls small {
        text-align: center;
    }

    .profile-edit-fields {
        grid-template-columns: 1fr;
    }

    .profile-edit-display-field {
        grid-column: auto;
    }

    .profile-identity h1,
    .profile-section-header h1 {
        font-size: 23px;
    }

    .profile-card-list {
        gap: 9px;
    }

    .profile-card {
        min-height: 72px;
        padding: 12px 14px;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        border-radius: 10px;
    }

    .profile-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 9px;
    }

    .profile-card-icon svg {
        width: 23px;
        height: 23px;
    }

    .profile-card-action,
    .profile-master-button {
        min-width: 0;
        grid-column: 2;
        justify-self: start;
    }

    .profile-card-action {
        display: none;
    }

    .profile-master-card .profile-card-copy small {
        display: none;
    }

    .profile-master-title-desktop,
    .profile-master-button-desktop {
        display: none;
    }

    .profile-master-title-mobile,
    .profile-master-button-mobile {
        display: inline;
    }

    .profile-master-button {
        min-height: 36px;
        padding: 0 14px;
        font-size: 12px;
    }

    .profile-master-card {
        background: #ffffff;
    }

    .profile-empty-state {
        min-height: 220px;
        padding: 34px 24px;
    }

    .profile-form-card,
    .settings-action-card {
        padding: 24px;
    }

    .settings-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .profile-card {
        padding: 12px 13px;
    }

    .profile-card-copy strong {
        font-size: 16px;
    }

    .profile-card-action {
        min-height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }

    .profile-vin-form > div {
        flex-direction: column;
    }

    .profile-vin-form button {
        width: 100%;
        min-height: 46px;
    }
}

/* Mobile-public landing */
@media (max-width: 760px) {
    body.public-landing-page {
        min-width: 0;
    }

    .public-landing-page .container {
        width: calc(100% - 24px);
    }

    .public-landing-page .main-navigation {
        display: none;
    }

    .public-landing-page .header-actions {
        margin-left: auto;
    }

    .public-landing-page .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .public-landing-page .site-header {
        height: 72px;
    }

    .public-landing-page .brand {
        width: 140px;
        height: 48px;
    }

    .public-landing-page .brand img {
        width: 136px;
    }

    .public-landing-page .login-button {
        height: 40px;
        margin-left: 0;
        padding: 0 20px;
    }

    .public-landing-page .hero-content {
        width: 100%;
        padding-top: 20px;
        left: auto;
        transform: none;
    }

    .public-landing-page .hero-inner {
        width: calc(100% - 24px);
    }

    .public-landing-page .hero-title {
        font-size: clamp(27px, 7.2vw, 30px);
        line-height: 1.08;
    }

    .public-landing-page .hero-logo {
        display: none;
    }

    .public-landing-page .hero,
    .public-landing-page .hero-inner {
        height: 300px;
        min-height: 300px;
    }

    .public-landing-page .hero {
        overflow: hidden;
        background-image: url("assets/hero/hero-approved.png");
        background-size: auto 170%;
        background-position: right top;
        background-repeat: no-repeat;
    }

    .public-landing-page .hero-car {
        width: min(100vw, 420px);
        right: -12px;
        bottom: -8px;
    }

    .public-landing-page .vin-card {
        min-height: 0;
        margin-top: 16px;
        padding: 22px;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .public-landing-page .vin-copy {
        min-width: 0;
    }

    .public-landing-page .vin-copy h2 {
        font-size: 18px;
    }

    .public-landing-page .vin-form {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 64px;
        gap: 8px;
    }

    .public-landing-page .vin-form input {
        width: 100%;
        min-width: 0;
        height: 48px;
        padding: 0 12px;
        font-size: 16px;
    }

    .public-landing-page .vin-form button {
        width: 64px;
        height: 48px;
        padding: 0 10px;
    }

    .public-landing-page .masters-section {
        padding-top: 38px;
    }

    .public-landing-page .masters-heading {
        margin-bottom: 16px;
        align-items: flex-end;
        flex-wrap: wrap;
        gap: 16px;
    }

    .public-landing-page .masters-heading h2 {
        flex: 1 1 200px;
        min-width: 0;
    }

    .public-landing-page .masters-heading h2,
    .public-landing-page .how-section > h2 {
        margin-bottom: 0;
        font-size: 24px;
    }

    .public-landing-page .masters-all-link {
        margin-bottom: 2px;
        margin-left: auto;
        flex: 0 0 auto;
        font-size: 13px;
        white-space: nowrap;
    }

    .public-landing-page .masters-grid {
        width: 100%;
        max-width: 100%;
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
        scrollbar-width: none;
    }

    .public-landing-page .masters-grid::-webkit-scrollbar {
        display: none;
    }

    .public-landing-page .masters-grid .demo-master-card {
        min-width: 0;
        width: min(76vw, 260px);
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .public-landing-page .masters-grid .demo-master-photo {
        height: 150px;
    }

    .public-landing-page .masters-grid .demo-master-content {
        min-height: 220px;
    }

    .public-landing-page .how-section {
        padding-top: 40px;
    }

    .public-landing-page .steps-list {
        margin-top: 16px;
        padding: 6px 20px;
        grid-template-columns: minmax(0, 1fr);
    }

    .public-landing-page .step,
    .public-landing-page .step:first-child,
    .public-landing-page .step:last-child {
        min-height: 0;
        padding: 18px 0;
        border-right: 0;
        border-bottom: 1px solid #eeeeee;
    }

    .public-landing-page .step:last-child {
        border-bottom: 0;
    }

    .public-landing-page .step h3 {
        font-size: 16px;
    }

    .public-landing-page .step p {
        font-size: 13px;
    }

    .public-landing-page .master-cta {
        min-height: 0;
        margin-top: 40px;
        margin-bottom: 42px;
        padding: 28px 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .public-landing-page .master-copy h2 {
        font-size: 25px;
    }

    .public-landing-page .master-copy > p {
        line-height: 1.5;
    }

    .public-landing-page .benefits-list {
        margin-top: 20px;
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
    }

    .public-landing-page .master-button {
        width: 100%;
        min-width: 0;
    }

    .public-landing-page .master-cta::after {
        right: -92px;
        bottom: -196px;
    }
}

/* Compact top navigation used only inside the mobile mechanic cabinet context. */
.master-mobile-top-shell {
    display: none;
}

.master-mobile-hub {
    display: none;
}

@media (max-width: 760px) {
    body.master-account-page,
    body.master-mobile-context-page {
        min-width: 0;
        overflow-x: clip;
    }

    .master-account-page .marketplace-header,
    .master-account-page .profile-mobile-bottom-nav,
    .master-mobile-context-page .marketplace-header,
    .master-mobile-context-page .profile-mobile-bottom-nav {
        display: none !important;
    }

    .master-account-page .master-mobile-nav,
    .master-account-page .master-mobile-more-layer {
        display: none !important;
    }

    .master-mobile-top-shell {
        width: 100%;
        padding: 16px 0 0;
        display: block;
        background: #fafafa;
    }

    .master-mobile-top-profile {
        padding: 0 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .master-mobile-top-avatar {
        width: 58px;
        height: 58px;
        display: grid;
        place-items: center;
        overflow: hidden;
        border: 1px solid #e2e2e3;
        border-radius: 50%;
        background: #f1f1f2;
        color: var(--red);
        font-size: 19px;
        font-weight: 800;
    }

    .master-mobile-top-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .master-mobile-top-profile > strong {
        max-width: 100%;
        margin-top: 8px;
        overflow: hidden;
        font-size: 15px;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .master-mobile-top-profile > small {
        margin-top: 2px;
        color: var(--muted);
        font-size: 11px;
        line-height: 1.3;
    }

    .master-mobile-top-profile > em {
        margin-top: 5px;
        padding: 3px 7px;
        border-radius: 5px;
        background: #ededee;
        color: #727277;
        font-size: 9px;
        font-style: normal;
        line-height: 1.2;
    }

    .master-mobile-section-nav {
        width: 100%;
        margin-top: 14px;
        padding: 0 12px 12px;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
        scroll-padding-inline: 12px;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    .master-mobile-section-link {
        min-height: 36px;
        padding: 0 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        scroll-snap-align: center;
        border: 1px solid #dedee0;
        border-radius: 9px;
        background: #ffffff;
        color: #29292c;
        font-size: 11px;
        font-weight: 650;
        line-height: 1.2;
        white-space: nowrap;
    }

    .master-mobile-section-link.is-active {
        border-color: var(--red);
        background: var(--red);
        color: #ffffff;
    }

    .master-account-page .master-account-layout.container {
        padding-top: 10px;
        padding-bottom: 40px;
    }

    .master-mobile-context-page .profile-main {
        padding-top: 10px;
        padding-bottom: 40px;
    }

    .master-mobile-dashboard-header {
        margin-bottom: 14px;
    }

    .master-mobile-dashboard-header h1 {
        font-size: 23px;
    }

    .master-account-page[data-master-page="dashboard"] .master-account-layout.container {
        padding-top: 10px;
    }

    .master-mobile-hub {
        margin-top: 14px;
        display: block;
    }

    .master-mobile-hub > h2 {
        margin: 22px 4px 9px;
        color: #66666b;
        font-size: 13px;
        font-weight: 650;
        line-height: 1.3;
    }

    .master-mobile-hub-group {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #ffffff;
        box-shadow: 0 7px 24px rgba(18, 18, 22, 0.035);
    }

    .master-mobile-hub-group a,
    .master-mobile-hub-logout {
        min-height: 50px;
        padding: 0 14px;
        display: grid;
        grid-template-columns: 21px minmax(0, 1fr) 12px;
        align-items: center;
        gap: 12px;
        color: var(--black);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.3;
    }

    .master-mobile-hub-group a + a {
        border-top: 1px solid var(--line);
    }

    .master-mobile-hub-group svg,
    .master-mobile-hub-logout svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .master-mobile-hub-group span,
    .master-mobile-hub-logout span {
        min-width: 0;
    }

    .master-mobile-hub-group b,
    .master-mobile-hub-logout b {
        color: #92949a;
        font-size: 22px;
        font-weight: 300;
        line-height: 1;
    }

    .master-mobile-hub-logout {
        margin-top: 14px;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #ffffff;
        color: var(--red);
        box-shadow: 0 7px 24px rgba(18, 18, 22, 0.035);
    }
}

/* Shared crop behavior for account avatars of every existing size. */
.marketplace-user-avatar,
.profile-avatar-placeholder,
.profile-photo-preview,
.master-sidebar-avatar,
.master-profile-avatar,
.master-mobile-profile-avatar,
.master-mobile-top-avatar {
    aspect-ratio: 1 / 1;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}

.marketplace-user-avatar > img,
.profile-avatar-placeholder > img,
.profile-photo-preview > img,
.master-sidebar-avatar > img,
.master-profile-avatar > img,
.master-mobile-profile-avatar > img,
.master-mobile-top-avatar > img {
    width: 100%;
    height: 100%;
    max-width: none;
    position: absolute;
    inset: 0;
    display: block;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 760px) {
    .marketplace-user-avatar.has-avatar > :not(img),
    .profile-avatar-placeholder.has-avatar > svg,
    .profile-photo-preview.has-avatar > svg,
    .master-profile-avatar.has-avatar > span,
    .master-mobile-profile-avatar.has-avatar > span,
    .master-mobile-top-avatar.has-avatar > span {
        display: none !important;
    }

    .marketplace-user-avatar.has-avatar > img,
    .profile-avatar-placeholder.has-avatar > img,
    .profile-photo-preview.has-avatar > img,
    .master-profile-avatar.has-avatar > img,
    .master-mobile-profile-avatar.has-avatar > img,
    .master-mobile-top-avatar.has-avatar > img {
        width: 100% !important;
        height: 100% !important;
        position: absolute;
        inset: 0;
        display: block !important;
        object-fit: cover;
        object-position: center;
    }
}
