:root {
    --primary-color: #ff4757;
    --secondary-color: #2ed573;
    --accent-color: #1e90ff;
    --warning-color: #ffa502;
    --purple-color: #9b59b6;
    --dark-color: #2f3542;
    --light-color: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    padding: 10px;
    background-color: #ffdea0;
    transition: background-color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--light-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1.site-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.calendar-name-container {
    text-align: center;
    margin-bottom: 20px;
}

.calendar-name-input {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border: 2px dashed var(--accent-color);
    border-radius: 6px;
    padding: 5px 10px;
    width: 98%;
    max-width: 1180px;
    background: transparent;
}

.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.nav-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

.nav-btn:hover {
    opacity: 0.9;
}

h2.month-title {
    font-size: 20px;
    color: var(--purple-color);
}

.calendar-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    min-width: 320px;
    background-color: #ffffff;
    border: 1px solid #ddd;
}

.calendar-day {
    padding: 2px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

.calendar-day.empty {
    background: #fafafa;
}

.day-number {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 2px;
    color: #555;
    padding-left: 2px;
}

.day-input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding: 2px;
    font-size: 11px;
    margin-bottom: 2px;
    text-align: right;
    -moz-appearance: textfield;
}

.day-input:last-child {
    margin-bottom: 0;
}

.day-input::-webkit-outer-spin-button,
.day-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.totals-container {
    background: #ffffff;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-label-input {
    font-size: 15px;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px;
    width: 60%;
    max-width: 250px;
}

.total-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.iframe-container {
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.iframe-container iframe {
    width: 100%;
    height: 150px;
    border: none;
    display: block;
}

.color-panel {
    background: #f1f2f6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.color-picker-group {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: bold;
}

.color-picker-group label {
    margin-bottom: 4px;
}

.color-picker-group input[type="color"] {
    width: 100%;
    height: 35px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 140px;
    padding: 10px;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.btn-clear { background-color: var(--primary-color); }
.btn-png { background-color: var(--secondary-color); }

.share-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.share-btn {
    flex: 1;
    min-width: 70px;
    padding: 8px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}

.share-x { background-color: #000000; }
.share-line { background-color: #06C755; }
.share-insta { background-color: #E1306C; }
.share-email { background-color: #7f8c8d; }

h3.section-title {
    color: var(--accent-color);
    margin-top: 20px;
    margin-bottom: 10px;
    border-left: 5px solid var(--accent-color);
    padding-left: 8px;
}

.seo-content {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    font-size: 14px;
    color: #444;
}

.seo-content p {
    margin-bottom: 12px;
}

.links-section {
    margin-top: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.links-section a, .footer-nav a {
    color: #0000ff;
    text-decoration: underline;
}

.footer-nav {
    margin-top: 25px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 14px;
}

.footer-nav a {
    margin: 0 10px;
}

@media screen and (orientation: landscape) {
    html, body {
        padding: 0;
        margin: 0;
    }
    .container {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        box-shadow: none;
        padding: 10px;
    }
}