@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+JP:wght@100..900&display=swap');
:root {
    --primary-color: #1f75f5;
}

body {
    font-family: "Inter", "Noto Sans JP", sans-serif;
    margin: 0;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #0a0a0a;
}

.flexbox{
    display: flex;
}

.search-box{
    position: relative;
    width: 100%;
    height: 100dvh;
}

.search-box_viewmode{
    width: 372px;
    transition: all 300ms cubic-bezier(0,1.01,.31,1);
}

.search-box .logo-box {
    width: 300px;
    margin: 0px auto;
    text-align: center;
}

.search-box .logo-box p{
    margin-top: -16px;
}

.search-box .logo-box img{
    width: 300px;
}

.search-box_viewmode .logo-box {
    display: none;
}

.search-box .search-container {
    position: absolute;
    top: calc(50% - 120px);
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    padding: 15px 0;
    z-index: 100;
    transition: all 300ms cubic-bezier(0,1.01,.31,1);
}

.search-box_viewmode .search-container {
    top: 40px;
    left: 50%;
    transform: translate(-50%, -50%);
}

.search-box .search-container .search-button {
    background-color: var(--primary-color);
    outline: none;
    border: 1px solid color-mix(in srgb, var(--primary-color) 75%, #0a0a0a 25%);
    box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    height: 48px;
    width: 64px;
    cursor: pointer;
    transition: all 250ms ease-out;
}

.search-box .search-container .search-button:hover {
    border-color: color-mix(in srgb, var(--primary-color) 75%, #FFFFFF 25%);
    width: 70px;
}

.search-container:has(.search-button:hover) .search-input {
    width: 254px;
}

.search-box .search-container .search-button:active {
    background-color: color-mix(in srgb, var(--primary-color) 75%, #0a0a0a 25%);
    width: 48px;
}

.search-box .search-container .search-button img{
    width: 32px;
    height: 32px;
}

.search-input {
    width: 260px;
    height: 48px;
    margin-right: 16px;
    padding: 12px;
    font-size: 16px;
    background-color: #FFFFFF;
    border: 1px solid #ddd;
    box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    box-sizing: border-box;
    outline: none;
    font-family: "Inter", "Noto Sans JP", sans-serif;
    transition: all 250ms ease-out;
}

.search-input:hover {
    width: 276px;
}

.search-input:hover + .search-button {
    width: 48px;
}

.search-input:focus {
    width: 276px;
    border-color: var(--primary-color);
}

.search-input:focus + .search-button {
    width: 48px;
}

#suggest-list {
    list-style: none;
    padding: 0;
    background-color: #FFFFFF;
    border: 1px solid #ddd;
    border-radius: 24px;
    box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;

    position: absolute;
    top: 208px;
    left: 0;
    width: 338px;
    z-index: 110;

    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 300ms cubic-bezier(0,1.01,.31,1);   
}

.search-box_viewmode #suggest-list{
    top: 66px;
}

#suggest-list.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#suggest-list.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
}

#suggest-list li {
    padding: 12px;
    cursor: pointer;
}

#suggest-list li:hover {
    background-color: #EEE;
}

#suggest-list li:not(:last-child) {
    border-bottom: 1px solid #DDD;
}

.history-container{
    display: none;
    position: absolute;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    height: calc(100dvh - 96px);
    overflow-y: scroll;
    border-radius: 24px;
    margin: 16px 0px;
}

.history-container::-webkit-scrollbar {
    display: none;
}

.history-container p {
    margin-left: 0px;
}

.history-container #history-list{
    padding: 0px;
    outline: none;
}

.history-container #history-list li {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    list-style: none;
    margin: 0px 0px;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 12px;
    cursor: pointer;
    border-radius: 24px;
    transition: all 250ms ease-out;
}

.history-container #history-list li:hover {
    background-color: #FFF;
}

.history-container #history-list .selected{
    background-color: #FFF;
    border: 1px solid #ddd;
    box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.05);
}

.history-container #history-list li:first-child {
    animation: fadeInUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.history-container #history-list li:not(:first-child) {
    animation: none;
    opacity: 1;
    transform: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result {
    flex: 1;
    min-width: 0;
    margin-top: -1px;
    margin-right: 0px;
    width: 0px;
    height: 100dvh;
    background-color: #FFFFFF;
    box-shadow: -5px 0px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #ddd;
    padding: 0px;
    border-radius: 24px 0px 0px 24px;
    line-height: 1.6;
    transition: all 300ms cubic-bezier(0,1.01,.31,1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    overflow-x: hidden;
    overflow-y: scroll;
}

.result .entry-title{
    margin: 16px;
}

.result .entry-content{
    margin: 16px;
}

.result_viewmode{
    width: calc(100% - 404px);
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.result a:not([href^="https://ja.wiktionary.org/wiki/"]):not([href^="#"])::after {
    content: " ↗";
    font-size: 0.8em;
    color: var(--primary-color);
}

#result h1 {
    font-size: 2.2rem;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    margin-top: 16px;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

#result h2 {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

#result h3{
    font-size: 1rem;
    background: #eee;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0px;
    color: #666;
    border: solid 1px #ddd;
}

#result hr{
    height: 1px;
    background-color: #ddd;
    border: none;
    margin: 32px 0px;
}

#result ol {
    padding-left: 1.5em;
    margin-top: 15px;
}

#result ol li {
    margin-bottom: 15px;
    padding-left: 0.5em;
}

#result a{
    color: var(--primary-color);
    text-decoration: none;
}

#result a:hover{
    text-decoration: underline;
}

#result img{
    border-radius: 8px;
}

#result figure{
    margin: 0px;
}

#result dd, #result .example {
    color: #666;
    font-size: 0.95rem;
    border-left: 2px solid #ddd;
    padding-left: 15px;
    margin: 10px 0 10px 20px;
}

.mw-editsection,      /* [編集] リンク */
.navbox,              /* ナビゲーションボックス */
.internal,            /* 内部的な注意書き */
#toc                  /* 目次（自作するなら不要） */ {
    display: none !important;
}

#result audio {
    width: fit-content;
    height: 32px;
    border-radius: 8px;
    background: #eee;
    border: solid 1px #ddd;
    padding: 0px;
}

#result audio::-webkit-media-controls-enclosure {
    background-color: #eee;
    border-radius: 8px;
    padding: 0px;
}

#result audio::-webkit-media-controls-play-button {
    background-color: #ddd;
    border-radius: 4px;
    max-height: 24px;
    max-width: 24px;
}

#result audio::-webkit-media-controls-current-time-display,
#result audio::-webkit-media-controls-time-remaining-display {
    display: none;
}