body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.result-container {
    background-color: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.result-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

@media (min-width: 768px) {
    .result-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }
}

.result-content {
    flex: 1;
    word-break: break-word;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.result-content > * {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.result-content p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.result-content a {
    display: block;
    margin-bottom: 8px;
}

.result-content .label {
    margin-bottom: 4px;
}

.preview-image {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    margin-top: 10px;
}

.preview-container {
    position: relative;
    display: inline-block;
}

.cart-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    border-radius: 4px;
}

.preview-image {
    max-width: 128px;
    max-height: 128px;
    border-radius: 4px;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin: 0 auto;
}

.preview-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

h1 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    word-break: break-word;
    text-align: center;
}

.help-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 90vw;
    max-height: 90vh;
}

.help-modal.show {
    display: block;
}

.help-modal img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    white-space: nowrap;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h1 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
    font-size: 24px;
    word-break: break-word;
    text-align: center;
}

.result-header p {
    margin-top: 0;
    text-align: center;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.back-link {
    display: block;
    margin-bottom: 20px;
    font-size: 16px;
    color: #1a73e8;
}

.back-link:before {
    content: "←";
    margin-right: 8px;
}

.instructions {
    font-size: 14px;
    font-style: italic;
    color: #666;
    margin-top: 10px;
}

.highlight {
    color: #ff0000;
    font-weight: bold;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1a73e8;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    margin-left: 8px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.help-icon:hover {
    background: #1557b0;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-overlay.show {
    display: block;
}

.block {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.block h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.block p {
    margin: 10px 0;
    color: #666;
}

.block .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.block .button:hover {
    background-color: #1557b0;
    text-decoration: none;
}

._P, ._P_Sales {
    border-left: 4px solid #4CAF50;
}

._D, ._D_Sales {
    border-left: 4px solid #2196F3;
}
