/* ОСНОВНАЯ ЦВЕТОВАЯ СХЕМА */
:root {
    --bs-primary-bg-subtle: #d188004b;
    --bs-primary-text-emphasis: #444;

    --mc-bacground: #f1efe6;
    --mc-ligth-paper: #fcfbf8;
    --mc-card-bg: rgba(255, 249, 237, 0.63);
    --mc-header-color: #dfddd5;
    --mc-text-color: #444;
    --mc-light-text-color: #666666;
    --mc-border-color: #c5c6c7;
    --mc-tooltip_bg: #585857;
    --mc-popover-color: #925b07;

    
    /* цвета для messages */
    --mc-msg-info-bg: #d3d3d3;
    --mc-msg-info-border: #858585;
    --mc-msg-info-text: #444;

    --mc-msg-success-bg: #c9f77f;
    --mc-msg-success-border: #508004;
    --mc-msg-success-text: #444;

    --mc-msg-warning-bg: #f3ba3fd8;
    --mc-msg-warning-border: #747474;
    --mc-msg-warning-text: #444;

    --mc-msg-error-bg: #9b1e1e;
    --mc-msg-error-border: #3a0202;
    --mc-msg-error-text: #e4dddd;
}



body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--mc-bacground);
    color: var(--mc-text-color);
    
    /* font-size: 1.4rem; */
    font-family: "Comic Relief", system-ui;
    font-weight: 400;
    font-style: normal;
    /* font-size: 16px; */

    /* Оптимизация для мобильных */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
}

main {
    flex: 1;
}

p{
    margin-bottom: 1px;
}

a{
    color: var(--mc-text-color);
}

.page{
    background-image: url('/static/images/bg.png');
}


.quote-module{
    padding-right: 15px;
    background: #f1efe6;
}

.fixed-footer {
    margin-top: auto;
    width: 100%;
    background-color: var(--mc-header-color);
    padding: 1rem 0;
    border-top: 1px solid var(--mc-border-color);
    font-size: 0.9rem;
}

.admin-footer {
    margin-top: auto;
    width: 100%;
    background-color: var(--mc-header-color);
    border-top: 1px solid var(--mc-border-color);
}


.admin-row{
    margin-left:3px;
    margin-right: 3px;
    margin-bottom: 10px;
}

.header{
    width: 100%;
    background: var(--mc-header-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--mc-border-color);
}

.admin-header{
    width: 100%;
    background: var(--mc-header-color);
    border-bottom: 1px solid var(--mc-border-color);
}


.module{
    border-radius: 15px;
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);  
    padding: 25px;
}



.quote-section{
    font-size: 1.6rem;
    padding-top: 60px;
}

.quite-autor{
    font-size: 1.1rem;
    font-style: italic;
}

.quote-btn{
    margin-top: 50px;
}

.quote-end{
    margin-top: 40px;
}

.light-section{
    background-color: #f1f1f1;
}

.card{
    min-height: 220px;
}

.centered-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.index-card{
    padding-top: 20px;
    background: var(--mc-card-bg);
    border: 1px solid var(--mc-border-color);
    border-radius: 10px;
    min-height: 370px;
    padding-left: 20px;
    padding-right: 20px;
}


/* Стили для аккордеона */
.accordion-button{
    color:#444;
    background: #f09c0017;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
}
.accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}
.accordion-collapse {
  transition: height 0.3s ease;
}

.accordion-button:not(.collapsed) {
  box-shadow: 0 0 0 0.15rem rgba(83, 83, 83, 0.527) !important;
}

.accordion-button:focus{
   box-shadow: 0 0 0 0.15rem rgba(83, 83, 83, 0.527) !important;
}

/* Настройки отображения списков */

.custom-list {
  list-style-image: url('/static/icons/dot.png');
  padding-left: 2rem; /* Отступ для корректного отображения */
}

.custom-list-1 {
  list-style-image: url('/static/icons/dot_1.png');
  padding-left: 2rem; /* Отступ для корректного отображения */
}

/* стили merssages */

.alert{
    margin-top: 20px;
}

.alert-info{
    background: var(--mc-msg-info-bg);
    border-color: var(--mc-msg-info-border);
    color: var(--mc-msg-info-text);
}

.alert-success{
    background: var(--mc-msg-success-bg);
    border-color: var(--mc-msg-success-border);
    color: var(--mc-msg-success-text);
}

.alert-warning{
    background: var(--mc-msg-warning-bg);
    border-color: var(--mc-msg-warning-border);
    color: var(--mc-msg-warning-text);
}

.alert-error{
    background: var(--mc-msg-error-bg);
    border-color: var(--mc-msg-error-border);
    color: var(--mc-msg-error-text);
}

/* МОДАЛЬНЫЕ ОКНА */

.modal-body{
    background: var(--mc-card-bg);
}

.modal-header{
    background: var(--mc-header-color);
    border-bottom: 1px solid var(--mc-border-color);
}

.modal-footer{
    background: var(--mc-header-color);
    border-top: 1px solid var(--mc-border-color);
}

/* ФОРМЫ */

.form-control{
    background: white;
    border-color: var(--mc-border-color);
}

.form-control:focus{
   box-shadow: 0 0 0 0.15rem rgba(83, 83, 83, 0.527) !important;
   background: white;
   border-color: var(--mc-border-color);
}

.form-check-input:checked{
    background-color: var(--mc-popover-color);
    border-color: var(--mc-popover-color);
    box-shadow: 0 0 0 0.15rem rgba(83, 83, 83, 0.527) !important;
}

/* КНОПКИ */

.btn-pencil-textured {
  background: radial-gradient(circle,rgba(247, 247, 242, 1) 0%, rgba(248, 240, 230, 0.863) 80%, rgba(248, 163, 15, 0.233) 100%);
  border: 1px solid #555;
  color: #444;
  padding: 14px 28px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  box-shadow:
    4px 4px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  margin-left: 10px;
}

.btn-pencil-textured:hover {
  transform: translate(1px, 1px);
  box-shadow:
    3px 3px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
   background: #e9e8e8; 
}

.btn-pencil-textured {
  background: radial-gradient(circle,rgba(247, 247, 242, 1) 0%, rgba(248, 240, 230, 0.863) 80%, rgba(248, 163, 15, 0.233) 100%);
  border: 1px solid #555;
  color: #444;
  padding: 14px 28px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  box-shadow:
    4px 4px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  margin-left: 10px;
}

.btn-pencil-textured:hover {
  transform: translate(1px, 1px);
  box-shadow:
    3px 3px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
   background: #e9e8e8; 
}

.btn-pencil-textured-sm {
  background: radial-gradient(circle,rgba(247, 247, 242, 1) 0%, rgba(248, 240, 230, 0.863) 80%, rgba(248, 163, 15, 0.233) 100%);
  border: 1px solid #555;
  color: #444;
  padding: 8px 16px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  box-shadow:
    4px 4px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  margin-left: 0px;
}

.btn-pencil-textured-sm[disabled] {
  background: var(--mc-msg-info-bg);
  color: #444;
  padding: 8px 16px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  box-shadow:
    4px 4px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  margin-left: 0px;
}


.btn-pencil-textured-sm:hover {
  transform: translate(1px, 1px);
  box-shadow:
    3px 3px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
   background: #e9e8e8; 
}


.btn-pencil-textured[disabled] {
  background: radial-gradient(circle,rgba(247, 247, 242, 1) 0%, rgba(248, 240, 230, 0.863) 80%, rgba(48, 47, 47, 0.233) 100%);
  border: 1px solid #555;
  color: #444;
  padding: 14px 28px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  border-radius: 10px;
  margin-left: 10px;
}

.btn-pencil-textured[disabled]:hover {
   background: radial-gradient(circle,rgba(247, 247, 242, 1) 0%, rgba(248, 240, 230, 0.863) 80%, rgba(48, 47, 47, 0.233) 100%);
}

.btn-cancel-textured {
  background: radial-gradient(circle,rgba(247, 247, 242, 1) 0%, rgba(224, 224, 224, 0.863) 80%, rgba(95, 95, 95, 0.233) 100%);
  border: 1px solid #555;
  color: #444;
  padding: 14px 28px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  box-shadow:
    4px 4px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  margin-left: 10px;
}

.btn-cancel-textured:hover {
  transform: translate(1px, 1px);
  box-shadow:
    3px 3px 0 #e0e0e0,
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
   background: #e9e8e8; 
}

.btn-x {
  background: white;
  border: 1px solid var(--mc-border-color);
  color: #444;
  padding: 4px 16px;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  text-align: center;
  border-radius: 10px;
  margin-left: 10px;
}

/* Убираем границу и тень при наведении */
.btn-x:hover {
    background: var(--mc-header-color)
}



/* ТУЛТИПЫ */
.tooltip-inner {
    background-color: var(--mc-tooltip_bg);
    color: #fff; /* цвет текста */
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--mc-tooltip_bg);
}
.tooltip.bs-tooltip-right .tooltip-arrow::before {
    border-right-color: var(--mc-tooltip_bg);
}
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--mc-tooltip_bg);
}
.tooltip.bs-tooltip-left .tooltip-arrow::before {
    border-left-color: var(--mc-tooltip_bg);
}

.help-btn{
    font-size: 1.4rem;
    color: var(--mc-popover-color);
}

/* СПИСОК КАПСУЛ */

.capsule-card {
    border-left: 4px solid #0d6efd;
    transition: transform 0.2s;
}

.capsule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.price-badge {
    font-size: 1.1rem;
    padding: 0.25rem 0.75rem;
}

.message-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    max-height: 100px;
    overflow-y: auto;
}

.capsule-actions .btn {
    margin-right: 0.5rem;
}


/* НАСТРОЙКИ ОТОБРАЖЕНИЯ ПОЛЕЙ ЗАГРУЗКИ ФАЙЛОВ */
.file-input {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%; /* Занимаем всю доступную ширину */
}

.file-upload {
    flex: 1; /* Занимает всё доступное пространство */
}

.file-size {
    white-space: nowrap; /* Не переносим текст размера */
    font-size: 0.9em;
    color: #555;
}

.remove-file {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    flex-shrink: 0; /* Не сжимаем кнопку удаления */
}

.file-size-info {
    margin-top: 15px;
    font-size: 0.9em;
    color: #555;
}

.invalid-file {
    border-color: #ff6b6b;
}


.capsule-messages{
    margin-top: 20px;
    background-color: var(--mc-msg-warning-bg);
    color: var(--mc-msg-warning-text);
    border: 1px, solid, var(--mc-msg-warning-border);
    border-radius: 7px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.capsule-item{
    background: var(--mc-card-bg);
    border-radius: 7px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 10px;
    padding-right: 10px;
    border: 1px solid var(--mc-border-color);
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    margin-bottom: 26px;
}

.capsule-error{
    color: var(--mc-msg-error-bg);
}

.capsule-header{
    font-weight: 700;
    color: var(--mc-light-text-color);
}

.paper-message{
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 7px;
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

.span-alert-warning{
    background: var(--mc-msg-warning-bg);
    border-color: var(--mc-msg-warning-border);
    color: var(--mc-msg-warning-text);
    margin-top: 25px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 7px;
}

.span-alert-success{
    background: var(--mc-msg-success-bg);
    border-color: var(--mc-msg-success-border);
    color: var(--mc-msg-success-text);
    margin-top: 25px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 7px;
}

.span-alert-danger{
    background: var(--mc-msg-error-bg);
    border-color: var(--mc-msg-error-border);
    color: var(--mc-msg-error-text);
    margin-top: 25px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 7px;
}

.span-alert-warning-sm{
    background: var(--mc-msg-warning-bg);
    border-color: var(--mc-msg-warning-border);
    color: var(--mc-msg-warning-text);
    margin-top: 25px;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 7px;
}

.span-alert-success-sm{
    background: var(--mc-msg-success-bg);
    border-color: var(--mc-msg-success-border);
    color: var(--mc-msg-success-text);
    margin-top: 25px;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 7px;
}

.span-alert-danger-sm{
    background: var(--mc-msg-error-bg);
    border-color: var(--mc-msg-error-border);
    color: var(--mc-msg-error-text);
    margin-top: 25px;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 7px;
}




/* СТИЛИ АДМИНКИ */

.admin-item{
    background: var(--mc-card-bg);
    border-radius: 7px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 30px;
    padding-right: 30px;
    border: 1px solid var(--mc-border-color);
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    margin-bottom: 10px;
}

.admin-menu{
    margin-left: 3px;
    margin-right: 1px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.stat-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.label {
  flex: 0 0 auto;
  margin-right: 8px;
}

.dots {
  flex: 1;
  margin: 0 8px;
  height: 1em;
}

.value {
  flex: 0 0 auto;
  text-align: right;
  min-width: 60px; /* чтобы цифры не сжимались */
}

.input-group-search {
    max-width: 400px;
    margin-right: 20px;
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.admin-menu .btn {
    margin-right: 8px;
    margin-bottom: 4px;
}

.admin-nav .nav-link {
    padding: 6px 16px;
    border-radius: 4px;
}

.admin-nav .nav-link.active {
    background-color: #007bff;
    color: white;
}

.moscow-time {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
}

/* Акцент для текущего пункта меню */
.admin-menu .btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}




/* Стили пагинатора */
/* Базовый стиль ссылок пагинатора */
.pagination .page-link {
  color: #ff6b6b;
  background-color: #ffffff;
  border-color: #dee2e6;
}

/* При наведении */
.pagination .page-link:hover {
  color: #ffffff;
  background-color: #ff6b6b;
  border-color: #ff6b6b;
}

/* Активная страница */
.pagination .page-item.active .page-link {
  color: #ffffff;
  background-color: var(--mc-msg-warning-border);
  border-color: var(--mc-border-color);
}

/* Отключённые элементы */
.pagination .page-item.disabled .page-link {
  color: #6c757d;
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

/* Фокус (клавиатура) */
.pagination .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(78, 205, 196, 0.25);
  outline: 0;
}


/* СТИЛИ ПЛАШКИ COOKIES */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(#fff4dfc9, #f3dfbec9), url('../images/vintage-parchment.jpg') center / cover;
    color: #41281b;
    padding: 20px 24px;
    border: 1px solid #ba9064;
    border-radius: 10px;
    box-shadow: 0 8px 28px #3d241b55, inset 0 0 0 3px #fff9e7a8;
    z-index: 1000;
    max-width: 90vw;
    width: max-content;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.cookie-content p {
    margin: 0;
    font: 16px/1.55 Georgia, 'Times New Roman', serif;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: 30px;
    }
    .cookie-consent {
        max-width: 800px;
        width: calc(100% - 40px);
        transform: none;
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.cookie-consent .btn-pencil-textured-sm {
    margin: 0;
    padding: 10px 18px;
    color: #3c210e;
    font: 600 15px/1.3 Georgia, 'Times New Roman', serif;
    background: linear-gradient(#fff0d1, #efc784 48%, #d59543);
    border: 1px solid #a96e2d;
    border-radius: 7px;
    box-shadow: inset 0 1px 2px #fff9e9, 0 2px 4px #70401d40;
}
.cookie-consent .btn-pencil-textured-sm:hover {
    color: #2d190d;
    background: linear-gradient(#fff5df, #f2d49e 48%, #dfa456);
}
.cookie-consent .btn-pencil-textured-sm:focus-visible,
.cookie-consent .link-white:focus-visible {
    outline: 3px solid #aa6a2e;
    outline-offset: 3px;
}
.cookie-consent .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.cookie-consent .btn-primary {
    background: #007bff;
    color: white;
}

.cookie-consent .btn-outline-secondary {
    background: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.cookie-consent .link-white {
    color: #71451f;
    text-decoration: underline;
    text-underline-offset: 3px;
    font: 14px/1.4 Georgia, 'Times New Roman', serif;
}

.cookie-consent .link-white:hover {
    color: #43230f;
}


.table .faq-category-row > td {
    background-color: var(--mc-header-color);
}

.ml-8{
    margin-left: 8px;
}


/* Общая шапка сайта */
.header {
    padding: 6px 0;
    position: relative;
    isolation: isolate;
    --header-scene-width: 100%;
    background: #24140c99;
    border-bottom: 1px solid #bd9a7866;
    box-shadow: 0 2px 8px #361a0a30;
}
body:not(.home-page) .header::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 50%;
    transform: translateX(-50%);
    width: var(--header-scene-width);
    background: linear-gradient(#24140c99, #24140c99), url('../images/hero-unified.jpg') center top / 100% auto no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent);
    pointer-events: none;
}
@media (min-width: 576px) { .header { --header-scene-width: 540px; } }
@media (min-width: 768px) { .header { --header-scene-width: 720px; } }
@media (min-width: 992px) { .header { --header-scene-width: 960px; } }
@media (min-width: 1200px) { .header { --header-scene-width: 1140px; } }
@media (min-width: 1400px) { .header { --header-scene-width: 1320px; } }
.header .col-auto a { display: flex; align-items: center; min-height: 64px; position: relative; padding-bottom: 13px; }
.header .col-auto a::before {
    content: 'Послание сквозь время';
    position: absolute;
    left: 72px;
    bottom: 7px;
    color: #fff8eb;
    font: 11px/1.2 Georgia, serif;
    white-space: nowrap;
}
.header .col-auto a::after {
    content: 'MemoCaps';
    color: #fff8eb;
    font: italic 700 27px/1 Georgia, serif;
    text-shadow: 0 2px 4px #1c0a00;
}
.header .col-auto img {
    width: 72px;
    height: 64px;
    object-fit: cover;
    object-position: left;
    filter: none;
    clip-path: inset(0 14% 0 0);
}
.header .navbar-toggler i { color: #fff1d8 !important; }
.header .btn-pencil-textured,
body.home-page .page .btn-pencil-textured {
    color: #331c0e;
    background: linear-gradient(#fff0d0 0%, #f5d29a 38%, #d9953c 100%);
    border: 1px solid #a56220;
    border-radius: 9px;
    padding: 10px 19px;
    font: 600 15px/1.3 Georgia, serif;
    box-shadow: inset 0 1px 3px #fff9e5, 0 2px 5px #3b1a0b80;
    text-shadow: 0 1px #fff1cc;
}
.header .btn-pencil-textured:hover,
body.home-page .page .btn-pencil-textured:hover {
    color: #331c0e;
    background: linear-gradient(#fff4dc, #eab96f 60%, #c47a28);
}

@media (max-width: 575px) {
    .header .col-auto a::after { font-size: 21px; }
    .header .col-auto a::before { left: 50px; font-size: 10px; }
    .header .col-auto img { width: 50px; height: 55px; }
}

/* Оформление главной страницы */

body.home-page {
    color: #2d1a10;
    background: linear-gradient(#fff2da99, #fff2da99), url('../images/vintage-parchment.jpg') center center / cover fixed;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    position: relative;
    isolation: isolate;
    --scene-width: 100%;
}
body.home-page::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--scene-width);
    aspect-ratio: 2 / 1;
    background: url('../images/hero-scene-empty.jpg') center top / 100% auto no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent), linear-gradient(to bottom, #000 78%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 16%, #000 84%, transparent), linear-gradient(to bottom, #000 78%, transparent 100%);
    mask-composite: intersect;
    pointer-events: none;
}
body.home-page .header {
    padding: 6px 0;
    background: #24140c99;
    border-bottom: 1px solid #bd9a7866;
    box-shadow: 0 2px 8px #361a0a30;
}
body.home-page .header .col-auto a { display: flex; align-items: center; min-height: 64px; position: relative; padding-bottom: 13px; }
body.home-page .header .col-auto a::before {
    content: 'Послание сквозь время';
    position: absolute;
    left: 72px;
    bottom: 7px;
    color: #fff8eb;
    font: 11px/1.2 Georgia, serif;
    white-space: nowrap;
}
body.home-page .header .col-auto a::after {
    content: 'MemoCaps';
    color: #fff8eb;
    font: italic 700 27px/1 Georgia, serif;
    text-shadow: 0 2px 4px #1c0a00;
}
body.home-page .header .col-auto img {
    width: 72px;
    height: 64px;
    object-fit: cover;
    object-position: left;
    filter: none;
    clip-path: inset(0 14% 0 0);
}
body.home-page .header .navbar-toggler i { color: #fff1d8 !important; }
body.home-page .header .btn-pencil-textured, body.home-page .page .btn-pencil-textured {
    color: #331c0e;
    background: linear-gradient(#fff0d0 0%, #f5d29a 38%, #d9953c 100%);
    border: 1px solid #a56220;
    border-radius: 9px;
    padding: 10px 19px;
    font: 600 15px/1.3 Georgia, serif;
    box-shadow: inset 0 1px 3px #fff9e5, 0 2px 5px #3b1a0b80;
    text-shadow: 0 1px #fff1cc;
}
body.home-page .header .btn-pencil-textured:hover, body.home-page .page .btn-pencil-textured:hover {
    color: #331c0e;
    background: linear-gradient(#fff4dc, #eab96f 60%, #c47a28);
}
body.home-page .page {
    padding: 0 24px 35px;
    background: transparent;
}
body.home-page .quote-module {
    padding: 0;
    position: relative;
    background: transparent;
    min-height: max(360px, calc(var(--scene-width) / 2 - 90px));
}
body.home-page .quote-module > .row { position: relative; align-items: center; }
body.home-page .quote-module > .row > div:nth-child(2) {
    background: transparent;
}
body.home-page .quote-module > .row > div:first-child img {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 20px auto 30px;
    transform: scale(1.32);
    transform-origin: center top;
}
body.home-page .quote-section {
    padding-top: 10px;
    color: #3b2115;
    font: 700 clamp(1.3rem, 2.1vw, 1.75rem)/1.35 Georgia, serif;
    text-align: center;
    overflow-wrap: anywhere;
}
body.home-page .quite-autor { color: #593927; font: italic 1.05rem Georgia, serif; }
body.home-page .quote-btn { margin-top: 24px; }
body.home-page .quote-ornament { margin: 18px auto; width: 200px; height: 20px; font-size: 0; background: url('../images/vintage-divider.svg') center / contain no-repeat; }
body.home-page .quote-module .quote-ornament + .row > div { padding-top: 0 !important; }
body.home-page .quote-module p { font-size: 1.05rem !important; line-height: 1.55; }
body.home-page .page h3 { color: #402316; font: 700 clamp(1.55rem, 2.2vw, 2rem)/1.2 Georgia, serif; }
body.home-page .page h4 { color: #412c20; font: 400 1.05rem/1.4 Georgia, serif; }
body.home-page .page h5 { color: #412619; font: 700 1.15rem/1.3 Georgia, serif; }
body.home-page .page p, body.home-page .page li { line-height: 1.55; }
body.home-page .page .custom-list, body.home-page .page .custom-list-1 {
    list-style: none;
    padding-left: 1.5rem;
}
body.home-page .page .custom-list li, body.home-page .page .custom-list-1 li { position: relative; }
body.home-page .page .custom-list li::before, body.home-page .page .custom-list-1 li::before {
    content: '◆';
    position: absolute;
    left: -1.25rem;
    color: #9c6128;
    font-size: .8em;
}
body.home-page .card-module > .row:first-child, body.home-page .ideas-module > .row:first-child, body.home-page .safety-module > .row:first-child, body.home-page .delivery-module > .row:first-child, body.home-page .faq-module > .row:first-child { margin-top: 44px !important; }
body.home-page .card-module > .row:first-child { margin-top: 20px !important; }
body.home-page .card-module > .row:first-child h3::before, body.home-page .ideas-module h3::before, body.home-page .ideas-module h3::after, body.home-page .how-its-work-module h3::before, body.home-page .how-its-work-module h3::after, body.home-page .delivery-module h3::before, body.home-page .delivery-module h3::after {
    content: '';
    display: inline-block;
    width: 105px;
    height: 18px;
    background: url('../images/vintage-divider.svg') center / contain no-repeat;
    vertical-align: middle;
    margin: 0 15px;
}
body.home-page .card-module > .row:first-child h3::before { display: block; width: 180px; margin: 0 auto 10px; }
body.home-page .card-module .index-card {
    height: 100%;
    min-height: 0;
    padding: 8px 8px 18px;
    border: 1px solid #d6ae80;
    border-radius: 12px;
    background: linear-gradient(#fff8eaa8, #f5dfbdbb);
    box-shadow: 0 4px 9px #75462635, inset 0 0 0 3px #fff9ecb8;
}
body.home-page .card-module .index-card img { width: 100%; height: 190px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
body.home-page .card-module .index-card h5, body.home-page .card-module .index-card p { margin-left: 8px; margin-right: 8px; }
body.home-page .ideas-module hr { color: #aa7c51; opacity: .32; margin: 22px 0; }
body.home-page .ideas-module .row:not(:first-child) { align-items: center; margin-bottom: 0 !important; }
body.home-page .ideas-module .row:not(:first-child) > div { min-height: 0 !important; padding-bottom: 0 !important; }
body.home-page .ideas-module .row:not(:first-child) > div > div { padding: 16px 0; }
body.home-page .ideas-module .custom-list, body.home-page .ideas-module .custom-list-1 { margin-bottom: 6px; }
body.home-page .ideas-module img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}
body.home-page .how-its-work-module img, body.home-page .safety-module img, body.home-page .faq-module img, body.home-page .delivery-intro img {
    width: 100%;
    height: auto;
}
body.home-page .how-its-work-module img, body.home-page .safety-module img, body.home-page .faq-module img, body.home-page .delivery-intro img { max-height: 300px; object-fit: contain; }
body.home-page .delivery-intro { align-items: center; }
body.home-page .delivery-module .index-card {
    height: 100%;
    min-height: 0;
    padding: 22px;
    background: #fff3de88;
    border: 1px solid #d5ad7f;
    border-radius: 9px;
    box-shadow: 0 3px 8px #80502a22;
}
body.home-page .page .accordion-item { background: #fff2dc99; border-color: #d5b48c; }
body.home-page .page .accordion-button { color: #4a2c1b; background: #f6e2c5; font-family: Georgia, serif; }
body.home-page .page .accordion-button:not(.collapsed) { color: #4a2c1b; background: #ead0a7; }
body.home-page .fixed-footer {
    color: #fff2df;
    border-top: 3px solid #a77445;
    background: repeating-linear-gradient(3deg, #422818, #422818 6px, #4a2d1b 7px, #392216 9px);
}
body.home-page .fixed-footer a { color: #fff2df; }
@media (max-width: 991px) {
    body.home-page::before { left: 0; transform: none; width: 100%; min-height: 310px; background-size: auto 100%; background-position: left top; }
    body.home-page .quote-module { min-height: 0; }
    body.home-page .quote-module > .row > div:first-child img { max-width: 640px !important; margin: 20px auto 30px; transform: scale(1.16); }
    body.home-page .quote-section { padding-top: 12px; }
    body.home-page .page { padding: 0 14px 30px; }
    body.home-page .ideas-module img { max-height: 230px; }
}
@media (min-width: 576px) { body.home-page { --scene-width: 540px; } }
@media (min-width: 768px) { body.home-page { --scene-width: 720px; } }
@media (min-width: 992px) { body.home-page { --scene-width: 960px; } }
@media (min-width: 1200px) { body.home-page { --scene-width: 1140px; } }
@media (min-width: 1400px) { body.home-page { --scene-width: 1320px; } }
@media (max-width: 575px) {
    body.home-page .quote-module > .row { margin-left: 0; margin-right: 0; }
    body.home-page .quote-module > .row > div { min-width: 0; }
    body.home-page .cookie-consent { max-width: calc(100vw - 24px); }
    body.home-page .header .col-auto a::after { font-size: 21px; }
    body.home-page .header .col-auto a::before { left: 50px; font-size: 10px; }
    body.home-page .header .col-auto img { width: 50px; height: 55px; }
    body.home-page .ideas-module h3::before, body.home-page .ideas-module h3::after, body.home-page .how-its-work-module h3::before, body.home-page .how-its-work-module h3::after, body.home-page .delivery-module h3::before, body.home-page .delivery-module h3::after { width: 36px; margin: 0 6px; }
}



/* Общая тема окон: оформление не меняет состояние форм и действий. */
@supports (scrollbar-gutter: stable) {
    html { scrollbar-gutter: stable; }
    body.modal-open { padding-right: 0 !important; }
}
.modal {
    --memo-ink: #41281b;
    --memo-muted: #725744;
    --memo-border: #c9a67d;
    color: var(--memo-ink);
}
.modal-backdrop.show {
    background-color: #24160f;
    opacity: .68;
}
.modal .modal-content {
    overflow: hidden;
    color: var(--memo-ink);
    background: #faecd3 url('../images/vintage-parchment.jpg') center / cover;
    border: 1px solid #a8794a;
    border-radius: 12px;
    box-shadow: 0 18px 55px #21100680, inset 0 0 0 3px #fff8e6a8;
}
.modal .modal-header {
    gap: 16px;
    padding: 18px 24px;
    color: #fff3df;
    background: linear-gradient(90deg, #382014e8, #674124df), url('../images/vintage-header.jpg') center / cover;
    border-bottom: 1px solid #a8794a;
}
.modal .modal-title {
    color: inherit;
    font: 700 1.3rem/1.3 Georgia, 'Times New Roman', serif;
}
.modal .modal-title .bi {
    color: #edc184;
    margin-right: .35rem;
}
.modal .modal-header .btn-close {
    flex: 0 0 auto;
    filter: invert(1) sepia(.2);
    opacity: .9;
}
.modal .modal-header .btn-close:hover,
.modal .modal-header .btn-close:focus { opacity: 1; }
.modal .modal-body {
    padding: 24px;
    background: transparent;
    line-height: 1.55;
}
.modal .modal-footer {
    gap: 10px;
    padding: 16px 24px;
    background: #ead2ad80;
    border-top: 1px solid #d3b28b;
}
.modal .modal-footer > * { margin: 0; }
.modal .form-label,
.modal .form-check-label { color: var(--memo-ink); }
.modal .form-label { font-weight: 600; }
.modal .form-control,
.modal .form-select {
    color: #382419;
    background-color: #fffaf0;
    border: 1px solid var(--memo-border);
    border-radius: 6px;
    min-height: 42px;
}
.modal textarea.form-control { min-height: 100px; }
.modal .form-control:focus,
.modal .form-select:focus {
    color: #382419;
    background-color: #fffdf7;
    border-color: #a66b30;
    box-shadow: 0 0 0 .2rem #b67b3838 !important;
}
.modal .form-control::placeholder { color: #8a786a; opacity: 1; }
.modal .form-control:disabled,
.modal .form-select:disabled { color: #796c60; background-color: #e9dfcf; }
.modal .form-check-input { border-color: #aa835c; }
.modal .form-check-input:checked { background-color: #98602c; border-color: #98602c; }
.modal .form-check-input:focus { box-shadow: 0 0 0 .2rem #b67b3838; }
.modal .form-text, .modal .text-muted { color: var(--memo-muted) !important; }
.modal a:not(.btn):not(.btn-pencil-textured) { color: #805020; text-underline-offset: 3px; }
.modal a:not(.btn):not(.btn-pencil-textured):hover { color: #573112; }
.modal .input-group > .btn-outline-secondary {
    color: #704728;
    border-color: var(--memo-border);
    background: #f3e1c6;
}
.modal .input-group > .btn-outline-secondary:hover { color: #fff9ec; background: #83542e; }
.modal .btn-pencil-textured,
.modal .btn-pencil-textured-sm,
.modal .btn-primary,
.modal .btn-success {
    color: #3c210e;
    background: linear-gradient(#fff0d1, #efc784 48%, #d59543);
    border: 1px solid #a96e2d;
    border-radius: 7px;
    box-shadow: inset 0 1px 2px #fff9e9, 0 2px 4px #70401d40;
    text-shadow: 0 1px #fff3d6;
}
.modal .btn-pencil-textured:hover:not(:disabled),
.modal .btn-pencil-textured-sm:hover:not(:disabled),
.modal .btn-primary:hover:not(:disabled),
.modal .btn-success:hover:not(:disabled) {
    color: #2d190d;
    background: linear-gradient(#fff5df, #f2d49e 48%, #dfa456);
}
.modal .btn-cancel-textured,
.modal .btn-secondary,
.modal .btn-outline-secondary:not(.input-group > .btn-outline-secondary) {
    color: #5d402b;
    background: #f4e5ce;
    border: 1px solid #b99772;
    border-radius: 7px;
    box-shadow: none;
}
.modal .btn-cancel-textured:hover:not(:disabled),
.modal .btn-secondary:hover:not(:disabled),
.modal .btn-outline-secondary:not(.input-group > .btn-outline-secondary):hover {
    color: #432b1b;
    background: #e8cfaa;
}
.modal .btn-danger, .modal .btn-outline-danger {
    color: #fff9f1;
    background: #953f32;
    border-color: #783127;
}
.modal .btn-danger:hover, .modal .btn-outline-danger:hover { color: white; background: #792f25; }
.modal button:disabled, .modal button[disabled] { opacity: .55; cursor: not-allowed; }
.modal button:focus-visible, .modal a:focus-visible {
    outline: 3px solid #aa6a2e;
    outline-offset: 3px;
}
.modal .table { --bs-table-bg: transparent; --bs-table-color: #41281b; --bs-table-border-color: #d4b797; }
.modal hr { color: #ad8054; opacity: .4; }
@media (max-width: 575px) {
    .modal .modal-dialog { margin: 12px; }
    .modal .modal-header, .modal .modal-body, .modal .modal-footer { padding-left: 18px; padding-right: 18px; }
    .modal .modal-footer { justify-content: flex-end; }
}

/* Страницы из подвала */
body.footer-page {
    color: #3c281b;
    background: linear-gradient(#fff2da99, #fff2da99), url('../images/vintage-parchment.jpg') center / cover fixed;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.65;
}
body.footer-page .footer-content {
    padding-top: 30px;
    padding-bottom: 55px;
}
body.footer-page .page { background: transparent; }
body.footer-page .footer-content h3,
body.footer-page .footer-content h4,
body.footer-page .footer-content h5 {
    color: #482b1c;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
}
body.footer-page .footer-content h3 {
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    line-height: 1.25;
    margin-bottom: 18px;
}
body.footer-page .footer-content p,
body.footer-page .footer-content li { line-height: 1.7; }
body.footer-page .footer-content hr { color: #ad8054; opacity: .38; }
body.footer-page .fixed-footer {
    color: #fff2df;
    border-top: 3px solid #a77445;
    background: repeating-linear-gradient(3deg, #422818, #422818 6px, #4a2d1b 7px, #392216 9px);
}
body.footer-page .fixed-footer a { color: #fff2df; }
body.footer-page .footer-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
body.footer-page .paper-message,
body.footer-page .legal-document,
body.footer-feedback .footer-content form {
    background: #fff8eab8;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.footer-about .paper-message {
    min-width: 0;
    padding: clamp(22px, 3vw, 38px);
    color: #3c281b;
}
body.footer-about .footer-content > .row:nth-of-type(2) { align-items: center; gap: 24px 0; }
body.footer-about .footer-content > .row:last-child {
    margin-top: 35px !important;
    padding: 24px 28px;
    background: #fff8ea88;
    border: 1px solid #d6b48b;
    border-radius: 10px;
}
body.footer-about .footer-content img { max-height: 420px; }
body.footer-feedback .page { padding: 0; }
body.footer-feedback .page > .row > .col-12 > .row { flex-direction: column; }
body.footer-feedback .page > .row > .col-12 > .row > .col { flex: 0 0 auto; width: 100%; }
body.footer-feedback .footer-content form { padding: clamp(20px, 3vw, 32px); margin-top: 20px; }
body.footer-feedback .footer-content form > .row:first-of-type { margin-top: 0 !important; }
body.footer-feedback .footer-content img { max-width: 300px !important; max-height: 280px; }
body.footer-feedback .form-label { font-weight: 700; }
body.footer-feedback .form-control {
    color: #382419;
    background: #fffaf0;
    border: 1px solid #c9a67d;
    border-radius: 6px;
    min-height: 42px;
}
body.footer-feedback .form-control:focus {
    color: #382419;
    background: #fffdf7;
    border-color: #a66b30;
    box-shadow: 0 0 0 .2rem #b67b3838 !important;
}
body.footer-feedback .footer-content .btn-pencil-textured {
    color: #331c0e;
    background: linear-gradient(#fff0d0, #f5d29a 38%, #d9953c);
    border: 1px solid #a56220;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px #fff9e5, 0 2px 5px #3b1a0b50;
}
body.footer-faq .page { padding: 0; }
body.footer-faq .faq-module img { max-height: 340px; }
body.footer-faq .accordion-item,
body.activation-page .accordion-item { background: #fff5e3b8; border-color: #d5b48c; }
body.footer-faq .accordion-button,
body.activation-page .accordion-button {
    color: #4a2c1b;
    background: #f6e2c5;
    font-family: Georgia, 'Times New Roman', serif;
}
body.footer-faq .accordion-button:not(.collapsed),
body.activation-page .accordion-button:not(.collapsed) { color: #4a2c1b; background: #ead0a7; }
body.activation-page .page { padding: 0; }
body.activation-page .activation-heading { margin: 25px 0 14px; text-align: center; }
body.activation-page .activation-card {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(22px, 3vw, 38px);
    background: #fff8eab8;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.activation-page .activation-image { width: 100%; max-width: 280px; }
body.activation-page .activation-card h5 { margin-bottom: 14px; }
body.activation-page .faq-module > .row:first-child { margin-top: 70px !important; }
body.activation-page .quote-btn .btn-pencil-textured,
body.activation-page .page > .row .btn-pencil-textured {
    color: #331c0e;
    background: linear-gradient(#fff0d0, #f5d29a 38%, #d9953c);
    border: 1px solid #a56220;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px #fff9e5, 0 2px 5px #3b1a0b50;
}
@media (max-width: 767px) {
    body.activation-page .activation-card { gap: 18px; }
    body.activation-page .activation-card > .col { flex: 0 0 100%; }
    body.activation-page .activation-image { max-width: 220px; }
}
body.footer-legal .legal-document {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 48px);
}
body.footer-legal .legal-document h3 { text-align: center; }
body.footer-legal .legal-document h4 { margin: 26px 0 12px; font-size: 1.2rem; }
body.footer-legal .legal-document li { margin-bottom: 6px; }
body.footer-legal .legal-document > div:last-child {
    background: #f3dfc1 !important;
    border-left-color: #a66b30 !important;
    border-radius: 0 6px 6px 0;
}

/* Личный кабинет: список капсул */
body.capsules-page .page { padding: 0; }
body.capsules-page .capsules-heading { margin: 25px 0 24px; }
body.capsules-page .capsules-heading h3 { margin: 0; }
body.capsules-page .capsule-item {
    width: 100%;
    margin: 0 0 22px;
    padding: 22px 18px;
    color: #3c281b;
    background: #fff8eac7;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.capsules-page .capsule-item p { margin-bottom: 9px; overflow-wrap: anywhere; }
body.capsules-page .capsule-item hr { color: #b7895b; opacity: .45; margin: 12px 0; }
body.capsules-page .capsule-item img { width: 220px; max-height: 190px; object-fit: contain; }
body.capsules-page .capsule-item a:not(.btn-pencil-textured-sm) { color: #805020 !important; }
body.capsules-page .capsule-item .capsule-readable {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    color: #5c3b1f !important;
    background: #f3dfb9;
    border: 1px solid #c89b62;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px #fff9e5;
    font-weight: 700;
    text-decoration: none;
}
body.capsules-page .capsule-item .capsule-readable:hover { background: #ecd09b; }
body.capsules-page .capsule-item .capsule-readable:focus-visible { outline: 2px solid #805020; outline-offset: 3px; }
body.capsules-page .capsule-header { color: #653b20; font-weight: 700; }
body.capsules-page .capsule-error { color: #a03220; }
body.capsules-page .capsules-empty-heading { margin-top: 40px; color: #482b1c; }
body.capsules-page .capsules-empty-image img { width: min(380px, 100%); max-height: 280px; object-fit: contain; }
body.capsules-page .btn-pencil-textured,
body.capsules-page .btn-pencil-textured-sm {
    color: #331c0e;
    background: linear-gradient(#fff0d0, #f5d29a 38%, #d9953c);
    border: 1px solid #a56220;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px #fff9e5, 0 2px 5px #3b1a0b50;
}
body.capsules-page .faq-module > .row:first-child { margin-top: 70px !important; }
body.capsules-page .capsule-modal-image {
    display: block;
    width: 100%;
    max-width: 240px;
    max-height: 165px;
    margin: 0 auto 18px;
    object-fit: contain;
}
body.capsules-page .capsule-modal-edit-image { max-width: 320px; max-height: 300px; }
body.capsules-page .capsule-modal-delete-image { max-width: 240px; max-height: 150px; }
body.capsules-page #aboutCapsuleModal .modal-body p { margin-bottom: 10px; overflow-wrap: anywhere; }
body.capsules-page #aboutWarningDiv, body.capsules-page .capsule-delete-warning {
    padding: 10px 14px;
    color: #823a2b;
    background: #f8e3ce;
    border: 1px solid #d5a489;
    border-radius: 7px;
}
body.capsules-page #aboutWarningDiv[hidden] { display: none; }
body.capsules-page #aboutWarningDiv p:last-child { margin-bottom: 0; }
body.capsules-page #deleteCapsuleModal .modal-body > .row:first-of-type { text-align: center; }
body.capsules-page #deleteCapsuleModal .modal-body .mb-3 { width: min(100%, 380px); }
body.capsules-page .accordion-item { background: #fff5e3b8; border-color: #d5b48c; }
body.capsules-page .accordion-button { color: #4a2c1b; background: #f6e2c5; font-family: Georgia, 'Times New Roman', serif; }
body.capsules-page .accordion-button:not(.collapsed) { color: #4a2c1b; background: #ead0a7; }

/* Просмотр капсулы */
body.capsule-view-page .page { padding: 0; }
body.capsule-view-page .capsule-view-card,
body.capsule-view-page .capsule-view-message .paper-message,
body.capsule-view-page .capsule-view-files {
    background: #fff8eac7;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.capsule-view-page .capsule-view-card {
    margin: 20px 0 0;
    padding: clamp(22px, 3vw, 38px);
}
body.capsule-view-page .capsule-view-art { text-align: center; }
body.capsule-view-page .capsule-view-art img { width: 100%; max-width: 390px; }
body.capsule-view-page .capsule-view-details { padding: 10px clamp(16px, 3vw, 36px); }
body.capsule-view-page .capsule-view-details p { margin-bottom: 9px; }
body.capsule-view-page .capsule-view-date { color: #653b20; font-weight: 700; }
body.capsule-view-page .capsule-view-status {
    margin-top: 25px;
    padding: 18px 20px;
    color: #5a371e;
    background: #f3dfbf;
    border: 1px solid #d5b184;
    border-radius: 8px;
}
body.capsule-view-page .capsule-view-status h4 { font-size: 1.15rem; text-align: center; margin: 0 0 15px; }
body.capsule-view-page .capsule-view-open strong { font-size: 1.13rem; }
body.capsule-view-page .capsule-view-open p { margin: 4px 0 0; }
body.capsule-view-page #countdown-timer { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
body.capsule-view-page #countdown-timer > span {
    min-width: 62px;
    padding: 7px 10px;
    text-align: center;
    background: #fff8e9b8;
    border: 1px solid #d7b78f;
    border-radius: 6px;
}
body.capsule-view-page #countdown-timer strong { display: block; color: #673d20; font-size: 1.55rem; line-height: 1.2; }
body.capsule-view-page #countdown-timer small { display: block; font-size: .8rem; }
body.capsule-view-page .capsule-view-message { margin-top: 35px; }
body.capsule-view-page .capsule-view-message h4,
body.capsule-view-page .capsule-view-files h4 { margin-bottom: 15px; font-size: 1.3rem; }
body.capsule-view-page .capsule-view-message .paper-message { padding: clamp(22px, 3vw, 38px); overflow-wrap: anywhere; }
body.capsule-view-page .capsule-view-message .paper-message p:last-child { margin-bottom: 0; }
body.capsule-view-page .capsule-view-files { margin-top: 25px; padding: 24px 30px; overflow-wrap: anywhere; }
body.capsule-view-page .capsule-view-files a { color: #805020; text-underline-offset: 3px; }
body.capsule-view-page .capsule-view-faq { margin-top: 70px; }
body.capsule-view-page .capsule-view-faq h3 { margin-bottom: 20px; }
body.capsule-view-page .accordion-item { background: #fff5e3b8; border-color: #d5b48c; }
body.capsule-view-page .accordion-button { color: #4a2c1b; background: #f6e2c5; font-family: Georgia, 'Times New Roman', serif; }
body.capsule-view-page .accordion-button:not(.collapsed) { color: #4a2c1b; background: #ead0a7; }

/* Создание капсулы */
body.new-capsule-page .footer-content { padding-top: 24px; }
body.new-capsule-page .page { background: transparent; }
body.new-capsule-page .new-capsule-form > .row { row-gap: 24px; }
body.new-capsule-page .new-capsule-fields {
    padding: 12px clamp(22px, 3vw, 36px) 28px;
    background: #fff8eac7;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.new-capsule-page .new-capsule-fields h3 { margin-bottom: 20px; }
body.new-capsule-page .new-capsule-fields h5 { font-size: 1.18rem; }
body.new-capsule-page .new-capsule-fields hr { margin: 23px 0; color: #ad8054; opacity: .4; }
body.new-capsule-page .new-capsule-fields p { line-height: 1.55; }
body.new-capsule-page .form-control, body.new-capsule-page .form-select {
    min-width: 0;
    color: #382419;
    background-color: #fffaf0;
    border: 1px solid #c9a67d;
    border-radius: 6px;
    min-height: 42px;
}
body.new-capsule-page textarea.form-control { min-height: 240px; }
body.new-capsule-page .form-control:focus, body.new-capsule-page .form-select:focus {
    color: #382419;
    background-color: #fffdf7;
    border-color: #a66b30;
    box-shadow: 0 0 0 .2rem #b67b3838;
}
body.new-capsule-page .form-control:disabled, body.new-capsule-page .form-select:disabled { background: #eee3d1; color: #78695b; }
body.new-capsule-page .form-check-input { border-color: #ad855e; }
body.new-capsule-page .form-check-input:checked { background-color: #98602c; border-color: #98602c; }
body.new-capsule-page .form-check-input:focus { box-shadow: 0 0 0 .2rem #b67b3838; }
body.new-capsule-page .help-btn { color: #99622f; }
body.new-capsule-page .text-muted, body.new-capsule-page .file-size-info { color: #765d48 !important; }
body.new-capsule-page .capsule-messages, body.new-capsule-page .alert-info,
body.new-capsule-page .alert-warning, body.new-capsule-page #confirmSubmitModal .span-alert-warning {
    color: #70481d;
    background: #f3e0bb;
    border: 1px solid #d2b481;
    border-radius: 7px;
}
body.new-capsule-page .capsule-messages { margin: 15px 0 0; padding: 10px; }
body.new-capsule-page .new-capsule-upload-art { align-self: center; }
body.new-capsule-page .file-input {
    gap: 10px;
    padding: 10px;
    background: #fffaf0;
    border: 1px solid #d6b48b;
    border-radius: 8px;
}
body.new-capsule-page .file-upload {
    min-width: 0;
    width: 100%;
    color: #5d402b;
    font: inherit;
    font-size: .9rem;
}
body.new-capsule-page .file-upload::file-selector-button {
    margin-right: 10px;
    padding: 7px 12px;
    color: #4c2b15;
    background: linear-gradient(#fff0d0, #f5d29a 45%, #dfa75b);
    border: 1px solid #b77e40;
    border-radius: 6px;
    font: inherit;
    cursor: pointer;
}
body.new-capsule-page .file-upload::file-selector-button:hover { background: linear-gradient(#fff7e7, #efd1a2); }
body.new-capsule-page .file-upload:focus-visible { outline: 2px solid #a66b30; outline-offset: 3px; border-radius: 4px; }
body.new-capsule-page .file-size { color: #765d48; font-size: .85rem; }
body.new-capsule-page .remove-file {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #8a4431;
    background: #f6e4d3;
    border: 1px solid #c9977d;
    border-radius: 6px;
    font-size: 1.2rem;
    line-height: 1;
}
body.new-capsule-page .remove-file:hover { color: #fffaf0; background: #984d39; border-color: #984d39; }
body.new-capsule-page .remove-file:focus-visible { outline: 2px solid #a66b30; outline-offset: 2px; }
body.new-capsule-page .new-capsule-image { display: block; width: 100%; height: auto; object-fit: contain; }
body.new-capsule-page .new-capsule-sidebar { padding: 0 20px 24px; }
body.new-capsule-page .new-capsule-security-image { max-width: 310px; max-height: 250px; margin: 0 auto; }
body.new-capsule-page #price-table .card {
    color: #3c281b;
    background: #fff8eac7 !important;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.new-capsule-page #price-table .card-body { padding: 24px; }
body.new-capsule-page #price-table .card-title { margin-bottom: 18px; }
body.new-capsule-page #price-table .card-body .d-flex { gap: 10px; margin-bottom: 10px; }
body.new-capsule-page #price-table hr { color: #ad8054; opacity: .4; }
body.new-capsule-page .btn-pencil-textured, body.new-capsule-page .btn-pencil-textured-sm {
    color: #331c0e;
    background: linear-gradient(#fff0d0, #f5d29a 38%, #d9953c);
    border: 1px solid #a56220;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px #fff9e5, 0 2px 5px #3b1a0b50;
}
body.new-capsule-page .new-capsule-sidebar .quote-btn { margin-top: 22px; }
body.new-capsule-page .new-capsule-confirm-image { width: 100%; max-width: 300px; max-height: 250px; object-fit: contain; }
body.new-capsule-page #confirmSubmitModal .span-alert-warning { display: inline-block; margin: 0; padding: 10px 14px; }
body.new-capsule-page #creationProgressModal .spinner-border { color: #a66b30 !important; }
@media (max-width: 575px) {
    body.new-capsule-page .new-capsule-fields { padding: 10px 20px 24px; }
    body.new-capsule-page .new-capsule-fields .text-nowrap { white-space: normal !important; }
    body.new-capsule-page .new-capsule-sidebar { padding: 0 12px 20px; }
    body.new-capsule-page .file-input { flex-wrap: wrap; }
}

/* Панель управления */
body.memo-admin {
    color: #3c281b;
    background: linear-gradient(#fff2da99, #fff2da99), url('../images/vintage-parchment.jpg') center / cover fixed;
    font-family: Georgia, 'Times New Roman', serif;
}
body.memo-admin .admin-header {
    padding: 12px clamp(16px, 2vw, 32px);
    color: #fff3df;
    background: linear-gradient(#b18c6940, #b18c6940), url('../images/vintage-header.jpg') center 38% / cover;
    border-bottom: 1px solid #a8794a;
    box-shadow: 0 3px 12px #3a1e1033;
}
body.memo-admin .admin-header > .row { margin: 0; }
body.memo-admin .admin-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff8eb; }
body.memo-admin .admin-brand img { width: 58px; height: 58px; object-fit: cover; }
body.memo-admin .admin-brand strong { display: block; font: italic 700 27px/1 Georgia, serif; }
body.memo-admin .admin-brand small { display: block; margin-top: 5px; font-size: 12px; }
body.memo-admin .admin-header a:not(.admin-brand) { color: #fff2df; text-underline-offset: 3px; }
body.memo-admin .moscow-time { color: #f4dbb8; margin: 5px 0 0; }
body.memo-admin .admin-toolbar { margin: 16px 12px 0; }
body.memo-admin .admin-toolbar-actions { margin-top: 8px; margin-bottom: 18px; }
body.memo-admin .admin-toolbar > .col { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; }
body.memo-admin .admin-row { margin: 0 12px 16px; }
body.memo-admin .container-fluid { padding-left: 24px; padding-right: 24px; }
body.memo-admin h1, body.memo-admin h2, body.memo-admin h3,
body.memo-admin h4, body.memo-admin h5 { color: #482b1c; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
body.memo-admin .modal-title { color: inherit; }
body.memo-admin .admin-item, body.memo-admin .card {
    color: #3c281b;
    background: #fff8eac7;
    border: 1px solid #d6b48b;
    border-radius: 10px;
    box-shadow: 0 5px 18px #7447211c, inset 0 0 0 3px #fff8e68c;
}
body.memo-admin .admin-item { padding: 20px 22px; }
body.memo-admin .admin-item h5 { margin-bottom: 15px; }
body.memo-admin .stat-item { gap: 5px; }
body.memo-admin .stat-item .label, body.memo-admin .stat-item .value { min-width: 0; overflow-wrap: anywhere; }
body.memo-admin .stat-item .value { font-weight: 600; }
body.memo-admin .stat-item .dots { border-bottom: 1px dotted #c8aa89; height: .7em; }
body.memo-admin .span-alert-success, body.memo-admin .span-alert-success-sm {
    color: #375b32; background: #dce9cb; border-color: #abc69c;
}
body.memo-admin .span-alert-warning, body.memo-admin .span-alert-warning-sm {
    color: #70481d; background: #f0deb5; border-color: #d2b481;
}
body.memo-admin .span-alert-danger, body.memo-admin .span-alert-danger-sm {
    color: #873e2f; background: #f1d6cb; border-color: #d1a08f;
}
body.memo-admin a:not(.btn):not(.btn-pencil-textured-sm):not(.admin-brand) { color: #805020; text-underline-offset: 3px; }
body.memo-admin .admin-header a:not(.admin-brand) { color: #fff2df !important; }
body.memo-admin .form-control, body.memo-admin .form-select {
    color: #382419; background-color: #fffaf0; border: 1px solid #c9a67d; border-radius: 6px;
}
body.memo-admin .form-control:focus, body.memo-admin .form-select:focus {
    border-color: #a66b30; box-shadow: 0 0 0 .2rem #b67b3838;
}
body.memo-admin .btn-pencil-textured-sm, body.memo-admin .btn-pencil-textured,
body.memo-admin .btn-primary, body.memo-admin .btn-outline-primary {
    color: #3c210e;
    background: linear-gradient(#fff0d1, #efc784 48%, #d59543);
    border: 1px solid #a96e2d;
    border-radius: 7px;
    box-shadow: inset 0 1px 2px #fff9e9, 0 2px 4px #70401d40;
}
body.memo-admin .btn-secondary { color: #fff8eb; background: #80502c; border-color: #754323; }
body.memo-admin .btn-outline-secondary { color: #674326; background: #fff5e3; border-color: #bc9871; }
body.memo-admin .btn-outline-secondary:hover { color: #fff8eb; background: #80502c; border-color: #754323; }
body.memo-admin .table {
    --bs-table-color: #3c281b;
    --bs-table-bg: #fff8eac7;
    --bs-table-border-color: #ddc3a1;
    --bs-table-hover-bg: #f2dfc2;
    vertical-align: middle;
}
body.memo-admin .table thead th { color: #52321e; background: #eed7b5; border-bottom-color: #c69d71; }
body.memo-admin .table-responsive { border: 1px solid #d6b48b; border-radius: 9px; }
body.memo-admin .table-responsive .table { margin-bottom: 0; }
body.memo-admin .pagination .page-link { color: #704625; background: #fff6e8; border-color: #d0ad84; }
body.memo-admin .pagination .page-item.active .page-link { color: #fff8eb; background: #80502c; border-color: #80502c; }
body.memo-admin .pagination .page-item.disabled .page-link { color: #9a8978; background: #f1e5d3; }
body.memo-admin .admin-footer {
    margin-top: auto; padding: 16px 30px; color: #fff2df;
    background: #422818; border-top: 2px solid #a77445;
}
body.memo-admin .admin-footer .row { margin: 0; }
body .header .col-auto img,
body.home-page .header .col-auto img { object-fit: cover; object-position: center; clip-path: none; }
@media (max-width: 767px) {
    body.memo-admin .admin-header .input-group { min-width: 0 !important; }
    body.memo-admin .admin-header .col-auto.text-end { width: 100%; }
    body.memo-admin .admin-toolbar > .col { justify-content: flex-start; }
    body.memo-admin .admin-row { margin-left: 4px; margin-right: 4px; }
    body.memo-admin .capsule-block > .row > .col { flex: 0 0 100%; border: 0 !important; margin-bottom: 16px; }
}
@media (max-width: 991px) {
    body.capsules-page .capsule-item > .row { gap: 18px 0; }
    body.capsules-page .capsules-heading { gap: 12px; }
}
@media (max-width: 767px) {
    body.footer-page .footer-content { padding-top: 20px; padding-bottom: 35px; }
    body.footer-about .paper-message { flex: 0 0 100%; }
    body.footer-about .footer-content img,
    body.footer-feedback .footer-content img,
    body.footer-faq .faq-module img { max-height: 250px; }
}



