@charset "utf-8";

/* 
 * Tento Coffee - Custom Mail Form Design
 * Styled to match https://shop.tentoworks.com/
 */

/* ----------------------------------------------------------
    Reset & Base
------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Noto+Sans+JP:wght@400;700&display=swap');

html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, code, form, fieldset, legend, table, th, td, caption, a, article, aside, nav, section, figure, figcaption, footer, header, main, audio, canvas, video, menu, details {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 100%;
    vertical-align: baseline;
    box-sizing: border-box;
}

body {
    background: #FAF8F5; /* Cream background from the site */
    color: #3C342D; /* Dark Brown from the site */
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 60px 20px;
}

/* ----------------------------------------------------------
    Layout
------------------------------------------------------------- */
#wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 2rem;
    box-shadow: 0 40px 100px rgba(60, 52, 45, 0.04), 0 10px 30px rgba(60, 52, 45, 0.02);
    overflow: hidden;
    width: 100%; /* Ensure it doesn't exceed screen width */
}

#main {
    padding: 60px 40px;
}

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    body {
        padding: 20px 8px; /* Slightly less padding to gain space */
        min-width: 320px;
        overflow-x: hidden;
    }
    #wrapper {
        border-radius: 1.25rem;
        width: 100%;
        max-width: 100%;
    }
    #main {
        padding: 40px 15px; /* Reduced from 20 to 15 to give 10px more total space */
    }
    .section__ttl {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    .button_box {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    #main input[type="submit"],
    #main .button_box a,
    #main .btn {
        width: 100% !important;
        min-width: 0;
    }
    #main .button_box a {
        border: none;
        padding: 14px;
        background: #F9F8F6;
        border-radius: 999px;
        text-align: center;
        border: 1px solid #E5E1DB;
    }
}

/* ----------------------------------------------------------
    Typography
------------------------------------------------------------- */
h1, h2, h3 {
    font-weight: 700;
}

.section__ttl {
    font-size: 1.75rem;
    color: #3C342D;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section__ttl::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #3C342D;
    border-radius: 99px;
}

#txt_explain {
    margin-bottom: 2.5rem;
    text-align: center;
}

#txt_explain p {
    color: #6D635B;
    font-size: 0.95rem;
    word-break: break-all;
}

.red_txt:empty {
    display: none;
}

.red_txt {
    color: #D32F2F;
    background: #FFEBEE;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(211, 47, 47, 0.1);
}

/* ----------------------------------------------------------
    Form Elements (Table Layout)
------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 3rem;
    table-layout: fixed; /* Prevents cell content from expanding table width */
}

.table th {
    width: 30%;
    padding: 24px 20px 24px 0;
    text-align: left;
    vertical-align: top;
    font-weight: 700;
    font-size: 0.95rem;
    color: #3C342D;
    border-bottom: 1px solid #F0EDE9;
}

.table td {
    padding: 20px 0;
    vertical-align: middle;
    border-bottom: 1px solid #F0EDE9;
}

@media (max-width: 640px) {
    .table th, .table td {
        display: block !important;
        width: 100% !important;
        padding: 8px 0 !important;
        border-bottom: none !important;
        box-sizing: border-box !important;
    }
    .table th {
        padding-top: 24px !important;
        font-size: 0.9rem !important;
        color: #6D635B !important;
        text-align: left !important;
    }
    .table td {
        padding-bottom: 16px !important;
        border-bottom: 1px solid #F0EDE9 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important; /* Changed from flex-start to stretch */
    }
    .table tr:last-child td {
        border-bottom: none !important;
    }
}

/* ----------------------------------------------------------
    Inputs & Buttons
------------------------------------------------------------- */
#main input[type="text"],
#main input[type="email"],
#main input[type="tel"],
#main input[type="password"],
#main textarea,
#main select {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    background: #F9F8F6;
    border: 1px solid #E5E1DB;
    border-radius: 0.75rem;
    color: #3C342D;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(60, 52, 45, 0.02);
    -webkit-appearance: none; /* Reset for iOS */
    appearance: none;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    #main input[type="text"],
    #main input[type="email"],
    #main input[type="tel"],
    #main input[type="password"],
    #main textarea,
    #main select {
        padding: 12px 16px;
        margin-bottom: 8px; /* Added spacing for multiple inputs in one td */
        width: 100% !important;
        max-width: 100% !important;
    }
    #main input:last-child,
    #main textarea:last-child,
    #main select:last-child {
        margin-bottom: 0;
    }
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    background: #FFFFFF;
    border-color: #3C342D;
    box-shadow: 0 0 0 4px rgba(60, 52, 45, 0.05);
}

textarea {
    min-height: 150px;
    line-height: 1.6;
}

/* Checkbox & Radio styling (fallback to default, but spacing matters) */
input[type="checkbox"],
input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.button_box {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Custom Buttons */
input[type="submit"],
.button_box a,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    border-radius: 999px; /* Pill shape from the site */
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: none;
    min-width: 180px;
}

/* Main Button (Submit/Confirm/Send) */
input[type="submit"][value="確認"],
input[type="submit"][value="送信"] {
    background: #3C342D; /* Dark Brown */
    color: #FFFFFF;
    box-shadow: 0 10px 20px rgba(60, 52, 45, 0.15);
}

input[type="submit"][value="確認"]:hover,
input[type="submit"][value="送信"]:hover {
    background: #5A4E44;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(60, 52, 45, 0.2);
}

/* Secondary Button (Back) */
input[type="submit"][value="戻る"] {
    background: #FFFFFF;
    color: #3C342D;
    border: 1px solid #3C342D;
}

input[type="submit"][value="戻る"]:hover {
    background: #FCFAF8;
    transform: translateY(-2px);
}

/* Return to site link */
.button_box a {
    color: #3C342D;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 10px;
    min-width: auto;
    border-bottom: 1px solid #3C342D;
    border-radius: 0;
}

.button_box a:hover {
    opacity: 0.7;
}

/* Utilities */
.tac { text-align: center; }
.fontBold { font-weight: 700; }