@font-face {
  font-family: 'Ubuntu Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Ubuntu Mono'), local('UbuntuMono-Regular'), url('UbuntuMono.woff2') format('woff2');
}

* {
    font-family: 'Ubuntu Mono';
    margin: 0;
    padding: 0;
}

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

html {
    font-size: 75%;
    color: #E4E2E0;
    background-color: #2b2435;
}

body {

    overflow-x: hidden;
	overscroll-behavior-y: none;
    background: repeating-linear-gradient(to top left, #46209ecc, #2b2435, #2b2435 10%);
    animation: bg-anim 8s linear infinite;
    background-size: 50em 50em;
}

@keyframes bg-anim {

    0%    { background-position: 0em  0; }
    100%  { background-position: 50em 0; }
}

div#container {
    min-height: 100vh;
    max-width: 1024px;
    margin: 0 auto;
    overflow: hidden;
    background: linear-gradient(transparent, #2b2435FF);
}

input {
    font-size: 1.75em;
}

input, select {
    background-color: transparent;
    border: none;
}

input[name="desc"] {
    color: #706676;
    width: 100%;
    height: 2.5em;
    margin-bottom: 0.5em;
    padding-left: 0.75em;
    margin-bottom: -0.75em;
    background: linear-gradient(#2b2435FF, transparent);
}

input::placeholder {
    color: #3d4372;
    line-height: 1;
    letter-spacing: -12;
}

input:focus::-webkit-input-placeholder { 
    color:transparent;
}

#taskHUD {
    font-size: 1.1em;
    padding-left: 1.5em;
    position: relative;
    width: calc(750px + 100% - 1.5em);
    overflow:hidden;
    padding-bottom: 1.25em;
}

*:focus, *:focus-visible {
    outline: none;
}

#twodew {
    letter-spacing: -10;
    margin-right: 0.75em;    
}

ul {
    list-style-type: none;
}

li {
    padding-left: 15px;
}

/* link-related */
a {
    text-decoration: none;
    opacity: 0.5 !important;
    color: inherit;
}
a:hover {
    opacity: 1 !important;
    font-weight: bolder;
}
a.checkbox {opacity: 1;}
a.edit:hover {color: orange;}
a.delete:hover { color: Red;}
.task a:hover {
    text-shadow: 0.2em 0.2em black;
}

.pTitle {
    letter-spacing: 0.5em;
    margin-bottom: -0.33em;
}

.period {
    font-size: 2em;
}

.period ul.category:first-of-type {

    padding-top: 0.33em;
}

.pTitle, .pTitleDone {
    font-size: 33px;
    font-style:oblique;
    text-shadow: 0.08em 0.08em black;
}

ul.category table {
    width: 100%;
    padding-top: 15px;
    padding-bottom: 30px;
    border-spacing: 0;
}


div.period {
    background: linear-gradient(transparent, #2b2435AA 10%,  #2b2435AA 90%, transparent 100%);
}

#taskTree div.period:last-of-type {
    background: linear-gradient(transparent, #2b2435AA 10%);
}

tr.cTitle td {
    font-size: 1.5em;
    letter-spacing: 0.2em;
    padding-bottom: 0.25em;
}

tr.cTitle {
    cursor: grab;
}
tr.cTitle:hover td {
    text-shadow: 0.08em 0.08em black;
    opacity: 0.85;
}
tr.cTitle.dragging {
    opacity: 0.4;
    cursor: grabbing;
}
ul.category.dropTarget {
    box-shadow: 0 -2px 0 #ffffffaa;
}
ul.category.dropTarget.dropAfter {
    box-shadow: 0 2px 0 #ffffffaa;
}

/* task related */
table {
    margin-left: 1.5em;
    padding-right: 1.5em;
}
td.checkbox {
    vertical-align: top;
    position: relative;
    top: 0.2em;
    padding-right: 1.75em;
    white-space: nowrap;
    font-size: 0.75em;
}

.task {
    font-size: 0.95em;
    line-height: 1;
    letter-spacing: 0.85;
}

.task.selected {
    background-color: #ffffff14;
    border-radius: 0.3em;
}
.task.selected .desc {
    text-shadow: 0 0 0.5em #ffffff66;
}

.task a {

    opacity: 1 !important;
}

.taskbody {
    width: 100%;
}

input.descEdit {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: #00000033;
    border: 1px solid #ffffff22;
    border-radius: 0.2em;
    padding: 0.05em 0.4em;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    letter-spacing: inherit;
}

.done {
    text-decoration: line-through;
    opacity: 0.25;
}
.checkbox, .edit, .delete {
    text-decoration: none !important;
}

.edit, .delete {
    font-size: 0.75em;
}

a#toggle {
    position: fixed;
    font-size: 1em;
    bottom: 18px;
    right: -webkit-calc(18px + 1.5em);
    right: calc(18px + 1.5em);
}

a#helpToggle {
    position: fixed;
    font-size: 1em;
    bottom: 18px;
    right: 18px;
}

#helpOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #00000099;
    z-index: 100;
    overflow-y: auto;
}

#helpOverlay .helpInner {
    background-color: #6d587d;
    box-shadow: 0em 0em 37.5px #00000088;
    border-radius: 1em;
    padding: 2em 2em 0.75em 2em;
    margin: 5% auto;
    max-width: 32em;
    font-size: 1em;
    color: #E4E2E0;
}

#helpOverlay h2 {
    font-size: 1.5em;
    letter-spacing: 0.2em;
    margin-bottom: 0.75em;
    text-shadow: 0.08em 0.08em black;
}

#helpOverlay h3 {
    font-size: 1.1em;
    letter-spacing: 0.15em;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    opacity: 0.85;
}

#helpOverlay p {
    margin-bottom: 0.5em;
    line-height: 1.4;
}

#helpOverlay code {
    background-color: #2b243588;
    padding: 0.1em 0.4em;
    border-radius: 0.3em;
}

#helpOverlay kbd {
    display: inline-block;
    background-color: #2b243588;
    border: 1px solid #00000033;
    border-radius: 0.3em;
    padding: 0.05em 0.5em;
    min-width: 1.25em;
    text-align: center;
    font-family: 'Ubuntu Mono';
}

#helpOverlay table.helpTable {
    margin: 0.25em 0 0.5em 0;
    padding: 0;
    border-collapse: separate;
    border-spacing: 0.5em 0.25em;
}

#helpOverlay table.helpTable td:first-child {
    white-space: nowrap;
    text-align: right;
    vertical-align: top;
}

#helpOverlay .helpClose {
    margin-top: 2.5em;
    text-align: right;
}

#helpOverlay .helpClose a {
    opacity: 1 !important;
    padding: 0.3em 1.25em;
    background-color: #00000033;
    border-radius: 3.75px;
    transition: background-color 0.15s ease;
}

#helpOverlay .helpClose a:hover {
    background-color: #00000066;
    text-decoration: underline;
}

#hiddenprompt {

    padding: 2em;
    background-color: #6d587d;
    box-shadow: 0em 0em 37.5px #00000088;
    padding: 1em;
    border-radius: 1em;

    position: fixed;
    top: 30%;
    left: 10%;
    right:10%;
}

#hiddenprompt a {
    opacity: 1 !important;
    font-size: 1em;
    padding: 0.2em 1em;
    background-color: #00000033;
    border-radius: 3.75px;
}

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

#hiddenprompt input, #hiddenprompt select {
    color: white;
    border: 1px solid #00000033;
}

#promptDesc {

    font-size: 1em;
    background-color: #2b243588;

    margin: 0 0 0.75em 0;
    border-radius: 0.5em;
    padding: 1em;
}

#hiddenprompt select {

    background-color: #2b243588;
    height: 2em;
    vertical-align: top;
    margin-bottom: 0.5em;
    font-size: 0.8em;
}

#hiddenprompt select:last-of-type {

    margin-bottom: 3em;
}

/* Category editor overlay */

#categoryOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #00000099;
    z-index: 100;
    overflow-y: auto;
}

#categoryOverlay .catEditorInner {
    background-color: #6d587d;
    box-shadow: 0em 0em 37.5px #00000088;
    border-radius: 1em;
    padding: 2em;
    margin: 5% auto;
    max-width: 36em;
    color: #E4E2E0;
}

#categoryOverlay h2 {
    font-size: 1.5em;
    letter-spacing: 0.2em;
    margin-bottom: 0.5em;
    text-shadow: 0.08em 0.08em black;
}

#categoryOverlay .catEditorHint {
    font-size: 0.9em;
    opacity: 0.65;
    margin-bottom: 1.25em;
    line-height: 1.4;
}

.catRow {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 0.4em;
    padding: 0.5em 0.7em;
    border-radius: 0.5em;
    transition: background-color 0.15s ease;
}

.catRow.highlight {
    box-shadow: 0 0 0 2px #ffffff44;
}

.catRow .catColor {
    width: 2.25em;
    height: 2.25em;
    border-radius: 0.3em;
    border: 1px solid #00000044;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px #ffffff22;
}

.catRow .catColor:hover {
    box-shadow: inset 0 0 0 1px #ffffff66;
}

.catRow .catEmoji {
    font-size: 1.5em;
    line-height: 1;
    padding: 0.2em 0.4em;
    background-color: #00000033;
    border-radius: 0.3em;
    cursor: pointer;
    user-select: none;
    min-width: 1.4em;
    text-align: center;
    flex-shrink: 0;
}

.catRow .catEmoji:hover {
    background-color: #00000066;
}

.catRow .catName {
    font-size: 1.1em;
    color: inherit;
    background-color: #00000033;
    border: 1px solid #ffffff22;
    border-radius: 0.3em;
    padding: 0.3em 0.5em;
    flex: 1;
    font-family: inherit;
    min-width: 0;
}

.catRow .catDelete {
    opacity: 0.5 !important;
    font-size: 1.4em;
    line-height: 1;
    padding: 0.1em 0.45em 0.2em;
    border-radius: 0.3em;
    background-color: #00000033;
    flex-shrink: 0;
}

.catRow .catDelete:hover {
    opacity: 1 !important;
    background-color: #aa2244aa;
    color: white;
    font-weight: normal;
}

#categoryOverlay .catEditorAddRow {
    margin-top: 1em;
    text-align: left;
}

#categoryOverlay .catEditorAddRow a {
    opacity: 1 !important;
    padding: 0.3em 1em;
    background-color: #00000033;
    border-radius: 3.75px;
    transition: background-color 0.15s ease;
    font-size: 0.95em;
}

#categoryOverlay .catEditorAddRow a:hover {
    background-color: #00000066;
    text-decoration: underline;
}

#categoryOverlay .catEditorClose {
    margin-top: 1.75em;
    text-align: right;
}

#categoryOverlay .catEditorClose a {
    opacity: 1 !important;
    padding: 0.3em 1.25em;
    background-color: #00000033;
    border-radius: 3.75px;
    transition: background-color 0.15s ease;
}

#categoryOverlay .catEditorClose a:hover {
    background-color: #00000066;
    text-decoration: underline;
}

#emojiPicker {
    position: absolute;
    background-color: #2b2435;
    border: 1px solid #ffffff22;
    border-radius: 0.5em;
    padding: 0.6em;
    box-shadow: 0em 0.5em 1.5em #000000aa;
    z-index: 200;
    width: 22em;
    max-width: calc(100vw - 2em);
}

#emojiPicker .emojiGrid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.1em;
    max-height: 16em;
    overflow-y: auto;
}

#emojiPicker .emojiChoice {
    font-size: 1.3em;
    text-align: center;
    padding: 0.2em 0;
    cursor: pointer;
    border-radius: 0.2em;
    user-select: none;
}

#emojiPicker .emojiChoice:hover {
    background-color: #ffffff22;
}

#colorPicker {
    position: absolute;
    background-color: #2b2435;
    border: 1px solid #ffffff22;
    border-radius: 0.5em;
    padding: 0.6em;
    box-shadow: 0em 0.5em 1.5em #000000aa;
    z-index: 200;
    width: 18em;
    max-width: calc(100vw - 2em);
    user-select: none;
}

#colorPicker .svArea {
    position: relative;
    width: 100%;
    aspect-ratio: 1.6;
    border-radius: 0.3em;
    cursor: crosshair;
    background-image:
        linear-gradient(to top, #000, transparent),
        linear-gradient(to right, #fff, transparent);
    touch-action: none;
    overflow: hidden;
}

#colorPicker .svCursor {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #000000aa, 0 0 4px #00000088;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#colorPicker .hueSlider {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    margin-top: 0.6em;
    cursor: ew-resize;
    background: linear-gradient(to right,
        #ff0000 0%, #ffff00 17%, #00ff00 33%,
        #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    touch-action: none;
}

#colorPicker .hueThumb {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid white;
    background-color: transparent;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 0 1px #000000aa;
}

#colorPicker .colorCustom {
    margin-top: 0.6em;
    width: 100%;
    font-size: 0.95em;
    color: inherit;
    background-color: #00000044;
    border: 2px solid #ffffff22;
    border-radius: 0.3em;
    padding: 0.3em 0.5em;
    font-family: inherit;
    box-sizing: border-box;
}

#colorPicker .colorCustom.invalid {
    border-color: #ff5577aa;
}

#emojiPicker .emojiSearch {
    margin-bottom: 0.5em;
    width: 100%;
    font-size: 0.95em;
    color: inherit;
    background-color: #00000044;
    border: 1px solid #ffffff22;
    border-radius: 0.3em;
    padding: 0.3em 0.5em;
    font-family: inherit;
    box-sizing: border-box;
}

#emojiPicker .emojiSearch::placeholder {
    color: #ffffff66;
    opacity: 1;
}

#emojiPicker .emojiSearch:focus::placeholder {
    color: #ffffff66;
    opacity: 1;
}

#emojiPicker .emojiEmpty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1em 0;
    color: #ffffff66;
    font-size: 0.9em;
}

/* Portrait Overrides */
/* @media (max-aspect-ratio: 3/3) {} */
/* Landscape Overrides */
/* @media (min-aspect-ratio: 3/3) {} */