/* src/public/css/calculator/graduation.css … 和暦・年齢・卒業年早見表 */

.calc-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.gcal-section-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #1e3c72;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gcal-section-desc {
    margin: 0 0 20px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.input-group {
    margin-bottom: 20px;
}
.input-group label,
.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1e3c72;
}
.input-group input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.gcal-field-note {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

/* 基準日＋「今日」ボタン */
.gcal-date-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.gcal-date-row input[type="date"] {
    flex: 1;
    min-width: 0;
}
.gcal-btn-today {
    flex: 0 0 auto;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #2a5298;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}
.gcal-btn-today:hover { background: #e2e8f0; }

/* 浪人・留年（折りたたみ） */
.gcal-options {
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.gcal-options summary {
    padding: 12px 14px;
    font-weight: bold;
    color: #1e3c72;
    cursor: pointer;
}
.gcal-options-body {
    padding: 0 14px 14px;
}
.gcal-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.gcal-option-row label {
    font-size: 0.92rem;
    color: #334155;
    font-weight: bold;
}
.gcal-option-row select {
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #ffffff;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    flex-wrap: wrap;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
}

/* ボタン群 */
.btn-group {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}
.btn-calc {
    flex: 2;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #2a5298;
    color: white;
}
.btn-calc:hover { background-color: #1e3c72; }
.btn-clear-tool {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #e9ecef;
    color: #495057;
}
.btn-clear-tool:hover { background-color: #dee2e6; }

.gcal-message {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.9rem;
    font-weight: bold;
    color: #b45309;
}

/* 年齢・和暦・干支・学年のカード */
.gcal-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.gcal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 16px 12px;
    border-radius: 8px;
    background-color: #f1f3f5;
}
.gcal-card-title {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: bold;
}
.gcal-card-val {
    font-size: 1.9rem;
    font-weight: bold;
    color: #2a5298;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.gcal-card-val-sm { font-size: 1.25rem; }
.gcal-card-sub {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* 入学・卒業年の表 */
.gcal-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.gcal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.gcal-table th,
.gcal-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}
.gcal-table thead th {
    background-color: #f1f5f9;
    color: #1e3c72;
    font-size: 0.85rem;
    white-space: nowrap;
}
.gcal-table tbody th {
    color: #1e293b;
    font-weight: bold;
}
.gcal-table td {
    color: #334155;
    white-space: pre;
}

.gcal-copy-row {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}
.gcal-btn-copy {
    padding: 10px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #2a5298;
    font-weight: bold;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gcal-btn-copy:hover { background: #e2e8f0; }

/* === スマホ・タブレット対応 === */
@media (max-width: 768px) {
    .calc-box { padding: 20px; }
    .input-group { margin-bottom: 16px; }
    .radio-group { gap: 12px; }
    .btn-group { gap: 10px; }
    .btn-calc, .btn-clear-tool { padding: 12px; font-size: 0.95rem; }
    .gcal-date-row { flex-wrap: wrap; }
    .gcal-btn-today { flex: 1; padding: 10px; }
    .gcal-card-val { font-size: 1.5rem; }
    .gcal-card-val-sm { font-size: 1.1rem; }
    .gcal-table { font-size: 0.85rem; }
    .gcal-table th, .gcal-table td { padding: 8px 6px; }
}
@media (max-width: 420px) {
    .gcal-summary { grid-template-columns: 1fr; }
}
