/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
body{
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 32px 0;
    background-color: #fdf1f3;
    color: #333333;
    font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "BIZ UDGothic", sans-serif;
}



.container {
    width: 90%;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 1.6rem;
}

.hint-text {
    font-size: 0.85rem;
    color: #777777;
}


.anxiety-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.anxiety-buttons form button {
    width: 56px;
    height: 56px;
    font-size: 20px;
    border-radius: 50%;
    border: none;
    color: #33402f;
    cursor: pointer;
    font-weight: bold;
}

.anxiety-level-1 { background-color: #edf7ec; }
.anxiety-level-2 { background-color: #dcefda; }
.anxiety-level-3 { background-color: #c8e6c4; }
.anxiety-level-4 { background-color: #b0d9ac; }
.anxiety-level-5 { background-color: #97cb91; }


[data-breathing-target="flowers"]{
    white-space: pre-line;
}

[data-breathing-target="flowers"] {
    white-space: pre-line;
    min-height: 80px;
}

.flower-test img {
    opacity: 0;
    transition: opacity linear;
}


[data-controller="card"] {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-controller="card"] button {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    text-align: left;
    width: 100%;
    cursor: pointer;
    color: #000000;

}

a {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(135deg, #9ccc65, #7cb342);
}

a:hover {
    background: linear-gradient(135deg, #8bc34a, #689f38);
}

button,
input[type="submit"] {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 0;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    background-color: #d9f2e0;
    color: #2f5d3a;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background-color: #c3e9cf;
}


.omamori-bag {
    width: 140px;
    display: block;
    margin: 0 auto;
}

button[hidden] {
    display: none;
}

.choice-button {
    background: none;
    background-color: #d9f2e0;
    color: #2f5d3a;
    font-size: 1rem;
    font-weight: bold;
    -webkit-text-stroke: 0.6px #2f5d3a;
}


.choice-button:hover {
    background: none;
    background-color: #c3e9cf;
}

.breathing-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.breathing-nav form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}


.table-wrapper {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

th, td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #f0e0e3;
    white-space: nowrap;
    font-size: 0.9rem;
}

.table-wrapper button {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.grounding-detail {
    text-align: left;
}

.text-link {
    display: inline-block;
    background: none;
    color: #7cb342;
    font-size: 0.85rem;
    padding: 4px 4px;
    text-decoration: underline;
    font-weight: normal;
}

.text-link:hover {
    background: none;
    color: #558b2f;
}

[data-controller="elapsed-timer"] {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

[data-controller="elapsed-timer"] p {
    margin: 0;
}

[data-breathing-target="phase"] {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2f5d3a;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.card button {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    flex: 1;
    padding: 12px 16px;
    cursor: pointer;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 12px;
}

.card button:hover {
    background-color: #f5f5f5;
}

.card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #ffffff;
    color: #2f5d3a;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-weight: bold;
    text-decoration: none;
    min-height: 115px;
    box-sizing: border-box;
}

.card-link:hover {
    background: #f5f5f5;
}

[data-card-target="backdrop"] {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
}

[data-card-target="detail"] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    width: 85%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.phase-number {
    font-size: 1.8rem;
    font-weight: bold;
}

.breathing-phase-inhale {
    color: #2f6fb3;
}

.breathing-phase-hold {
    color: #6b6b6b;
}

.breathing-phase-exhale {
    color: #d17a3f;
}

#error_explanation {
    background-color: #fff0f0;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px 0;
    text-align: left;
}

#error_explanation h2 {
    font-size: 1rem;
    font-weight: bold;
    color: #c0392b;
    margin: 0 0 8px;
}

#error_explanation ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

#error_explanation li {
    font-size: 0.9rem;
    color: #c0392b;
}

.notice, .alert {
    display: block;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px auto;
    max-width: 480px;
    font-weight: bold;
}

.notice {
    background-color: #eaf7ec;
    color: #2f5d3a;
}

.alert {
    background-color: #fff0f0;
    color: #c0392b;
}

.notice:empty, .alert:empty {
    display: none;
}

.active-log-badge {
    position: fixed;
    top: 16px;
    right: 16px;
    background-color: #dce775;
    color: #4b5320;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 20;
}
