body{

    
    background: #fcfcfc;
    font-family: system-ui, sans-serif;
    color: #333;
    margin: 0;
    padding: 10px 10px;
    padding-top: 60px;

}

body {
    font-family: "Inter", "Noto Sans JP", system-ui, sans-serif;
}

input[type="text"],
input[type="password"],
textarea {

width: 100%;
padding: 10px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 15px;
font-family: inherit;
box-sizing: border-box;

}

input:focus,
textarea:focus{
    outline:none;
    
}

input[type="submit"]{
    background: #2b2b2b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
}

input[type="submit"]:hover{
    background: #363636;
}

.card{
    max-width:400px;
    margin: 60px auto;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow:  0 1px 3px rgba(0,0,0,0.08);
}

form p {
    margin: 20px 0 6px;
    font-size: 14px;
    color: #666;
}

.hint {
    font-size: 12px;
    color: #999;
    margin: 6px 0 0;
}

.err_msg {
    color: #e03131;
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}

a{
    color: #4a7cff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(252, 252, 252, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    
}

.header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(252, 252, 252, 0.85), rgba(252, 252, 252, 0));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
    pointer-events: none;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.memo-list {
    
    margin: 0 auto;
    
}

.memo-card-inner {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.memo-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.memo-body {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
    line-height:1.6;
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    

}

.memo-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.memo-actions form {
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
}



.memo-card-inner {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card {
    max-width: 400px;
    margin: 60px auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}


input[type="text"],
input[type="password"],
textarea {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

input:focus,
textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: none;
}


input[type="submit"].btn-delete {
    background: rgba(255, 255, 255, 0.7);
    color: #e03131;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}

input[type="submit"].btn-delete:hover {
    background: rgba(255, 235, 235, 0.9);
}

.memo-actions a {
    background: rgba(255, 255, 255, 0.7);
    color: #4a7cff;
    border: 1px solid rgba(74, 124, 255, 0.25);
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.memo-actions a:hover {
    background: rgba(240, 245, 255, 0.9);
    text-decoration: none;
}

.btn-plain {
    background: rgba(255, 255, 255, 0.7);
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-plain:hover {
    background: rgba(255, 255, 255, 0.95);
}

.btn {
    display: inline-block;
    background: #4a7cff;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.btn:hover {
    background: #3a6ae8;
    text-decoration: none;
}

.memo-card-inner {
    transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
}

.memo-card:hover .memo-card-inner {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}






.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    
    backdrop-filter: blur(4px);
    z-index:100;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border : 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 15px;
    width: 90%;
    max-width: 560px;
    box-shadow:0 1px 3px rgba(0, 0, 0, 0.08) , 0 20px 60px rgba(0,0,0,0.02);
    transform: scale(0.96);
    transition: transform 0.2s;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content textarea {
    min-height: 200px;
    margin-top: 12px;
    resize: vertical;
}

#modal-status {
    font-size: 10px;
    color: #4caf59;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    min-height: 20px;
}

#modal-status.show {
    opacity: 1;
}


.editor { 
    max-width: 700px;
    margin: 0 auto;
}

input[type="text"].editor-title {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 28px;
    font-weight: 600;
    padding: 0;
    margin-bottom: 16px;
    font-family: inherit;
    color: #333;
}

input[type="text"].editor-title:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

.editor-body {
    width:100%;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.8;
    padding: 0;
    min-height: 60vh;
    resize: none;
    font-family: inherit;
    color: #333;
}

.editor-body:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

.editor-title::placeholder,
.editor-body::placeholder {
    color: #bbb;
}

.editor-header {
    max-width:700px;
    margin:0 auto 40px;
    display: flex;
    justify-content:space-between;
    align-items:center;
    font-size: 14px;
}

#modal-title {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 38px;
    font-weight: 600;
    padding: 0;
    margin-bottom: 12px;
    font-family: inherit;
    color: #333;
}

#modal-title:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

#modal-body {
    width:100%;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.8;
    padding: 0;
    min-height: 240px;
    resize: none;
    font-family: inherit;
    color: #333;
}

#modal-body:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

#modal-title::placeholder,          
#modal-body::placeholder {
    color: #bbb;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px;
    padding-top: 16px;
    border-top: none;

}

.modal-buttons{
    display : flex;
    gap: 12px;
    align-items: center;
}

button.btn-plain {
    background: rgba(255,255,255,0.7);
    color:#555;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 8px 16px;
    border-radius: 8px;
    font-size:14px;
    font-family: inherit;
    cursor: pointer;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 50px;

}

.space {
    display: flex;
    align-items: center;
    justify-content: center;
    margin : 110px;
}

.create-box{
    max-width: 600px;
    margin: 0 auto 42px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 15px 19px;
    box-shadow:0 1px 3px rgba(0, 0, 0, 0.08) ,0 8px 32px rgba(0,0,0,0.06);
    margin-bottom: 120px;
    transition: box-shadow 0.2s, transform 0.2s;
    
}

.create-box:hover{
    box-shadow: 0 10px 38px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#create-title{
    width: 100%;
    border: none;
    background: transparent;
    padding:5px;
    font-size: 16px;
    font-family: inherit;
    color: #333;
    margin-bottom: 8px;


}

#create-title:focus{
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

#create-body {
    width: 100%;
    border: none;
    background: transparent;
    padding:5px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    min-height: 60px;
    resize: none;
}

#create-body:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

#create-title::placeholder,
#create-body::placeholder {
    color: #aaa;
}




.add-btn{
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2b2b2b;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;

}

.add-btn:hover {
    background: #363636;
    text-decoration: none;

}

#tag-create-btn {
    width: 36px;
    height: 36px;
}

.btn-delete {
    background: transparent;
    color: #999;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.btn-delete:hover {
    color: #e03131;
    background: rgba(224, 49, 49, 0.08);
}

.memo-card {
    width: 260px;
    margin-bottom: 16px;
}

.memo-actions {
    position: absolute;
    right: 12px;
    bottom: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    
}

.memo-card-inner {
    position: relative;
}

.memo-card:hover .memo-actions {
    opacity: 1;
}

input[type="submit"].btn-plain {
    background: transparent;
    color: #888;
    border: none;
    font-size: 14px;
    transition: color 0.2s;
}

input[type="submit"].btn-plain:hover {
    color: #333;
}

input[type="submit"].btn-plain:focus {
    outline: none;
}

input[type="submit"].btn-plain:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

.btn-close {
    background: transparent;
    color: #999;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.btn-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.btn-favorite {
    background: transparent;
    color: #999;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.btn-favorite:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.btn-favorite.is-active {
    color: #2b2b2b;
}

.filter-link {
    color: #888;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.filter-link:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.filter-link.is-active {
    color: #2b2b2b;
    font-weight: 600;
}

.search-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.04);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 500px;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.search-trigger:hover {
    background: rgba(0,0,0,0.07);
}

.palette {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(6px);
    z-index: 110;
    align-items: flex-start;
    justify-content:center;
    padding-top: 15vh;
    opacity:0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.palette.show {
    opacity: 1;
    visibility: visible;
}

.palette-content {
    background: rgba(40,40,40,0.9);
    backdrop-filter: blur(20px);
    border-radius:16px;
    padding: 20px;
    width: 90%;
    max-width: 640px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(-10px);
    transition: transform 0.2s;
}

.palette.show .palette-content {
    transform: translateY(0);
}

input[type="text"]#palette-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-family: inherit;
    padding: 8px 0;
}

input[type="text"]#palette-input:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

#palette-input::placeholder {
    color: #888;
}


.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    color: #555;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
}

.tag-chip button {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.tag-chip button:hover {
    color: #333;
}

input[type="text"]#create-tag-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 5px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
}

input[type="text"]#create-tag-input:focus {
    outline: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

.tag-modal-content {
    max-width: 400px;
}

.tag-modal-title {
    font-size: 16px;
    font-weight: 600;
}

#tag-modal .modal-header {
    margin-bottom: 16px;
    justify-content: space-between;
}

.tag-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.tag-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.tag-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.tag-create {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

input[type="text"]#tag-new-name {
    flex: 1;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.btn-tag {
    background: transparent;
    color: #999;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.btn-tag:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

#modal .modal-header {
    gap: 8px;
}

#tag-modal {
    z-index: 120;
}


.palette-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.palette-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
    border: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.palette-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.body-wrap {
    position: relative;
}

.body-wrap textarea,
.body-wrap .fake-placeholder {
    width: 100%;
    padding: 5px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    border: none;
    background: transparent;
    box-sizing: border-box;
}

.body-wrap .fake-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    color: #aaa;
    pointer-events: none;
    transition: opacity 0.3s;
}

.body-wrap textarea {
    min-height: 200px;
    resize: none;
}

#create-body::-webkit-scrollbar {
    width: 6px;
}

#create-body::-webkit-scrollbar-track {
    background: transparent;
}

#create-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

#create-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.body-wrap textarea {
    min-height: 60px;
    resize: none;
    overflow: hidden;
}

.create-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.body-wrap {
    flex: 1;
    position: relative;
}

.tag-delete {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.tag-delete:hover {
    color: #e03131;
}

.brand {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.04em;
    color: #111;
    transition: opacity 0.2s;
}

.brand:hover {
    text-decoration: none;
    opacity: 0.7;
}

input[type="submit"].btn-plain:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
    border: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    box-shadow: none;
    
}

#modal-footer {
    min-height: 20px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.palette ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.palette ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);

}



::-webkit-scrollbar-button {
    display: none;
}

#modal-body::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

#modal-body::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.card {
    margin : 15vh auto;
}


