/* Keep the established quiet field boundary while matching the heading height. */
#n321-catalog .catalog-search {
    height: 30px;
    min-height: 30px;
    padding: 1px 2px 1px 8px;
    gap: 4px;
    border-radius: 8px;
}
#n321-catalog .catalog-search input {
    box-sizing: border-box;
    height: 24px;
    min-height: 0;
    padding: 0;
    font-size: 16px;
    line-height: 22px;
}
#n321-catalog .catalog-search button {
    box-sizing: border-box;
    height: 24px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 20px;
}

/* A native modal keeps focus and interaction inside the announcement. */
#n321-notice-popup {
    box-sizing: border-box;
    width: 462px;
    max-width: calc(100% - 32px);
    max-height: min(90vh, 720px);
    max-height: min(90dvh, 720px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    color: #535f73;
    background: #fff;
    box-shadow: 0 20px 70px rgba(20, 35, 63, .2);
}
#n321-notice-popup:not([open]) { display: none; }
#n321-notice-popup[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}
#n321-notice-popup::backdrop { background: rgba(27, 33, 46, .42); }
#n321-notice-popup .notice-popup-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 18px 56px;
    background: #5478ee;
}
#n321-notice-popup .notice-popup-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}
#n321-notice-popup .notice-popup-dismiss {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #5478ee;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
}
#n321-notice-popup .notice-popup-dismiss .material-icons-outlined {
    font-size: 19px;
    line-height: 1;
}
#n321-notice-popup .notice-popup-body {
    min-width: 0;
    min-height: 0;
    padding: 24px 20px 8px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    color: #535f73;
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
#n321-notice-popup .notice-popup-body > :first-child { margin-top: 0; }
#n321-notice-popup .notice-popup-body > :last-child { margin-bottom: 0; }
#n321-notice-popup .notice-popup-body p { margin-bottom: 14px; }
#n321-notice-popup .notice-popup-body img,
#n321-notice-popup .notice-popup-body video {
    max-width: 100%;
    height: auto;
}
#n321-notice-popup .notice-popup-body pre {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
#n321-notice-popup .notice-popup-body table {
    max-width: 100%;
    table-layout: fixed;
}
#n321-notice-popup .notice-popup-footer {
    display: flex;
    justify-content: center;
    padding: 16px 20px 20px;
    background: #fff;
}
#n321-notice-popup .notice-popup-confirm {
    min-width: 104px;
    min-height: 36px;
    margin: 0;
    padding: 7px 24px;
    border: 0;
    border-radius: 9px;
    color: #4269dd;
    background: #eaf1ff;
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
}
#n321-notice-popup button:focus-visible {
    outline: 2px solid #2655dc;
    outline-offset: 3px;
}
#n321-notice-popup .notice-popup-confirm:hover { background: #dce8ff; }
#n321-notice-popup .notice-popup-dismiss:hover { background: #edf3ff; }
@media (max-width: 640px) {
    #n321-notice-popup .notice-popup-header {
        min-height: 64px;
        padding: 14px 52px;
    }
    #n321-notice-popup .notice-popup-title { font-size: 19px; }
    #n321-notice-popup .notice-popup-body { padding-top: 20px; }
    #n321-notice-popup .notice-popup-footer { padding-top: 12px; }
}
@media (max-height: 480px) {
    #n321-notice-popup .notice-popup-header {
        min-height: 54px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    #n321-notice-popup .notice-popup-dismiss { top: 11px; }
    #n321-notice-popup .notice-popup-body { padding-top: 12px; }
    #n321-notice-popup .notice-popup-footer { padding: 10px 20px 12px; }
}
