body.search-body {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.search-page {
    flex: 1 1 auto;
    width: 100vw;
    box-sizing: border-box;
    padding: 24px 16px 40px;
    font-family: "Roboto", sans-serif;
}

.search-hero {
    max-width: 900px;
    margin: 0 auto;
}

.search-title {
    margin: 0 0 4px;
    font-family: "Russo One", sans-serif;
    font-size: 1.6rem;
    color: var(--text-900);
}

.search-sub-title,
.search-subtitle {
    margin: 0 0 14px;
    font-family: "Roboto", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
    color: var(--text-700);
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-input {
    flex: 1 1 auto;
    height: 36px;
    padding: 6px 10px;
    font-size: 1rem;
    border: 1px solid var(--border-300);
    border-radius: 6px 0 0 6px;
    background: var(--surface-000);
    color: var(--text-900);
}

.search-input:focus {
    outline: none;
}

.search-clear-btn {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-300);
    border-left: 0;
    border-radius: 0 6px 6px 0;
    background: var(--surface-200);
    color: var(--text-900);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.search-clear-btn:hover,
.search-clear-btn:focus-visible {
    background: var(--surface-500);
}

.search-clear-btn.is-pressed {
    animation: search-clear-press 180ms ease;
    transform-origin: center center;
}

@keyframes search-clear-press {
    0% {
        transform: scaleY(1);
    }
    45% {
        transform: scaleY(0.9);
    }
    100% {
        transform: scaleY(1);
    }
}

.search-input-row:focus-within .search-input,
.search-input-row:focus-within .search-clear-btn {
    border-color: var(--accent-500);
}

.search-status {
    margin-top: 8px;
    min-height: 1.2em;
    font-size: 0.9rem;
    color: var(--text-700);
}

.search-results {
    max-width: 1600px;
    margin: 16px auto 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-section {
    border: 1px solid var(--border-300);
    border-radius: 8px;
    background: var(--surface-100);
    padding: 12px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.search-section.is-clickable {
    cursor: pointer;
}

.search-section.is-clickable:hover {
    border-color: var(--accent-500);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.search-section.is-clickable:focus-visible {
    outline: 2px solid var(--accent-500);
    outline-offset: 2px;
}

.search-section-title {
    margin: 0 0 8px;
    font-family: "Russo One", sans-serif;
    font-size: 1.1rem;
    color: var(--sheet-title-color);
}

.search-row {
    padding: 6px 8px;
    border-top: 1px dashed var(--border-300);
}

.search-row:first-child {
    border-top: none;
}

.search-row-meta {
    font-size: 0.8rem;
    color: var(--text-700);
    margin-bottom: 2px;
}

.search-row-text {
    font-size: 0.95rem;
    color: var(--text-900);
    word-break: break-word;
    overflow-x: auto;
}

.search-row-text::-webkit-scrollbar:vertical {
    width: 0;
}

.search-row-text::-webkit-scrollbar:horizontal {
    height: 8px;
}

.search-table-scale {
    position: relative;
    width: 100%;
}

.search-table-scale::-webkit-scrollbar:vertical {
    width: 0;
}

.search-table-scale::-webkit-scrollbar:horizontal {
    height: 8px;
}

.search-row-text .search-result-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Roboto", sans-serif;
    transform-origin: top left;
}

.search-row-text .search-result-table td {
    border: 1px solid var(--cell-border);
    padding: 6px 8px;
    text-align: left;
    white-space: nowrap;
    background-clip: padding-box;
}

.search-row-text .search-result-table td[data-type="price"] {
    text-align: right;
}

.search-row-text .search-result-table td[data-align="left"] {
    text-align: left;
}

.search-row-text .search-result-table td[data-align="right"] {
    text-align: right;
}

.search-row-text .search-result-table td[data-align="center"] {
    text-align: center;
}

.search-row-text .search-result-table th {
    border: 1px solid var(--cell-border);
    padding: 6px 8px;
    text-align: left;
    white-space: nowrap;
    background: var(--sheet-header-bg);
    color: var(--sheet-header-color);
    font-weight: bold;
}

.search-row-text .search-result-table .search-row-meta-row td {
    background: var(--surface-200);
    color: var(--text-700);
    font-size: 0.8rem;
    font-style: italic;
    border: 1px solid var(--border-300);
}
