@font-face {
    font-family: "Rotation Memo Symbols";
    src: url("/assets/material-symbols.woff2") format("woff2");
    font-display: block;
}

.rotation-icon {
    display: inline-block;
    width: 1em;
    overflow: hidden;
    font: 1.35rem/1 "Rotation Memo Symbols";
    font-feature-settings: "liga";
    white-space: nowrap;
}
.rotation-memo { display: grid; gap: 9px; }
.rotation-fields { display: grid; gap: 6px; }
.rotation-field-section { display: grid; gap: 6px; min-width: 0; }
.rotation-field-section > .field {
    grid-template-columns: minmax(0, 1fr) minmax(0, min(48%, 16rem));
    align-items: center;
    gap: 10px;
}
.rotation-field-section + .rotation-field-section {
    border-block-start: 1px solid var(--edge);
    padding-block-start: 6px;
}
.rotation-field-section > .field label { overflow-wrap: anywhere; }
.rotation-field-section > .field .unit { min-width: 2em; }
.rotation-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}
.rotation-steps[data-count="1"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rotation-steps[data-count="2"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rotation-steps .button { padding-inline: 8px; }
.rotation-steps .button span { min-width: 0; overflow-wrap: anywhere; }
.rotation-investment-options { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.rotation-unit-switch { display: flex; gap: 6px; }
.rotation-unit-switch .button { min-width: 44px; }
.rotation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rotation-save { color: #fff; background: #b4232c; border-color: #b4232c; }
.rotation-save-label > span { white-space: nowrap; }
.rotation-save:not(:disabled):hover { background: #8f1922; border-color: #8f1922; }
.rotation-reset { gap: 5px; color: #422b08; background: #ffdf71; border-color: #e8be41; }
.rotation-reset:not(:disabled):hover { background: #ffd347; }
.rotation-preset-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    margin: 0;
    padding: 6px 8px 8px;
    gap: 6px;
    border: 1px solid var(--edge);
    border-radius: 9px;
}
.rotation-preset-fields legend { padding-inline: 4px; font-weight: 700; }
.rotation-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 700px) {
    .rotation-memo .result-panel { padding-block: 10px; }
    .rotation-memo .result-value { font-size: clamp(1.65rem, 8vw, 1.95rem); }
    .rotation-memo > .input-panel { padding-block: 11px; }
    .rotation-fields { gap: 4px; }
    .rotation-field-section + .rotation-field-section { padding-block-start: 4px; }
    .rotation-field-section > .field label { font-size: .85rem; line-height: 1.3; }
    .rotation-field-section > .field .field-control { gap: 4px; }
    .rotation-field-section > .field input { padding-inline: 6px; font-size: 1rem; }
    .rotation-field-section > .field .unit { font-size: .75rem; }
    .rotation-steps { gap: 4px; }
    .rotation-steps .button { padding: 4px 5px; font-size: .78rem; }
    .rotation-actions .rotation-save { flex: 1 1 9rem; padding-inline: 8px; }
}
